Repository navigation
build: pin moving-branch dependencies and list quality files from git - #5230
Conversation
stb, meshoptimizer, glm, sol2, googletest and LuaJIT tracked a branch with GIT_SHALLOW, so every re-configure of an existing build directory ran FetchContent's update step. Once upstream moved under a shallow checkout the fetch left the old and new tips without a merge base and the rebase failed with add/add conflicts, failing the configure. Each is now pinned to a full commit hash, which the update step treats as a no-op without contacting the remote. A hash cannot be combined with GIT_SHALLOW, so these are full clones. stb's three declarations become one include. RtAudio and RtMidi stay on their branch: they are patched in place under UPDATE_DISCONNECTED and never run the update step. irreden_collect_quality_files walked its search roots with a CONFIGURE_DEPENDS glob, so a C/C++ file appearing anywhere under a root, ignored directories included, re-configured the whole build. The file set now comes from git ls-files (tracked plus untracked and not ignored), with the glob as the fallback outside a git work tree, and a quality-file-lists target rewrites the lists each time a quality target runs so they stay current without a configure dependency. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Perf gateHead host slug: perf comparison: 88f4fda → d3dd16d-cibaseline: host calibration
thresholds: regress ≥ 10%, improve ≥ 5% voxel cull effectiveness
frame timing (ms)
GPU frame timing (ms; separate from stage samples)
GPU stage timing (avg ms per sampled invocation)
top CPU systems by avg ms (head)
|
| pipeline | system | avg ms (base→head) |
|---|---|---|
| RENDER | SingleVoxelToCanvasFirst |
295.877 → 299.201 (+1.1%) |
| RENDER | CanvasToFramebuffer |
38.061 → 38.876 (+2.1%) |
| RENDER | ComputeLightVolume |
33.464 → 34.347 (+2.6%) |
| RENDER | BakeSunShadowMap |
10.008 → 10.267 (+2.6%) |
| UPDATE | FogRevealEval |
6.533 → 6.420 (-1.7%) |
| UPDATE | PropagateTransform |
4.642 → 4.729 (+1.9%) |
| RENDER | ComputeVoxelAO |
4.341 → 4.427 (+2.0%) |
| RENDER | UpdateVoxelSetChildren |
2.881 → 2.974 (+3.2%) |
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1
| pipeline | system | avg ms (base→head) |
|---|---|---|
| RENDER | SingleVoxelToCanvasFirst |
988.226 → 993.147 (+0.5%) |
| RENDER | CanvasToFramebuffer |
57.479 → 58.153 (+1.2%) |
| RENDER | ComputeLightVolume |
29.481 → 29.290 (-0.6%) |
| RENDER | ComputeVoxelAO |
10.735 → 11.290 (+5.2%) |
| RENDER | BakeSunShadowMap |
8.782 → 8.855 (+0.8%) |
| UPDATE | FogRevealEval |
6.420 → 6.115 (-4.8%) |
| UPDATE | PropagateTransform |
4.428 → 4.408 (-0.5%) |
| RENDER | UpdateVoxelSetChildren |
2.919 → 2.954 (+1.2%) |
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1
| pipeline | system | avg ms (base→head) |
|---|---|---|
| RENDER | SingleVoxelToCanvasFirst |
336.427 → 343.341 (+2.1%) |
| RENDER | CanvasToFramebuffer |
59.909 → 61.856 (+3.2%) |
| RENDER | ComputeSunShadow |
54.342 → 57.927 (+6.6%) |
| RENDER | LightingToTrixel |
36.057 → 37.601 (+4.3%) |
| RENDER | ComputeLightVolume |
32.463 → 33.496 (+3.2%) |
| RENDER | BakeSunShadowMap |
22.601 → 23.204 (+2.7%) |
| RENDER | FogToTrixel |
7.153 → 7.363 (+2.9%) |
| RENDER | ComputeVoxelAO |
6.127 → 6.386 (+4.2%) |
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1
| pipeline | system | avg ms (base→head) |
|---|---|---|
| RENDER | SingleVoxelToCanvasFirst |
1506.783 → 1509.732 (+0.2%) |
| RENDER | CanvasToFramebuffer |
84.594 → 85.117 (+0.6%) |
| RENDER | ComputeLightVolume |
29.056 → 29.162 (+0.4%) |
| RENDER | ComputeVoxelAO |
8.777 → 9.121 (+3.9%) |
| RENDER | BakeSunShadowMap |
8.915 → 8.852 (-0.7%) |
| UPDATE | PropagateTransform |
6.029 → 6.311 (+4.7%) |
| UPDATE | FogRevealEval |
5.531 → 5.894 (+6.6%) |
| UPDATE | PeriodicIdle |
2.988 → 3.018 (+1.0%) |
jakildev
left a comment
There was a problem hiding this comment.
Review — build: pin moving-branch dependencies and list quality files from git
Verdict: needs-fix
The quality-file collection and dependency pins are well covered, but the LuaJIT cache-option rename silently drops an existing supported override.
Needs-fix
engine/script/third_party/luajit/CMakeLists.txt:22— replacingIR_LUAJIT_GIT_TAGwithIR_LUAJIT_GIT_REFmeans an existing build configured with a non-default legacy override now ignores that choice and silently switches to the new pinned commit on reconfigure. Preserve non-default legacy values (while deliberately treating the old defaultv2.1as the migration case), give the new variable precedence, and add a regression case for a cached custom legacy ref.
Praise
- The file-list refresh is exercised through the real custom-target dependency, including ignored post-configure additions and the no-
VerifyGlobs.cmakecontract. - Centralizing the three stb declarations removes a real first-declaration-wins hazard.
Checked
- Read the complete PR body, commit metadata, discussion, reviews, and inline-comment thread; there is no linked issue or prior discussion.
- Checked out and reviewed exact head
4640ae3832ebb3fe66d2a5e73cc2466482484a36, including all changed files and the Opus-only lifetime/concurrency/cache checks. bash scripts/fleet/tests/test_quality_files_gitignore.sh: 18 passed, 0 failed.fleet-build --target header-checks: passed; 876 headers and 175 shaders scanned.- GitHub: fleet-tests, perf-gate, format-check, header-checks, and the other completed checks pass;
linux-buildand aggregateall-checkswere still pending at review time.
Test plan the author should run before merge
- Add and run a cache-migration regression proving a non-default
IR_LUAJIT_GIT_TAGremains effective whenIR_LUAJIT_GIT_REFis empty, while the old defaultv2.1migrates to the pinned commit. - Re-run the focused quality-file suite and wait for
linux-build/all-checksto complete on the amended head.
🤖 Reviewed by Codex GPT-5 (opus class, review-pr skill)
Opus recheck not required (reviewed at opus class).
The LuaJIT ref resolution moves to resolve_git_ref.cmake. IR_LUAJIT_GIT_REF still wins; with it empty, a non-empty IR_LUAJIT_GIT_TAG other than its old cached default v2.1 is built, with a deprecation warning, so an existing build directory configured with a custom ref keeps it. A cached v2.1 resolves to the pin and is dropped from the cache. test_luajit_git_ref_resolution.sh configures a directory with the old declaration, then reconfigures it with the module, for the default, custom, and precedence cases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Perf gateHead host slug: perf comparison: 69fca9e → 6ebd115-cibaseline: host calibration
thresholds: regress ≥ 10%, improve ≥ 5% voxel cull effectiveness
frame timing (ms)
GPU frame timing (ms; separate from stage samples)
GPU stage timing (avg ms per sampled invocation)
top CPU systems by avg ms (head)
|
| pipeline | system | avg ms (base→head) |
|---|---|---|
| RENDER | SingleVoxelToCanvasFirst |
219.587 → 222.419 (+1.3%) |
| RENDER | ComputeLightVolume |
25.633 → 25.954 (+1.3%) |
| RENDER | CanvasToFramebuffer |
25.042 → 24.944 (-0.4%) |
| UPDATE | FogRevealEval |
8.013 → 8.623 (+7.6%) |
| RENDER | BakeSunShadowMap |
5.958 → 5.963 (+0.1%) |
| UPDATE | PropagateTransform |
3.601 → 3.764 (+4.5%) |
| UPDATE | LuaWaveStateToOffset |
2.725 → 3.347 (+22.8%) ⚠ |
| RENDER | UpdateVoxelSetChildren |
2.566 → 3.109 (+21.2%) ⚠ |
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1
| pipeline | system | avg ms (base→head) |
|---|---|---|
| RENDER | SingleVoxelToCanvasFirst |
723.097 → 730.106 (+1.0%) |
| RENDER | CanvasToFramebuffer |
35.845 → 36.648 (+2.2%) |
| RENDER | ComputeLightVolume |
22.987 → 22.469 (-2.3%) |
| UPDATE | FogRevealEval |
7.998 → 7.789 (-2.6%) |
| RENDER | ComputeVoxelAO |
7.066 → 7.125 (+0.8%) |
| RENDER | BakeSunShadowMap |
5.269 → 5.125 (-2.7%) |
| UPDATE | PropagateTransform |
3.460 → 3.545 (+2.5%) |
| RENDER | UpdateVoxelSetChildren |
2.843 → 3.021 (+6.3%) |
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1
| pipeline | system | avg ms (base→head) |
|---|---|---|
| RENDER | SingleVoxelToCanvasFirst |
236.960 → 236.823 (-0.1%) |
| RENDER | CanvasToFramebuffer |
36.139 → 36.570 (+1.2%) |
| RENDER | ComputeSunShadow |
29.622 → 29.848 (+0.8%) |
| RENDER | ComputeLightVolume |
24.279 → 24.416 (+0.6%) |
| RENDER | LightingToTrixel |
18.460 → 18.601 (+0.8%) |
| RENDER | BakeSunShadowMap |
8.197 → 8.233 (+0.4%) |
| UPDATE | FogRevealEval |
6.799 → 7.461 (+9.7%) |
| UPDATE | PropagateTransform |
4.704 → 4.747 (+0.9%) |
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1
| pipeline | system | avg ms (base→head) |
|---|---|---|
| RENDER | SingleVoxelToCanvasFirst |
1098.407 → 1109.585 (+1.0%) |
| RENDER | CanvasToFramebuffer |
44.368 → 44.563 (+0.4%) |
| RENDER | ComputeLightVolume |
22.118 → 22.725 (+2.7%) |
| UPDATE | FogRevealEval |
6.842 → 7.643 (+11.7%) ⚠ |
| RENDER | ComputeVoxelAO |
5.722 → 5.842 (+2.1%) |
| RENDER | BakeSunShadowMap |
5.252 → 5.281 (+0.6%) |
| UPDATE | PropagateTransform |
4.877 → 4.863 (-0.3%) |
| RENDER | UpdateVoxelSetChildren |
2.772 → 3.010 (+8.6%) |
|
Addressed feedback:
— worker |
jakildev
left a comment
There was a problem hiding this comment.
Re-review — build: pin moving-branch dependencies and list quality files from git
Verdict: approve
The amendment fully resolves the LuaJIT cache-migration finding without introducing unrelated executable changes.
Praise
resolve_git_ref.cmakemakes the precedence and migration policy explicit, and the regression suite exercises fresh, legacy-default, custom-legacy, and new-over-legacy cases across repeated reconfigures.
Checked
- Read the complete PR discussion, prior review, author response, commit metadata, and inline-comment thread; there is no linked issue or inline discussion.
- Reviewed the amendment from
4640ae3832ebb3fe66d2a5e73cc2466482484a36through exact headaea41788156c8c825662a1758376784b25651aa0; the prior custom-override loss is fixed and the amendment contains no unrelated changes. bash scripts/fleet/tests/test_luajit_git_ref_resolution.sh: 16 passed, 0 failed.bash scripts/fleet/tests/test_fleet_tests_workflow_paths.sh: 102 passed, 0 failed.- GitHub: all current checks, including
linux-build,fleet-tests, and aggregateall-checks, are green.
🤖 Reviewed by Codex GPT-5 (review-pr skill)
Opus recheck not required.
Summary
Two build-system fixes for existing build directories.
GIT_SHALLOW. Every re-configure ran FetchContent's update step, and once upstream moved under a shallow checkout it failed withFailed to rebase … CONFLICT (add/add)/Build step for stbimage failed: 2. Each is now pinned to the commit a fresh clone resolved to on 2026-11-21, so a re-configure neither contacts the remote nor rebases.CONFIGURE_DEPENDSglob, so a C/C++ file appearing anywhere under a root (an ignored virtual environment or build tree included) re-configured the whole build. The file set now comes fromgit ls-files, and the lists are rewritten each time a quality target runs.Screenshots
No visual change intended: build-only, and the pinned stb and meshoptimizer commits are the ones a fresh clone already resolved.
fleet-run IRShapeDebug --auto-screenshot 10on the fresh build:RESULT=CLEAN, 28 shots written.render-verifywas not gradeable on this host (ENV-FAIL: display domain mismatch, display asleep).Test plan
9600522, unmodified tree:rc=1,Failed to rebase, 10+CONFLICT (add/add)lines. Same directory, this branch:rc=0, stb at6b5799b, LuaJIT at96f7b29.https://unreachable.invalid/…:rc=0, no remote access attempted. Control-DIR_LUAJIT_GIT_REF=v2.1(a branch) in the same directory:rc=1,Could not resolve host.fleet-build --target IRShapeDebugfrom a fresh build directory on macOS:rc=0, all six pinned dependencies cloned at their pinned commit;img_diffandjitter_probe(the other two stb consumers)rc=0.fleet-build --target header-checksin that directory:rc=0, 876 headers and 175 shaders scanned;format-changed:rc=0.cmake -P cmake/run_header_checks_standalone.cmakeandrun_clang_format_changed_standalone.cmake:rc=0, 1360 files on the style list.creations/..venv/, then one more header added there: list is 2 entries both before and after; before,CMakeFiles/VerifyGlobs.cmakeis present and the next build re-configures; after, it is absent and the build does not.bash scripts/fleet/tests/test_quality_files_gitignore.sh: 18 passed, 0 failed (11 new assertions).bash scripts/fleet/tests/test_luajit_git_ref_resolution.sh: 16 passed, 0 failed. Each migration case configures a build directory with the oldIR_LUAJIT_GIT_TAGdeclaration, then reconfigures it with the new module. Cachedv2.1resolves to the pin and is dropped from the cache. A cached custom ref keeps building, with a deprecation warning, across two reconfigures.IR_LUAJIT_GIT_REFwins over it, and clearingIR_LUAJIT_GIT_REFfalls back to it. Positive control: the previous resolution logic fails 5 of the 16 assertions.fleet-build --target IRShapeDebugon an existing build directory that cachedIR_LUAJIT_GIT_TAG=v2.1:rc=0, the entry is gone fromCMakeCache.txt, and LuaJIT is checked out at96f7b29.test_format_changed_diff_root.sh12 passed,test_format_changed_standalone.sh15 passed,test_format_changed_line_scoping.sh18 passed,test_header_checks_standalone.sh167 passed,test_fleet_tests_workflow_paths.sh102 passed,test_workflow_paths_sync.sh24 passed.Reviewer notes
Notes for reviewer
GIT_SHALLOW: the shallow clone holds only branch and tag tips, so the checkout would break on the first upstream commit after the pin. The pinned six are therefore full clones. Measured cost for the largest (glm): 83 MB vs 32 MB, 3.4 s vs 3.3 s.GIT_TAG master. Both are patched in place underUPDATE_DISCONNECTED, so their update step never runs and they do not have this failure. Pinning them is not safe in this PR: withUPDATE_DISCONNECTED, aGIT_TAGthe existing checkout does not hold is a fatal configure error (Requested git ref … is not present locally), reproduced here. The exception is recorded at the declaration.IR_LUAJIT_GIT_REF(empty = the pinned commit), matchingIR_ENKITS_GIT_REF. The deprecatedIR_LUAJIT_GIT_TAGis still honoured below it (resolve_git_ref.cmake), with one exception:v2.1. That value was the old cached default, so every existing build directory holds it without anyone having chosen it. It resolves to the pin and is removed from the cache. The cost: a user who deliberately setIR_LUAJIT_GIT_TAG=v2.1now gets the pin, and has to useIR_LUAJIT_GIT_REF=v2.1to stay on the branch.cmake/ir_fetch_stb.cmake, included from all three.git check-ignorepass after the glob), so the final lists do not change. What changes is that ignored trees are no longer walked or registered as configure dependencies.docs/agents/BUILD.mdis already over its instruction-size budget, so the pin policy is stated in the rootCMakeLists.txtbeside the other FetchContent settings.fleet-pr-overlap --base master:VERDICT: overlap, both trial merges clean. Rows:#4921 test/CMakeLists.txt clean,#5161 test/CMakeLists.txt clean.🤖 Generated with Claude Code