fix: harden the LOD manifest-builder lane - #3
Merged
eordano merged 2 commits intoJul 16, 2026
Conversation
Overwrite read-only files when seeding the manifest-builder workdir (a nix-store copy preserves 444 and poisons every rebuild) and pass the pipeline catalyst explicitly to the npm child via --catalyst, so an inherited CATALYST_URL from the service environment can no longer point scene fetches at the wrong server and emit empty-scene LODs.
Wrap the let-else per rustfmt. Replace set_readonly(false) with an explicit owner-write mode bit on unix (permissions_set_readonly_false is denied by CI clippy). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two independent failure modes in the JIT LOD lane's
scene-lod-entities-manifest-builderstep, both found by driving a deployment end-to-end:Read-only workdir poisoning.
copy_treeseeds the builder workdir withfs::copy, which preserves source permissions. When the tool dir lives in a read-only store (e.g. a Nix package, mode 444), the copied files land read-only; if a first run is interrupted, every later rebuild fails atcopy package.json: Permission denied— permanently, since the copy can never overwrite its own read-only output. Every LOD request then 404slod-build-failed.Inherited
CATALYST_URL. The npm child inherits the whole service environment, and the tool resolves its content server fromCATALYST_URL— a generic name that deployments commonly set for other services on the same host. When the inherited value points at something that isn't a catalyst content API, the scene run completes with zero entities and the lane emits tiny empty-scene LOD bundles, cached as success — worse than the failure case.Fix
copy_treeclears the read-only bit on the destination before and after each copy, so a poisoned tree self-heals and store-sourced trees stay writable.--catalyst=<base>(npm exposes it asnpm_config_catalyst, which the tool already prefers overCATALYST_URL), deriving the base by stripping a trailing/contentfrom the pipeline's content URL. Inherited environment can no longer redirect scene fetches.acquire_placements/run_manifest_buildergain a catalyst parameter; all callers updated.Verification
catalyst_basecase.package.json) andCATALYST_URLpointing at a dead port,abgen-lod generateon a production scene builds real placements and passes the 32-check self-gate; before the fix the same setup failed instantly (case 1) or emitted empty-scene bundles (case 2).🤖 Generated with Claude Code