Repository navigation
First light: each prepare stages into its own folder so concurrent runs do not collide (BUILD-1053) - #3772
First light: each prepare stages into its own folder so concurrent runs do not collide (BUILD-1053)#3772Koro4e wants to merge 1 commit into
Conversation
|
This PR overlaps #3689 (@Sc4ros), which was opened earlier for the same BUILD-1053 item and is a draft that depends on #3577. In #3574, the coordinator asked @Koro4e to keep one of the two First Light items and leave BUILD-1053 to @Sc4ros. #3771 is already open for BUILD-1052. The two PRs fix the shared
They conflict: merging this PR onto #3689's head ( |
|
Tested at the head ( The staging fix is right: Two notes, so the "concurrent runs do not collide" claim is accurate:
Approve with those documented or fixed. AI-assisted review, no game files, no GPU. |
|
A review note from the other BUILD-1053 PR, #3689. I'm closing it in favour of this one: yours came first and handles the reported case cleanly. Per-run staging fixes the case shdann found: two prepares with separate
What #3689 did for 1 and 2 (take any of it you like; same project, same licence):
If you'd rather keep this PR to the staging change, I can open a small follow-up on top of it once it lands (claimed on the coordination issue first). Not tested here: I read the diff but did not run this branch, because it conflicts with current AI-assisted (Claude Code). |
0ef0c11 to
7a27946
Compare
|
Status after the overnight reviews: the rebased change is ready locally (5151bf3a on current main 3faac55): translate() stages each prepare into prepare-XXXX and no longer calls reset_run_folders (that would race two concurrent runs), keeps the symlink/junction refusal, main() removes the folder in a finally block. RunFolderTests now checks old shared leftovers are ignored, and the refusal test goes through main(); OverlappingPrepareTests still fails on main with 'translator has no vs result for first'. 29 tests run / 4 skips, all pass. Thanks @Sc4ros for closing #3689 in favour of this one and for the carve + same---out notes; those remain shared by design and I agree they belong in a separate claimed follow-up. Publication hit the same fork-sync problem as #3771 (fork 4,597 commits behind, push blocked, sync API needs |
|
Tested
Not run: other GPUs/vendors, Linux, the Vulkan validation layer (not installed). No game files. AI-assisted (Claude Code). |
…ns do not collide (BUILD-1053)
|
Rebased onto current main (8575d36) - the conflicts with the round-44 merge were resolved locally, tests pass locally (package-gated skips unchanged). Head updated on the fork. |
|
Tested
Not run: AI-assisted. |
|
Independent macOS arm64 check of 0630d81, CPython 3.13.18. I ran the overlapping-prepare regression against unmodified upstream 48ff424 as a negative control. With a shared work folder and separate outputs it failed because the first prepare lost its selected vertex shader. On this PR head the same regression passed 10 consecutive runs, including both published manifests and staging-folder cleanup. The first-light suite passed 44 tests. Three prepared-package tests and one optional harness test were skipped. The concurrency check used the synthetic tool stand-ins. AI-assisted with Codex. |
Closes BUILD-1053 (finding @shdann). Claim: #3574 comment 7085952474.
translate()staged into the sharedwork/first_light/dxbcandwork/first_light/spirvfolders, so a secondprepare sharing
--workwith a different--outreplaced the first run's staged index and translator resultswhile it was in flight: run A exited with "translator has no ps result for first" after B published its pair.
Every call now stages into a unique
prepare-XXXXfolder underwork/first_lightand returns it;main()copies the
.spvresults from there and removes the folder once published. A failed run keeps its folder fordiagnosis. This also makes each run immune to another run's stale leftovers (adjacent to, and superseding part
of, the sequential empty-dirs fix in #3577 - happy to reconcile with @zzEmmazz if both move).
Regression test in
OverlappingPrepareTests: run A starts, a full second prepare runs synchronously at A'sfirst tool call (after staging, before the unpack reads), then A resumes. On the old layout it fails with the
reported symptom; now both runs publish their own pair and the staging folders are cleaned up. The
shared-path assumption in
ShaderPreparationTestsnow reads the staging folder from the tool's argv.Tests:
python -I tests/test_first_light.py12 OK / 3 package-gated skips. Tool calls are stand-ins; staging,orchestration and shader selection are real, per the finding. No game files, no GPU.
AI-assisted (Claude Code).