Skip to content

feat(build_info): record the prebuilt_libs decision (#2196 cell 4) - #2200

Open
zackees wants to merge 1 commit into
mainfrom
agent/2196-build-info
Open

zackees wants to merge 1 commit into
mainfrom
agent/2196-build-info

Conversation

@zackees

@zackees zackees commented Nov 27, 2026

Copy link
Copy Markdown
Member

What

#2196 cell 4: every ESP32 build now records the prebuilt serving-ladder decision in build_info_<env>.json as prebuilt_libs: {used, source, key, sha256} (plus reason), per decision 1 of docs/design/artifact-serving-decisions.md. This is the last piece #1882's cold/warm hook needs — with it, the benchmark can tell its prebuilt arm from its source arm by reading the build output alone.

"prebuilt_libs": {
  "used": true,
  "source": "https://…/v1/…core.tar.zst",
  "key": "arduino-esp32/3.3.12/esp32c3/fp-0123456789abcdef",
  "sha256": "0123…",
  "reason": null
}

A build that compiles from source records used: false and keeps the ladder's own reason (reason: null when the opt-in was off, so "never asked" and "asked and declined" stay distinguishable). key is the identity the publisher uploads under — the same {framework}/{version}/{arch}/fp-<sha16> relative path prebuilt::tree_root extracts into.

How

  • New crates/fbuild-build-engine/src/prebuilt_record.rs: PrebuiltLibsRecord with source(..)/served(..) constructors and its own serde + emitter tests.
  • BuildInfo gains prebuilt_libs: Option<PrebuiltLibsRecord> with skip_serializing_if, following the shrink precedent, so a platform that never consults the ladder (every non-ESP32 one) keeps its JSON byte-identical.
  • shrink_link::emit_build_info takes the record and attaches it; build.rs passes it.
  • prebuilt_core::consult_and_hydrate now returns the Outcome instead of just the log lines, with Outcome::record() (the build_info block) and Outcome::log_into(..); Outcome::silent() marks "prebuilt was never considered" (no line, used: false).

Evidence (real output)

  • soldr cargo test -p fbuild-build-engine --lib → 607 passed; 0 failed; 6 ignored
  • soldr cargo test -p fbuild-build-esp --lib → 282 passed; 0 failed; 7 ignored (10 in prebuilt_core, 4 new)
  • soldr cargo fmt --all --check clean; ci/enforce_platform_boundary.py --print-totals → rows=0; dylint_rows=0
  • RED proven: neutering with_prebuilt_libs to ignore its argument fails the_emitted_build_info_carries_the_block (assertion left == right failed); restored + touch, green again.

Local soldr cargo check -p fbuild-build and clippy never got the build lease (phantom remote worker forge-ci-paired-worker-205f947/…/root-maintenance.lock, 3 attempts), so Build fbuild + Dylint Full in CI are the compile gate for this PR.

#2196 stays open: cell 3b (the packer must write objects.json and the pinned fingerprint inputs) is still missing, so no published tree is consumable yet.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant