victory-gpu: seven diagnostics writers refuse a path inside the source tree (capture, timeline, pop, memory dump, fault book, light probe, texture store) #283
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!283
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-283"
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 14:21 UTC · original
sharan104:fix/capture-audit→main· +58 −4 · 8 files · 4 commits · open
docs/asset-policy.md: everything written from the title's data must go throughvictory_core::ensure_outside_repo. Seven diagnostics writers invictory-gputook a path from a variable and wrote there with no check. Withscripts/play.ps1's working directory (the repository root), a relative name put the output in the checkout, wherecargo xtask policylets small text and image-free files through.VICTORY_CAPTUREcapture.rsVICTORY_TIMELINEtimeline/report.rsVICTORY_POP_FOLDERpopwatch.rsVICTORY_MEMORY_DUMPmemory.rsVICTORY_FAULT_BOOKfaultbook.rsVICTORY_LIGHT_PROBElightprobe.rsVICTORY_TEXTURE_STOREtexstore.rsFix: a shared helper,
crate::switch::outside_repo(name, path)(Windows only, like the writers). Each writer calls it once where its path is first read, and keeps the answer in its existingOnceLock, or a new one where there was none. A refused path gets onewarn!, nothing is written, and that feature stays off.VICTORY_CAPTUREandVICTORY_TIMELINEuse the same helper.titlewrite'sVICTORY_WRITE_SITES(#89) keeps its own copy.Left out on purpose:
VICTORY_SHADER_SAVE(pipeline.rs) needs the same check. It's left out only because #205 moves that block, so whichever of the two merges second should add it.Tests:
switch::tests::nothing_is_written_into_the_source_tree: a folder inside the crate is refused and a temp folder is accepted.timeline::report::tests::a_timeline_is_not_written_into_the_source_tree: one writer end to end. Both files would land inside the crate without the check, and a file outside the repo is still written.Both fail with the check stubbed out, and pass 10 runs out of 10 with it. The other writers read their variable inside a
OnceLock, so a per-writer test would mean changing the process environment; the shared helper's test covers them instead.Results:
cargo test -p victory-gpu --locked --features diagnosticspasses, and so does the default build.-D warningsadds nothing beyond main's existingwatch.rsunnecessary_mut_passed, which #241 fixes.🤖 Generated with Claude Code
victory-gpu: six diagnostics writers refuse a path inside the source tree (capture, timeline, pop, memory dump, fault book, light probe)to victory-gpu: seven diagnostics writers refuse a path inside the source tree (capture, timeline, pop, memory dump, fault book, light probe, texture store)View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.