Repository navigation
feat(prebuilt): pack the objects.json unit manifest so a published tree is servable (#2196 cell 3b) - #2201
Merged
Conversation
…ee is servable (#2196 cell 3b) The builder could mint archives nothing could hydrate: the client hydrates a unit only when the served tree carries objects.json (unit id -> object file), and pack wrote neither that manifest nor the unit set. pack now writes it, requires it, and refuses a unit naming an object the tree does not hold, an id that could address a path outside the tree, a duplicate unit id, or a tree that already holds a manifest. `__prebuilt-pack --units` takes `<unit-id><TAB><source-path>` lines and derives each object name with the same CompilerBase::object_path the client hydrates to, so object names are never hand-written.
added 2 commits
November 27, 2026 14:29
The manifest assertions grew the pack round-trip test to 104 lines and Dylint Full failed on clippy::too_many_lines; the check is now a helper the test calls.
… bound Two helpers (extracted-entry equality; the archive's own manifest) replace the inline assertions, so the test body is 84 lines with real headroom instead of 101. The end-to-end manifest check lives in fbuild-build-esp.
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
fbuild __prebuilt-packproduced an archive that nothing could hydrate: the client hydrates a unit only when the served tree carriesobjects.json(unit id → object file), and the packer wrote neither that manifest nor any record of the unit set. So every artifact the builder could mint was unservable — the last gap between "#1882's ladder exists" and "a published tree is consumable".This is #2196 cell 3b. #2196 stays open.
The change
prebuilt::packnow writesobjects.jsoninto the archive (schema: 1,units: {unit-id: object-file},OBJECTS_MANIFEST/MANIFEST_SCHEMAexported). It is required and non-empty: a tree without it is not servable, so the builder refuses instead of producing an archive that fails at a user's first build.MissingObject), a unit id or object name that could address a path outside the tree (.., absolute,C:, empty segment, control char), a duplicate unit id, and a tree that already holds anobjects.json(would be shadowed) all fail before a byte is written.--unitstakes one<unit-id><TAB><source-path>line per compiled unit and the builder derives each object with the sameCompilerBase::object_paththe client hydrates to. The names are not portable (they fold the source's own path in), which is exactly why the id → name relation has to travel in the archive.Packedgainsunits;entriesnow counts every archive entry including the manifest.Evidence (real output)
prebuilt::89 passed / 0 failed (packages-fetch lib) — manifest content, determinism still holds byte-for-byte, missing object, unsafe ids (../,..,cores//,C:/, empty), duplicate unit, occupied manifest.prebuilt_core::11 passed / 0 failed (build-esp lib), including the new cross-crate testa_packed_tree_hydrates_through_the_real_publisher: a tree packed by the realpack, extracted by the realextract, then hydrated — the published bytes land at this host's own object path.fbuild-cli --bin fbuild prebuilt9 passed / 0 failed — the archive on disk really carries the manifest, and a unit whose source never produced an object is refused with nothing written.cargo fmt --checkclean;ci/enforce_platform_boundary.py --print-totals→rows=0; dylint_rows=0.append_manifestneutered the client test fails withserved tree has no objects.json: No such file or directory; restored (touch) → green.soldr cargo clippynever got the build lease (phantomforge-ci-paired-worker-205f947root-maintenance.lock, 30 s bound), so CI'sDylint Fullis the compile/lint gate here — stated rather than guessed.fbuild-cligainstar/zstdas dev-dependencies only, to read back the archive it writes.Note for the remaining cell
With this landed the ladder is end-to-end: plan → query → serve → hydrate, and the publisher can now mint a tree the client accepts. What still does not exist is a producer that emits the fingerprint inputs (
--fingerprintis still an input, so no published artifact is self-verifying), and the cold/warm bench hook that #1882 still wants.