Skip to content

feat(prebuilt): pack the objects.json unit manifest so a published tree is servable (#2196 cell 3b) - #2201

Merged
zackees merged 3 commits into
mainfrom
agent/2196-pack-manifest
Nov 28, 2026
Merged

zackees merged 3 commits into
mainfrom
agent/2196-pack-manifest

Conversation

@zackees

@zackees zackees commented Nov 27, 2026

Copy link
Copy Markdown
Member

What

fbuild __prebuilt-pack produced an archive that nothing could hydrate: the client hydrates a unit only when the served tree carries objects.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::pack now writes objects.json into the archive (schema: 1, units: {unit-id: object-file}, OBJECTS_MANIFEST/MANIFEST_SCHEMA exported). 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.
  • Refusals at the publisher, not at the user's build: a unit naming an object the tree does not hold (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 an objects.json (would be shadowed) all fail before a byte is written.
  • Object names are never hand-written. --units takes one <unit-id><TAB><source-path> line per compiled unit and the builder derives each object with the same CompilerBase::object_path the 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.
  • Packed gains units; entries now 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 test a_packed_tree_hydrates_through_the_real_publisher: a tree packed by the real pack, extracted by the real extract, then hydrated — the published bytes land at this host's own object path.
  • fbuild-cli --bin fbuild prebuilt 9 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 --check clean; ci/enforce_platform_boundary.py --print-totals → rows=0; dylint_rows=0.
  • RED-proven: with append_manifest neutered the client test fails with served tree has no objects.json: No such file or directory; restored (touch) → green.
  • soldr cargo clippy never got the build lease (phantom forge-ci-paired-worker-205f947 root-maintenance.lock, 30 s bound), so CI's Dylint Full is the compile/lint gate here — stated rather than guessed.

fbuild-cli gains tar/zstd as 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 (--fingerprint is still an input, so no published artifact is self-verifying), and the cold/warm bench hook that #1882 still wants.

…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.
fbuild steward 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.
@zackees
zackees added this pull request to the merge queue Nov 27, 2026
Merged via the queue into main with commit 0d1f6e4 Nov 28, 2026
33 checks passed
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

1 participant