VICTORY_WRITE_SITES: refuse a file inside the source tree (#33) #89
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/89"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from avatarmanz/VIctory-7900XTX. Originally posted by sharan104 on 2026-11-26T02:51:26Z.
Fixes #33.
VICTORY_WRITE_SITESwrites<title module> <offset>lines, which are game-derived, and opened the path as given. Withscripts/play.ps1's working directory a relative name landed in the checkout, and (as the issue's follow-up comment shows)cargo xtask policywould accept a small.txtof that shape. It was the one writer that skippedensure_outside_repo.What changes:
titlewrite::learnnow resolves the file once throughvictory_core::ensure_outside_repoand keeps the answer in aOnceLock. A refused path gets onewarn!and no more threads are started for it. The check runs on the spawned thread, as the write already did, not under the title's fault.victory-gpudepends onvictory-coredirectly (no cycle:victory-corehas no workspace dependencies, and it was already built forvictory-gputhroughvictory-pipeline;victory-loadercalls the same function directly).Cargo.lockgains the one edge.sites_are_not_written_into_the_source_tree: a path underCARGO_MANIFEST_DIRis refused, a temp path accepted.Tests:
cargo test -p victory-gpu --locked(327 passed, 0 failed, 34 ignored).cargo build --locked -p victory --features diagnosticsbuilds. No new Clippy warnings intitlewrite.rs.Note: the refusal is decided once per process, so changing the variable mid-run has no effect (the variable is read at startup in practice).
🤖 Generated with Claude Code
Imported from avatarmanz/VIctory-7900XTX. Originally posted by avatarmanz on 2026-11-26T07:55:40Z.
Merged into main in the next push (tests pass); thanks.