VICTORY_WRITE_SITES: refuse a file inside the source tree (#33) #89
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!89
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@sharan104 on GitHub · 2026-11-26 02:51 UTC · original
sharan104:fix/33-write-sites-outside-repo→main· +39 −4 · 3 files · 1 commits · merged 2026-11-26 08:17 UTCFixes #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
@avatarmanz on GitHub · 2026-11-26 07:55 UTC · original
Merged into main in the next push (tests pass); thanks.