You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement the opt-in v1 prebuilt framework artifact slice for arduino-esp32 on esp32dev and esp32-s3-devkitc-1.
Plan: canonical exact framework build fingerprints; Catalog shards produced from prebuilt bucket sidecars; a self-contained Catalog Index/shard reader preserving the shared mirror reader unchanged; daemon-owned single-flight fetch, streaming integrity-checked extraction, Range/If-Range resume, staging/partial GC and disk-cache LRU; source fallback with one retry after a hit fails; per-request opt-in/kill-switch flags; manual artifact builder and cold/warm benchmark hook.
The Catalog reader intentionally duplicates the existing mirror loader: that loader rejects Catalog, exposes descriptors only in tests, and its stale-shard fallback does not verify against the current Index descriptor. The new helper checks descriptor SHA and exact size on every cached or fetched shard read. A follow-up should fix and unify these readers separately.
Validation: tests first with tempfile and real local HTTP fixtures, touched-crate tests, workspace clippy with warnings denied, documented local gate, fixture benchmark. Artifacts are withdrawn by deleting the bucket object, not merely regenerating the Index. Delivery is an unmerged PR; no workflow files or new crates.
Decision recorded; this issue now tracks the re-implementation
Pilot PR #1883 is being closed unmerged. The two questions that blocked it are decided in docs/design/artifact-serving-decisions.md §8 (PR #2136). This issue stays open as the single tracker for building the feature against that decision.
What was decided
Fingerprint — per-component content IDs taken in staging (core; SDK once per required variant; skeleton) plus a recipe number for compat patches. Not option (a) (one immutable install per chip duplicates the 2.6 GB core tree), and not the pilot's re-hash of the installed tree: tools/esp32-arduino-libs/ is shared by every MCU on a core version, so that hash depends on which other boards the user has built.
Flags — --no-prebuilt-libs / FBUILD_NO_PREBUILT_LIBS is the only public opt-out and covers core objects; hidden research opt-in --prebuilt-core / FBUILD_PREBUILT_CORE. --prebuilt / --no-prebuilt / FBUILD_PREBUILT must not ship.
Measure first. Name a real configuration whose framework compile is large enough to pay (the pilot's 60-TU fixture is break-even: 10.7–11.6 s hit vs 12.7–18.9 s source, and a 24.8 s cold hit from the real bucket). If no such configuration exists, close this issue as not worth building and say so.
Core, each SDK variant and the skeleton write an identity stamp in staging; compat patches run before the stamp; nothing mutates a component after it.
A component without a stamp yields no fingerprint and a source build; the build path never re-hashes an installed tree.
Tests 18–23 from §8 exist and were shown RED first: install-history independence, slice-vs-whole-bundle independence, no-identity-no-serving, interrupted install, flag plumbing (including --prebuilt / --no-prebuilt failing to parse), firmware.bin byte equality on each pilot board.
Default off; every failure (ineligible project, miss, transfer error, hash mismatch, link failure after a hit) ends in the source compile with exit 0.
Landed as several PRs, each of which adds code that something calls.
Reusable from the pilot
Tip c4b803933056bcc10e23ea8f177e92c73fec8802 stays reachable as refs/pull/1883/head. Cherry-pick with -x to keep authorship: fbuild-core::content_manifest, the streamed extract_with_manifest, the descriptor-verifying Catalog reader, daemon single-flight + Range/If-Range resume + staging GC, the canonical-argv / prefix-map planner. Not reusable: finalize_sdk_content_manifest and the tree:<hash> identity, the CLI flags, the publisher's key layout, the committed prebuilt-arduino-esp32 shard.
Waiting on the maintainer
Any publish to the mirror bucket needs explicit approval, so the "publish a pilot artifact and prove a real hit" step cannot be done by an agent.
The design is decided on main: docs/design/artifact-serving-decisions.md
§8 "Exact-fingerprint framework core objects (Implement experimental exact-fingerprint prebuilt framework serving v1 #1882)" landed in f3446342 (2026-11-21) and states Status: decided 2026-11-21, not
implemented. The blocker that ended the pilot — the framework tree is not
complete when the core archive is renamed — is answered by 8a: identity is
per component and is taken in staging (core in the core staging dir before
the atomic rename; SDK in the SDK extract dir after compat patches; MCU skeleton
in its extract dir), each written as a stamp inside its own subtree with a recipe integer. No hash of the installed tree, no backfill.
So the remaining work is the 8a implementation itself, in these units:
component stamp + content ID (path, bytes, exec bit, symlink target) written in
staging, with the core's subtree excluding tools/esp32-arduino-libs/ and tools/.libs-archives/;
move patch_mcu_compatibility ahead of the stamp so a component is never
mutated after it is stamped;
the planner emits no fingerprint for a component without a stamp (every
pre-existing install) and compiles from source;
the hidden --prebuilt-core / FBUILD_PREBUILT_CORE opt-in and the 8b ladder.
8c still holds and is not steward work: nothing is published until the
fingerprint is install-history-independent, and every upload needs explicit
maintainer approval. The three orphan objects the pilot uploaded are tracked in #2135.
No close keyword: this stays OPEN until 8a is implemented.
Also in #2166: patch_unless_stamped is the single guard for in-place patching — the ensure_mcu_libs early return no longer re-patches a complete skeleton, which closes the "nothing mutates a component after it is stamped" cell for the skeleton path.
Remaining cells unchanged: the hidden --prebuilt-core / FBUILD_PREBUILT_CORE opt-in, the 8b ladder, and any publish (maintainer approval, §8c). Added the enhancement label so this tracker stops reading as unclassified.
The skeleton's extracted tree is compat-patched first, then stamped, so the esp32c2 touch-header / esp_bt.h patches are inside the content id.
The merge re-checks the id and withdraws the stamp when it did not reproduce the staged bytes (partial destination tree) — such a tree keeps no identity instead of a false one.
patch_unless_stamped is now the single in-place-patch guard (a stamped tree is never mutated), which also removes ensure_mcu_libs' post-stamp re-patch on the early return.
Verification: soldr cargo test -p fbuild-library --lib 393 pass / 0 fail / 9 ignored (esp32_framework filter 58/58 at the final head), clippy -p fbuild-library --all-targets -D warnings exit 0, 24 pass / 9 skipped check-runs on the final head (Dylint Full, Crate Gate, LOC Gate, Boundary, Validate Boards all green), LOC 948 / 933 < 1000.
Still open on this tracker (not in #2166): the --prebuilt-core consumer flag (a flag with no consumer would add dead code), and the publish/bucket step, which is maintainer-only (doc/artifact-serving-decisions.md 8c). Nothing here closes the issue.
Steward tick 2026-11-24T03:1xZ — the stamp half of 8a is corrected and merged: PR #2167 -> d64af8ae.
Two defects in the component-identity work landed an hour earlier (#2162 core, #2164 SDK variant, #2166 MCU skeleton):
One stamp file per directory.component-identity.json sat at each component's root, but the SDK variant and the MCU skeleton of a chip both install into tools/esp32-arduino-libs/<mcu>/ (merge_skeleton_mcu_entries), so the second writer overwrote the first and read_stamp(root) could not say which component an identity belonged to.
The skeleton was re-verified by whole-tree equality, which on ESP32-C2 can never hold: the Arduino core archive ships a partialtools/esp32-arduino-libs/esp32c2/ that lacks FreeRTOS — that is why ensure_mcu_libs exists — so the merged directory is always a superset of the skeleton's staging tree. reconcile_stamp therefore always withdrew the skeleton's stamp, on exactly the MCUs skeletons exist for (C2, C61), and destroyed whatever stamp was in that file.
Now in main (d64af8ae):
item
behaviour
stamp file name
component-identity.<component>.json — one file per component, is_stamp_file recognises a stamp only at a component root
read_stamp / remove_stamp
take the component, so "the SDK variant's identity" and "the MCU skeleton's" are addressable in one directory; a stamp filed under another name is no identity
has_stamp(root)
"some component owns this tree" — the guard patch_unless_stamped uses, so no stamped tree is mutated in place
entries_survived(staged, installed, excluded)
re-hashes the staged tree's entries at the same relative paths on the installed side; supersets (another component's files) are invisible by design, a missing/changed entry withdraws the identity
content_id
excludes every component's stamp, so a co-located stamp never changes this component's id; the per-entry recipe is shared with entries_survived via hash_entry
Verification: soldr cargo test -p fbuild-packages-fetch --lib component_id 26 passed / 0 failed; soldr cargo test -p fbuild-library --lib esp32_framework 60 passed / 0 failed; clippy -p fbuild-packages-fetch -p fbuild-library --all-targets -D warnings exit 0; ci/test_enforce_platform_boundary 14 tests OK. RED first, proved by restoring each pre-fix behaviour and watching the new tests fail 0/1 (skeleton_identity_survives_a_preexisting_partial_tree_at_the_destination, a_skeleton_merge_keeps_the_sdk_variant_identity_that_shares_its_directory, two_components_share_one_directory_without_clobbering_each_other).
Still open on this tracker, unchanged: the planner half (a fingerprint assembler that emits no fingerprint for a component without a stamp — test 20 of decision 8), the hidden --prebuilt-core / FBUILD_PREBUILT_CORE opt-in and the 8b ladder, and any publish (maintainer approval, 8c). Nothing here closes the issue.
Steward tick 2026-11-24T04:1xZ — the framework term of the fingerprint is on main: PR #2168 -> 6a6dc07b (2026-11-24T05:21:59Z).
With the per-component stamps from #2162 / #2164 / #2166 / #2167 addressable, the 8a identity chain now has its first consumer.
piece
what it does
merged
component_id::component_term()
domain-tagged, TERM_SCHEMA-versioned hash over (component, version, content_id, recipe); sorted by component name, so it is order-independent, and hashes stamps only, so it is install-history independent. None for an empty identity list or a duplicated component name
requires the core stamp plus the sdk-<variant> stamp of every required variant (MCU + build.chip_variant, #1897); includes mcu-<mcu> when present; None for a legacy, half-installed or half-merged tree
the esp32 fast-path fingerprint now covers the framework bytes its flags point at. Before this, two different framework byte states landing the same paths hashed identically, so a stale fast path could be replayed; skip_serializing_if = "Option::is_none" leaves a legacy tree's metadata byte-identical
Verification (real output, head 784545e3): component_term 8 pass / 0 fail; framework_identity 6 pass / 0 fail (incl. install-history independence — building esp32dev into the same core tree leaves the esp32c3 term identical — and no-stamp-is-None); -p fbuild-build-esp --lib fingerprint 5 pass / 0 fail; full libs 401 + 317 pass; clippy on the three touched crates --all-targets -D warnings exit 0; the skeleton assertion proven RED 0/1 by deleting the inclusion. CI: 41 checks green after one Formatting fix and one rerun of the known runner-daemon flake (blake3/ring build.rs "lost the connection to the soldr daemon" while Dylint Full and all 9 ESP32 board builds were green at the same SHA). All nine board builds exercised the new metadata field end to end.
Remaining cells on this tracker: the 8b ladder (--prebuilt-core / FBUILD_PREBUILT_CORE, Catalog index/shard readers, daemon single-flight fetch + Range resume, retry-after-a-failed-hit) and any publish (§8c is a maintainer action). The flag is deliberately still absent: with no planner consuming a term yet it would be dead code, which the design document rejects.
Steward tick 2026-11-24T07:3xZ — the canonical prebuilt-core fingerprint is on main: PR #2169 -> 81a224de (2026-11-24T07:31:13Z, merge queue).
The identity chain (#2162 core, #2164 SDK variant, #2166 skeleton, #2167 per-component stamp files, #2168 framework term) can now be turned into a servable key. prebuilt_core.rs in esp32_framework hashes exactly the inputs decision 8 lists and nothing else:
item
behaviour
CoreBuildInputs
compiler ABI id, toolchain name/version, mcu, sdk_variant, units, config
CompileUnit / ConfigDigest
unit id + argv in invocation order; header id + sha256
Esp32Framework::prebuilt_core_plan(&inputs)
Option<PrebuiltCorePlan>; None unless the tree has an identity and every input is present
sorted by unit/header id, argv order preserved; None for an empty or unnamed list
Test-18/19/20 properties, each with its own test: install-history independence (another chip in the same core tree does not move this chip's key — the property the closed pilot's option (c) failed), install-path independence (two tempdirs, same content, one fingerprint), and no-identity-no-serving (an unstamped tree plans nothing and no stamp is written). Every field is length-prefixed and domain-tagged under ABI_SCHEMA = 1, so no two input tuples collide by shifting a character across a boundary.
The module documents the contract it cannot enforce: CompileUnit::argv must already be canonical (prefix-mapped, no temp dirs). A fingerprint that moves with the build directory can never be served to a second user, so the caller owns that, not this hash.
Verification (head 1080617c): prebuilt_core 7 pass / 0 fail; full -p fbuild-library --lib 408 pass / 0 fail (401 before); clippy --all-targets -D warnings exit 0; cargo fmt --all -- --check exit 0; boundary 14 tests OK and research --check rows=150 rc=0. RED proven, not asserted: replacing self.framework_identity(...)? with a constant makes an_unstamped_framework_never_plans and incomplete_inputs_never_plan FAIL 5/2; restored -> 7/7. A -D, a changed header digest, or a different toolchain version each move the fingerprint.
Still open on this tracker: the hidden --prebuilt-core / FBUILD_PREBUILT_CORE opt-in (unreachable without a fetch ladder, which is why no flag ships here), the eligibility predicate, the descriptor-verifying Catalog reader, the rung ladder with its fallout-to-source, and any publish (§8c is a maintainer action). No bucket key is rendered here either: decision 2 fixes the v1/ shape but the <product> name for core objects is not yet ruled.
Steward tick 2026-11-24T09:5xZ — decision 8b's flag surface is on main: PR #2170 -> ec5a8744 (2026-11-24T09:57:43Z, merge queue).
The fingerprint chain (#2162 core, #2164 SDK variant, #2166 skeleton, #2167 per-component stamps, #2168 framework term, #2169 canonical prebuilt_core_plan) had no switch to ask for it — git grep prebuilt_libs on main was 0 hits, so even decision 1's public opt-out did not exist. That gap is closed:
opt-out wins over the opt-in, whatever source either came from; env through fbuild_core::env_flag (canonical truth table — 1/true/yes/on, and a typo is off)
env is read at the CLI boundary (resolve_from_cli) and the explicit decision is reported once per build in the shrink_notice (#1459) style: the core opt-in warns that serving is not implemented yet and the framework compiles from source; the opt-out states the source compile. Default silent.
Design-doc test 22 is covered, one test each: the opt-in parses, the opt-out is global and parses before the subcommand, the two conflict, --prebuilt/--no-prebuilt/--prebuilt-libs-core are rejected, and --help documents the opt-out while never naming the hidden flag. Policy tests cover opt-out-wins in every flag×env combination, the env truth table ("" and the ture typo included) and the wire round trip. RED proven twice by mutation (dropping hide/conflicts_with → 0/2; flipping the resolve order → 2/6) then restored green.
Verification (real output, head 9f7ab590): soldr cargo test -p fbuild-cli --bin fbuild511 pass / 0 fail, -p fbuild-build-engine --lib prebuilt6 pass / 0 fail, boundary --print-totals rc 0, research inventory unchanged, ci.test_enforce_platform_boundary 14 OK. CI: Dylint Full pass 4m1s, linux / Check pass 19m23s, Formatting/Inventory/LOC/Monocrate/Boards/Uno/Teensy/Prooft/local-gate all pass, zero failures. (Local clippy was lease-blocked ~50 min by a sibling agent's soldr cargo dylint --workspace --target x86_64-pc-windows-msvc; the CI lanes above are its equivalent at the same SHA.)
Still open on this tracker (the remaining units): the fetch ladder (local verified cache → mirrors[] → source fallback), the bucket key for core objects (needs the <product> ruling), the per-request field on BuildRequest/daemon models, and the actual --prebuilt-core consumer in the esp32 orchestrator. No publish (8c: maintainer action).
Unit 6 of this issue is now on main: crates/fbuild-packages-fetch/src/prebuilt/{mod,reader,tests}.rs. The Reader pins exact size_bytesand SHA-256 for the Index and every per-tool shard descriptor and re-checks both on fresh cache, network fetch, and stale-cache fallback; a hit additionally requires exact tool/version/min_client_version/none-arch-abi/fp-<16> flavor, a fbuild-fp:<fp> provides match, a 64-hex asset SHA, and a single-stream URL list. This is stricter than the existing mirror reader, which rejects the Catalog kind and parses cached bytes without re-verifying against the current Index descriptor.
Tests at merge: prebuilt 6 passed / 0 failed (local axum fixtures, no network); crate --lib 323 passed / 0 failed / 2 ignored; clippy -D warnings exit 0; fmt exit 0; boundary enforce rc 0 + unittest 14 OK. RED proven by mutation (dropping the exact-size check -> 1 FAIL; dropping the provides guard -> 2 FAIL; restored 6/6). Post-merge main (ad30da5) green on every workflow.
#1882 stays open (remaining cells: fetch ladder / single-flight / Range resume / GC / LRU, archive extraction, the BuildRequest field, and the bucket key — each its own unit).
Steward tick 2026-11-24T20:3xZ — unit 8 (streaming integrity-checked extraction) is up as PR #2176 (agent/1882-extract, head 1961461d), unmerged by the new-work rule.
.tar.zst only; the declared exact size_bytesand SHA-256 are recomputed over the compressed stream while the tar entries decompress, so a body swapped after Fetcher verified it cannot land
entry rules
relative ordinary components only; regular files and directories only — absolute names, .., symlinks, hard links, devices and fifos are refused
bounds
MAX_EXTRACTED_BYTES (16 GiB) decompressed and MAX_ENTRIES (200 000), so a few-KiB archive cannot fill the disk
commit
sibling staging directory + rename after .prebuilt-tree.json is written; a killed process leaves a complete tree or nothing claimable
reuse
a destination carrying a matching marker is returned without re-reading the archive
conflict
a destination holding anything else is refused, never merged into (eviction is the GC/LRU cell)
extract_async
the blocking pass on its own thread for daemon callers
One pass, not two: the same read that decompresses also hashes, which keeps the 60 MB read count at one while still proving identity at the point of disk impact.
Verification (head 1961461d): prebuilt 30 pass / 0 fail (12 new real-tar.zst fixtures), -p fbuild-packages-fetch --lib347 pass / 0 fail / 2 ignored, cargo fmt --all -- --check exit 0, boundary --print-totals rc 0, research --check rc 0, ci.test_enforce_platform_boundary 14 OK. RED proven by mutation twice: disabling the digest comparison fails a_replaced_body_fails_the_descriptor_check (11/1) and allowing ParentDir fails parent_traversal_is_refused (11/1), each restored green. Local clippy could not take the build lease (a sibling agent's gate held root-maintenance.lock across three attempts) so CI's linux / Check is the equivalent.
Remaining cells on this tracker: staging/partial GC, the disk-cache LRU, the per-request BuildRequest field, the bucket key (needs the <product> ruling), the daemon-wide single-flight, and the --prebuilt-core consumer in the esp32 orchestrator.
name must be exactly .<16 lowercase hex>.<decimal attempt>.staging — a destination tree, a marker, .bak, an uppercase or wrong-width digest, a non-numeric attempt and a same-shaped file are all left alone
type
only a real directory is removed: symlink_metadata first, so a symlink with a candidate name is neither followed nor unlinked
age
younger than MIN_AGE (1 h) is kept; an unreadable or future mtime is kept too — guessing "old" is the unsafe direction
marker
a candidate holding .prebuilt-tree.json is kept and reported (a verified uncommitted tree is the caller's decision)
bound
at most MAX_REMOVALS (32) directories per sweep; removal errors carry their path, never swallowed
Opt-in only: no extraction calls it implicitly, so a live attempt is never at risk.
Verification (head 307e13d5): -p fbuild-packages-fetch --lib360 pass / 0 fail / 2 ignored (10 new); fmt exit 0; clippy -D warnings exit 0; boundary --print-totals rc 0 (rows=0; dylint_rows=0, same as origin/main), ci.test_enforce_platform_boundary 14 OK, research --check rc 0, check_test_layout rc 0. RED proven by mutation three times, each restored: grace period off → live-extraction test FAIL (9/1); marker guard off → marker test FAIL (9/1); name-shape guard off → foreign-names + symlink tests FAIL (8/2).
Remaining cells on this tracker: the daemon call site for the sweep, the disk-cache LRU, the per-request BuildRequest field, the bucket key (needs the <product> ruling), the daemon-wide single-flight, and the --prebuilt-core consumer in the esp32 orchestrator.
Steward tick 2026-11-26T07:5xZ — unit 10 (the daemon call site for the sweep) is up as PR #2189 (agent/1882-gc-callsite, head e9a19aba), unmerged by the new-work rule.
The gap unit 9 left: sweep_staging reaped one directory and had no caller. That is not a test problem — extract commits a tree wherever its consumer put it, so an abandoned .<sha16>.<attempt>.staging sibling can sit at any depth, and nothing walked to find it. Decision 4 of docs/design/artifact-serving-decisions.md already says who should: "GC is daemon-owned: on daemon startup and every 6 h, on a blocking task that never touches the request path."
piece
behaviour
prebuilt::sweep_staging_tree / _async
the unit-9 policy, walked over {cache}/prebuilt/
root
disk_cache::paths::prebuilt_root (the module that owns cache path construction)
scope
nothing outside {cache}/prebuilt/ is read; a staging dir beside archives/ is left alone
bounds
MAX_SCAN_DIRS 1024 directories, MAX_SCAN_DEPTH 4, MAX_REMOVALS removals in total
links
symlinked directory never entered; symlinked or absent root = empty sweep, not an error
bin/entry/prebuilt_gc.rs
sweep_once + spawn_maintenance (startup, then every 6 h, blocking, silent when quiet)
run_async
mod prebuilt_gc; + one call (entry/mod.rs at 993 LOC, under the 1000 gate)
RED → GREEN at the wiring, not just the function. A test that calls sweep_once proves the function, so the proof ran the real daemon binary against an isolated HOME + FBUILD_CACHE_DIR (no contact with the live daemon), fixture cache holding one 3 h-old staging tree, one fresh one and one committed tree:
GREEN: INFO fbuild_daemon::entry::prebuilt_gc: prebuilt staging sweep: removed 1 abandoned attempt(s), 64.0 KiB freed, kept 0 marked + 1 live — stale gone, fresh + committed intact.
RED (call removed, rebuilt, same fixture): no sweep line, the 3 h-old tree survives.
Remaining cells on this tracker: the disk-cache LRU, the per-request BuildRequest field, the bucket key (needs the <product> ruling), the daemon-wide single-flight, and the --prebuilt-core consumer in the esp32 orchestrator.
Unit 10 is merged: PR #2189 squash-merged as 99576510 (2026-11-26T10:38:37Z, merge queue).
A follow-up commit 47a48217 cleared the one red gate: Dylint Full failed with 10 errors, all in the inline test module of bin/entry/prebuilt_gc.rs (ban_std_pathbuf x2 — fixture helpers returning std::path::PathBuf; ban_std_fs_in_async x8 — that lint scopes crates/fbuild-daemon/src/** by file path and exempts only basenames containing tests, so an inline #[cfg(test)] mod is policed). Fixed by moving the module to prebuilt_gc_tests.rs (same convention as prebuilt/gc.rs's gc_tests.rs) and driving fixtures through NormalizedPath; no allowlist entry, no production change.
On main: sweep_staging_tree{,_async} over {cache}/prebuilt/ (MAX_SCAN_DIRS 1024 / MAX_SCAN_DEPTH 4 / MAX_REMOVALS, never entering a symlinked dir) with bin/entry/prebuilt_gc.rs running it at daemon startup + every 6 h on a blocking task.
The issue stays open: the remaining cells are the extract-call-site marker policy and the measurement work, not this GC wire-up.
Steward tick 2026-11-26T19:2xZ — unit 11 (the extract call site) is up as PR #2192 (agent/1882-extract-marker, head cc069858), unmerged by the new-work rule.
The gap this closes: extract was complete and had no caller. Nothing decided where a prebuilt tree lives, and nothing decided what happens when that place is already occupied — which is precisely a marker policy.
piece
behaviour
obtain::tree_root
{cache}/prebuilt/<framework>/<version>/<arch>/fp-<sha16> — the same key the bucket uses; a test asserts it equals the directory operator_urls builds
key validation
each component must be one ordinary path component (/, \, :, NUL, ., .. and empty are refused) and the fingerprint 64 lowercase hex, so a catalog value cannot steer the write
obtain::obtain
marked tree for this archive → reused with zero HTTP requests; a different archive's marker → refused untouched, before any download; nothing there → fetch, then extract at that path
marker report
extract::existing_tree / Existing::{None,Same,Different}; completed() becomes a thin caller and keeps its exact behaviour
staging depth
extraction stages beside the destination, the depth sweep_staging_tree visits — a test shows the sweep reaps that sibling under the real layout
A real bug fell out of the wiring: the marker recorded only the archive size, so a reused tree reported the compressed size where a fresh extraction reported decompressed content bytes. TreeMarker.extracted_bytes fixes that; the reuse test asserts tree == fresh and tree.bytes == content length.
Still open cells: the per-request opt-in/kill-switch flags, the source-fallback retry after a failed hit, the disk-cache LRU, and the manual artifact builder + cold/warm benchmark hook. #1882 stays open.
Steward tick 2026-11-26T21:0xZ — unit 11 is MERGED: origin/main is 008d6ad7.
#2192 (agent/1882-extract-marker, head cc069858) merged through the merge queue at 2026-11-26T21:00:19Z. Merge-group run 45891360708 = success, and the pre-merge PR run 45883723100 was success with 34 passing checks and 0 failures.
What landed:
piece
behaviour
obtain::tree_root
{cache}/prebuilt/<framework>/<version>/<arch>/fp-<sha16> — byte-identical to the key operator_urls builds (test asserts equality); every component validated as one ordinary path element
obtain::obtain
a tree already marked for this archive is reused with zero HTTP requests; a tree marked for a different archive is refused untouched before any download; otherwise fetch → extract into that path
extract::existing_tree / Existing
now surface the marker; completed() became a behaviour-identical caller of the same code
marker fix
TreeMarker stored only the compressed archive size, so a reused tree reported 92 B where a fresh extraction reported 7 B of content. TreeMarker.extracted_bytes makes the two agree; the reuse test asserts reused == fresh, not just equal entry lists
Layout test also proves unit 10's sweep_staging_tree reaps the staging sibling this call site produces, so the two cells compose.
Remaining #1882 cells (unchanged by this PR): disk-cache LRU, source fallback with one retry after a hit fails, and the manual artifact builder + cold/warm benchmark hook. #1882 stays open.
Steward tick 2026-11-26T23:0xZ — unit 12 (disk-cache LRU) is PR #2193agent/1882-disk-cache-lru (unmerged).
The plan's "staging/partial GC and disk-cache LRU" cell is now complete: #2189 delivered the staging sweep, this PR delivers the budget-capped LRU over the trees themselves.
prebuilt::lru:
candidate = a directory below {cache}/prebuilt/ holding a regular MARKER (written only after the whole tree verified) — the prebuilt root itself, a staging sibling, a partial destination and a loose file are never candidates;
recency = the marker's mtime, and obtain now touches it on every reuse, so last use — not creation — orders eviction; a failed touch never fails a resolve;
grace period = the sweep's 1 h MIN_AGE, kept and counted, because there are no leases on this path;
budget = FBUILD_PREBUILT_BUDGET only; unset/empty/unparseable disables the LRU so no existing cache is pruned by surprise (0 is a real budget);
oldest first, ≤ MAX_REMOVALS per pass, stops as soon as the remaining bytes fit, ≤ MAX_SCAN_DIRS/MAX_SCAN_DEPTH, never through a symlink, removal errors reported.
Wiring: bin/entry/prebuilt_gc.rs::prune_once runs on the same 6 h schedule as the sweep, only when a budget is declared.
Evidence: prebuilt:: 66 passed / 0 failed (12 new LRU fixtures), entry::prebuilt_gc:: 6 passed (2 new), fmt --check clean, boundary rows=0; dylint_rows=0. The reuse-touch wiring is proven RED — deleting the touch call in obtain fails a_reuse_records_itself_as_the_last_use and nothing else.
Remaining cells of the track: source fallback with one retry, manual artifact builder + cold/warm benchmark hook, daemon-wide single-flight. #1882 stays open.
PR #2193agent/1882-disk-cache-lruMERGED 2026-11-27T00:33:33Z, merge commit 8ec6b514; origin/main = 8ec6b514. Second commit on the track this cycle (#2192008d6ad7 was unit 11).
What landed — prebuilt::lru:
A tree is an eviction candidate only if it holds a regular.prebuilt-tree.json marker; the root, staging siblings, partials and any symlinked marker are never candidates and eviction never traverses a symlink.
Recency = marker mtime. obtain now touches the marker on every reuse, so a hot tree is not evicted while a stale one is. The wiring is proven RED: deleting the touch call fails exactly a_reuse_records_itself_as_the_last_use and nothing else.
Trees inside a 1 h grace window are kept and counted, not silently dropped.
Eviction is oldest-first, at most 8 per pass, and stops as soon as the remaining bytes fit the declared budget.
Budget comes only from FBUILD_PREBUILT_BUDGET. Unset, empty or unparseable disables the LRU, so no existing cache is pruned by surprise; enabling it is an explicit operator decision.
The daemon runs prune_once on the same 6 h schedule as the staging sweep.
Real test output: prebuilt::66 passed / 0 failed (12 new fixtures); entry::prebuilt_gc::6 passed / 0 failed (2 new); fmt --check clean; boundary scanner rows=0; dylint_rows=0.
CI: 34/34 checks green on the PR head f1a24aab, including Dylint Full (the gate that polices ban_std_pathbuf / ban_std_fs_in_async / ban_poison_panic on new files). Merge group 45915046443 completed success; post-merge push gates on 8ec6b514 are green (Crate/LOC/Formatting/Boards/Drift/Lint-spawns/Nightly/Teensy/Uno), ci-minimal push run still in flight.
Honest gap: local clippy never ran this cycle — soldr routed builds to a remote forge worker whose build lease stayed held; CI's Dylint Full stood in as the lint gate. No daemon, CI-variable or workflow change; no bench (the attached ESP32-C6 + LPC11U3x match no open bench cell).
Cells still open on this track: source fallback +1 retry, and the artifact builder / bench hook. #1882 stays open.
Steward tick 2026-11-27T01:5xZ — unit 13 of this track is shipped as #2194 (agent/1882-source-fallback, unmerged, 4 files, +443/-2): the source fallback with one retry that this module's README listed as missing.
prebuilt::serve is the serving decision and never returns an error: a transient failure (transport, exhausted sources, integrity, archive/IO, cancelled extraction) is retried exactly once — the fetcher keeps its partial so the retry resumes, and each extraction attempt stages in its own .<sha16>.<attempt>.staging directory so a retry cannot inherit debris — while a permanent one (invalid fingerprint/key component, unsupported flavor, unsafe entry, size/entry ceiling, occupied destination, identity conflict) is refused at once with zero requests.
Everything that does not serve returns Served::Source(Fallback { reason, attempts }), i.e. compile framework from source plus one printable line naming each attempt (Fallback::notice). ATTEMPTS = 2, bounded.
Real output: prebuilt:: 73 passed / 0 failed (7 new); crate lib 395 passed / 0 failed / 2 ignored; the retry case is RED-proven (ATTEMPTS = 1 -> a_transient_failure_is_retried_once_and_then_served fails); fmt clean, boundary rows=0; dylint_rows=0. Tests drive a real axum server that answers 500 for its first N requests (transient -> Prebuilt, 3 requests; dead source -> Source after exactly 4 requests and 2 attempts; bad fingerprint and foreign marker -> 1 attempt, 0 requests). Local clippy was blocked by a remote forge build lease, so CI Dylint Full is the lint gate.
Track cells left: the catalog-consulting call site that would actually call serve on a build path, the artifact builder, and the cold/warm benchmark hook. This issue stays open.
Unit 13 on main: source fallback (PR #2194, 80c377e3)
Merged 2026-11-27T03:12:42Z after merge-group run 45930563645 completed success (linux / Check green on the Dell pool; 34 pass / 0 fail / 0 pending before enqueue).
What is now in prebuilt: serve returns a decision, never an error.
Transient hit failure (transport, exhausted sources, integrity, archive/IO, cancelled extraction) -> retried exactly once; fetcher keeps its partial so the retry resumes, and each extraction attempt stages in its own .<sha16>.<attempt>.staging dir so a retry cannot inherit debris.
Every non-serve returns Served::Source(Fallback{reason, attempts}) plus notice() -> compile from source with one honest line. ATTEMPTS = 2, bounded.
Tests: prebuilt:: 73 passed / 0 failed (7 new), crate lib 395 passed / 0 failed / 2 ignored. Retry proven RED by lowering ATTEMPTS to 1 (transient test fails 0/1), then restored + touched green. Tests drive a real axum server answering 500 for its first N requests: transient -> Prebuilt in 3 requests; dead source -> Source after exactly 2 attempts / 4 requests and no tree; bad fingerprint and foreign marker -> 1 attempt, 0 requests. fmt clean; boundary rows=0; dylint_rows=0; CI Dylint Full green.
Track cells remaining on this issue: artifact builder / bench hook. #1882 stays open.
one deterministic tar.zst: entries sorted, mode from the executable bit, uid/gid 0, empty uname/gname, mtime 0 -> the same bytes pack to one digest on any host;
refuses a tree holding a symlink, a special file or nothing at all before writing a byte, and refuses a non-https base_url;
writes a .part sibling, re-hashes it from disk, then renames — a killed run leaves nothing publishable;
bucket_key derives decision 2's key from (product, reference, chip, digest); release/catalog emit the entry the reader accepts (flavor fp-<16>, provides fbuild-fp:<fingerprint>, os: none, single-stream);
nothing uploads: decision 8c makes every bucket write a maintainer action, and the command says so.
Two client faults found by the round trip (pack -> real axum server -> Reader -> Fetcher -> obtain -> extract)
fetch::sanitized kept only the first 48 characters of the asset name. A real v1 core-object name is 53 (arduino-esp32-core-3.3.12-esp32dev.<sha16>.tar.zst), so the local file lost .tar.zst and extract refused it as an unsupported format — such an asset could never be extracted at all. It now keeps the archive suffix and shortens the stem.
extract dropped the archive's execute bits (File::create cannot carry a mode), so a served tree differed from the tree the publisher fingerprinted. Only the execute bits are applied now, never setuid/setgid.
Still open on this track: the cold/warm benchmark hook — it needs a real framework build to name a configuration where core objects pay before anything is published (§8's own advice). No publish, no workflow files, no new crates. #1882 stays open.
Unit 14 (manual artifact builder) landed: PR #2195 merged at 2026-11-27T06:38:54Z; origin/main = a7394a52 ("Merge pull request #2195 from FastLED/agent/1882-artifact-builder"). Merge-group run 45951180870 succeeded on the synthetic head a7394a52 (Dylint Full PASS, linux/Check PASS, 0 failures before merge).
What is now on main:
prebuilt::pack — one deterministic tar.zst: entries sorted, mode derived from the exec bit only, uid/gid 0, mtime 0; a symlink, a special file, or an empty tree is refused before a byte is written; output goes to a .part, is re-hashed from disk, then renamed.
bucket_key (the decision-2 key derivation) plus release / catalog entry emission, so the produced artifact is exactly the shape the client-side reader accepts.
Hidden fbuild __prebuilt-pack entry point; it prints that nothing was uploaded, because publishing remains a maintainer action (doc artifact-serving-decisions.md §8c). New dep edge fbuild-cli -> fbuild-packages-fetch.
Two client defects the end-to-end round trip exposed were fixed here (no existing fixture could see either):
fetch::sanitized truncated local asset names at 48 chars — a real 53-char v1 core key (arduino-esp32-core-3.3.12-esp32dev.<sha16>.tar.zst) lost its .tar.zst suffix and extract refused it outright, so such an asset could never have been extracted. The archive suffix is now preserved and the stem shortened.
extract silently dropped the tar execute bit (File::create cannot carry a mode), so a served tree differed from the fingerprinted one. Exec bits are now applied explicitly (never setuid/setgid).
Tests: prebuilt:: 83 passed / 0 failed; fbuild-packages-fetch --lib 405 passed / 0 failed / 2 ignored; fbuild-cli --bin fbuild prebuilt_test pack 3 / 0; boundary rows=0; dylint_rows=0; fmt clean. CI Dylint Full passed on the second run after one real ban_std_pathbuf finding in a new test fixture was fixed in a second commit (no amend).
Plan status — remaining cell is only the cold/warm benchmark hook (a fixture benchmark that needs a real framework build, no board involved). Everything else in the plan list is on main: fingerprints, catalog shards, self-contained reader, single-flight fetch/extract/resume, staging GC + disk-cache LRU, source fallback with one retry, per-request opt-in/kill-switch flags, and now the manual artifact builder.
Steward tick 2026-11-27T08:4xZ — the last plan cell (cold/warm benchmark hook) is blocked on a consumer that does not exist yet, so it is not being written as a harness that cannot measure. Filed the missing cell as #2196. No close keyword: this issue stays OPEN.
Verified on origin/maina7394a52 (2026-11-27):
git grep -n "fetches_prebuilt_libs()" -- '*.rs' → only crates/fbuild-build-engine/src/prebuilt.rs lines 126/134, i.e. its own unit tests. No build path consumes the policy.
git grep -n "prebuilt::" -- 'crates/' → one production hit: crates/fbuild-cli/src/cli/prebuilt_notice.rs:25 (the type behind the notice line).
The only production variants::FetchRequest { … } is crates/fbuild-library/src/library/esp32_framework/libs.rs:253, carrying {name, version, url, variant} — decision 1's mandated PrebuiltLibsPolicy field is absent, so --no-prebuilt-libs cannot change what is fetched (the @esp-libs per-chip slice is still selected).
Why that blocks the hook rather than merely delaying it: decision 6's headline is cold_first_compile_wall_s with prebuilt libs against the source arm in the same job. With no consumer both arms execute the same code path, so every published ratio would be 1.0 by construction — an unfalsifiable number in site/bench/artifact-serving/, which is worse than no number. The gate ("any rung-6 fallback in a CI build is a hard failure") would also never fire, because no build reaches a rung.
State of the track (all on main, re-verified): identity/fingerprint stamps, obtain/tree_root (008d6ad7), serve decision enum + one retry (80c377e3), disk-cache LRU (8ec6b514), staging GC (99576510), deterministic pack + bucket key + hidden fbuild __prebuilt-pack (a7394a52), plus the two client defects that round trip exposed (48-char asset-name truncation dropping .tar.zst; the dropped tar exec bit).
Next cell:#2196 — carry the policy on the build request, honour it in select(), consult serve before compiling framework libs, record prebuilt_libs in build_info.json. The hook follows it, and with a real consumer it becomes measurable in the same PR series.
Steward tick 2026-11-28T21:1xZ — dependency satisfied; re-verified cell by cell on origin/main46b3dcda.
The dependency block on this issue was pinned to the trigger "re-verify when #2196 lands". The
consumer landed in full (#2199, #2200, #2201, #2202, #2203/#2204, #2206, #2207, #2208), so the
trigger has fired and the block is being dropped here — with the verification, not instead of it.
Every plan cell of this issue, checked on origin/main46b3dcda:
ci/artifact_serving_bench.py + .github/workflows/artifact-serving-bench.yml (#2208, nightly, green-and-idle until a tree is published); warm_incremental_s is PR #2210
What is genuinely left, stated as two cells and nothing else:
fallback_rung_histogram (decision 6 metric table): the ladder exposes no rung numbers — Served is Prebuilt / Source(reason) with no rung, so a histogram today would be invented.
This needs the rung carried from the fetch layer up into prebuilt_libs. In-repo, small, and
the only remaining decision-6 metric with no wiring at all.
So this issue stays OPEN, unblocked: cell 1 is real feature work a steward can take next, and cell 2
re-opens the moment a tree is published. Receipts for the consumer side are on #2196 (comments 4-13).
Decision 6's fallback_rung_histogram is on main — #2215ccc5ef4b (squash of 5eceb831, merged 2026-11-30T09:14:59Z; merge-group 46387721719 SUCCESS, linux / Check 12050-line log with 0 soldr#3377 / 0 INFRA - / 0 relay resets / 0 FAILED / 0 error[E, 56 test result: ok).
What landed (the last in-repo metric cell of decision 6):
prebuilt::Artifact.url: Option<String> — the URL whose body produced the file, None when the bytes were already verified in the local cache (rung 1, no request at all). prebuilt::Obtained carries it through extraction.
prebuilt_core::served_outcome records it in prebuilt_libs.source instead of asset.urls[0]. A mirror list's first entry is where an ailing provider sits, so naming it after a build that never reached it is exactly the blind spot the histogram exists to remove. A reuse records the new prebuilt_record::CACHE_SOURCE ("cache"), never a mirror.
ci/artifact_serving_bench.py reads each trial's record immediately after the COLD build, before the warm build overwrites it (a warm build always answers cache), bins by served_bin(source) — host for a URL, cache/source for the two terminal rungs, unknown instead of a silent drop — and writes arms.<arm>.served_by + a top-level fallback_rung_histogram. The document stays additive (schema 1, a document without served_by loads).
docs/design/artifact-serving-decisions.md records that the bin is the answering source, not a rung number (cache = rung 1, source = rung 6).
Tests (real): fbuild-packages-fetch --lib prebuilt89 passed/0 failed; fbuild-build-esp --lib prebuilt13/0; fbuild-build-engine --lib prebuilt_record6/0; ci.test_artifact_serving_bench41 tests OK; fmt exit 0; boundary rows=0; dylint_rows=0. RED proven: restoring served_from: Some(asset.urls.first()…) fails the new assertion (left: https://example.invalid/v1/core.tar.zst / right: https://mirror-two.example/prebuilt/core.tar.zst, exit 101); restored → pass. The Python cold-vs-warm read is covered by test_the_accounting_comes_from_the_cold_build_not_the_warm_one.
Still open on this issue (unchanged, not claimed): a real measured histogram — the nightly --measure is gated on a published tree, which needs the owner bucket upload.
In-repo cells re-verified on origin/main920c354b (2026-12-01). Every code cell of the plan is delivered and CI-green; the one remaining cell is a publishing action, which docs/design/artifact-serving-decisions.md §8c reserves to a maintainer ("nothing is published until the fingerprint is install-history-independent, and publishing is a maintainer action"). Blocking at that gate so the ladder stops nominating a feature whose residual no agent can perform.
Delivered, with the test that proves it (all green in linux / Check (ubuntu-latest) job 142710660389 of push run 46664068344 at 920c354b, 56 x test result: ok):
Canonical exact fingerprints — client side in crates/fbuild-build-esp/src/esp32/orchestrator/prebuilt_core.rs (config set, canonical argv, exact Query); packer side fbuild __prebuilt-pack (crates/fbuild-cli/src/cli/prebuilt_pack.rs) + objects.json unit manifest. a_packed_tree_hydrates_through_the_real_publisher ... ok.
Catalog shards / Index reader — crates/fbuild-packages-fetch/src/prebuilt/reader.rs (descriptor SHA + exact size re-checked on every cached or fetched shard read).
Source fallback, one retry — a_manifest_from_a_newer_publisher_is_refused, a_tree_without_a_manifest_is_refused, a_tree_that_covers_no_unit_is_reported_as_unusable ... ok (failure is never a build failure).
Per-request opt-in / kill switch — PrebuiltPolicy{Disabled,Libs,Core} in crates/fbuild-build-engine/src/prebuilt.rs, carried on the request, honoured by variants::select (disabled_prebuilt_libs_select_the_whole_bundle_never_a_slice ... ok).
The residual is publication: today's nightly, run 46610960804, completed green with
artifact-serving bench: skipped -- no published prebuilt tree for prebuilt-arduino-esp32 3.3.12 / esp32s3 in 2 catalog(s); nothing measured
i.e. the bucket holds no prebuilt core tree. It cannot be produced from CI either: gh secret list -R FastLED/fbuild still shows only AZURE_*, PROJECT_APP_PRIVATE_KEY, SOLDR_S3_CACHE_{ACCESS,SECRET}_KEY — no Spaces/bucket credential (the same gap as #2040 and #2128), and site/mirror/manifest.json on main carries 0 prebuilt entries.
Re-verify (--unblock-issue 1882) when a prebuilt tree for the reference cell (prebuilt-arduino-esp32 3.3.12 / esp32s3) is published, when a bucket credential lands in CI, or when a maintainer rules that the fingerprint is install-history-independent and shipping can proceed.
Activity
feat(prebuilt): add verified package content identities
zackees commentedon Nov 21, 2026
Decision recorded; this issue now tracks the re-implementation
Pilot PR #1883 is being closed unmerged. The two questions that blocked it are decided in
docs/design/artifact-serving-decisions.md§8 (PR #2136). This issue stays open as the single tracker for building the feature against that decision.What was decided
recipenumber for compat patches. Not option (a) (one immutable install per chip duplicates the 2.6 GB core tree), and not the pilot's re-hash of the installed tree:tools/esp32-arduino-libs/is shared by every MCU on a core version, so that hash depends on which other boards the user has built.--no-prebuilt-libs/FBUILD_NO_PREBUILT_LIBSis the only public opt-out and covers core objects; hidden research opt-in--prebuilt-core/FBUILD_PREBUILT_CORE.--prebuilt/--no-prebuilt/FBUILD_PREBUILTmust not ship.mainwithout its planner, so no code was carried over.Acceptance criteria for closing this issue
--prebuilt/--no-prebuiltfailing to parse),firmware.binbyte equality on each pilot board.v1/<vendor>/<product>/<channel>/<ref>/<chip>/…<sha16>.tar.zst).Reusable from the pilot
Tip
c4b803933056bcc10e23ea8f177e92c73fec8802stays reachable asrefs/pull/1883/head. Cherry-pick with-xto keep authorship:fbuild-core::content_manifest, the streamedextract_with_manifest, the descriptor-verifying Catalog reader, daemon single-flight + Range/If-Range resume + staging GC, the canonical-argv / prefix-map planner. Not reusable:finalize_sdk_content_manifestand thetree:<hash>identity, the CLI flags, the publisher's key layout, the committedprebuilt-arduino-esp32shard.Waiting on the maintainer
zackees commentedon Nov 23, 2026
Steward re-verify (2026-11-23): the earlier block on this issue is cleared.
The 2026-11-06 receipt blocked this on "the design is not settled; PR #1883 is
intentionally unmerged". Both clauses are now spent:
is on
main.main:docs/design/artifact-serving-decisions.md§8 "Exact-fingerprint framework core objects (Implement experimental exact-fingerprint prebuilt framework serving v1 #1882)" landed in
f3446342(2026-11-21) and states Status: decided 2026-11-21, notimplemented. The blocker that ended the pilot — the framework tree is not
complete when the core archive is renamed — is answered by 8a: identity is
per component and is taken in staging (core in the core staging dir before
the atomic rename; SDK in the SDK extract dir after compat patches; MCU skeleton
in its extract dir), each written as a stamp inside its own subtree with a
recipeinteger. No hash of the installed tree, no backfill.So the remaining work is the 8a implementation itself, in these units:
staging, with the core's subtree excluding
tools/esp32-arduino-libs/andtools/.libs-archives/;patch_mcu_compatibilityahead of the stamp so a component is nevermutated after it is stamped;
pre-existing install) and compiles from source;
--prebuilt-core/FBUILD_PREBUILT_COREopt-in and the 8b ladder.8c still holds and is not steward work: nothing is published until the
fingerprint is install-history-independent, and every upload needs explicit
maintainer approval. The three orphan objects the pilot uploaded are tracked in
#2135.
No close keyword: this stays OPEN until 8a is implemented.
zackees commentedon Nov 23, 2026
Steward tick 2026-11-23T20:2xZ — 8a unit 3 (skeleton) delivered as PR #2166.
All three components now take their identity in staging on
main+ this PR:coretools/esp32-arduino-libs+tools/.libs-archivessdk-<variant>mcu-<mcu>Also in #2166:
patch_unless_stampedis the single guard for in-place patching — theensure_mcu_libsearly return no longer re-patches a complete skeleton, which closes the "nothing mutates a component after it is stamped" cell for the skeleton path.Remaining cells unchanged: the hidden
--prebuilt-core/FBUILD_PREBUILT_COREopt-in, the 8b ladder, and any publish (maintainer approval, §8c). Added theenhancementlabel so this tracker stops reading as unclassified.No close keyword: #1882 stays open.
zackees commentedon Nov 24, 2026
Unit 3 of 8a (MCU skeleton identity) is merged: PR #2166 -> merge commit
bd1f3431(2026-11-24T00:54:11Z, merge queue, heade723359e).With #2162 (core) and #2164 (SDK variant), every staging component now writes an identity stamp:
core-<version>sdk-<variant>mcu-<mcu>Details verified in-repo on
e723359e:esp_bt.hpatches are inside the content id.patch_unless_stampedis now the single in-place-patch guard (a stamped tree is never mutated), which also removesensure_mcu_libs' post-stamp re-patch on the early return.Verification:
soldr cargo test -p fbuild-library --lib393 pass / 0 fail / 9 ignored (esp32_framework filter 58/58 at the final head),clippy -p fbuild-library --all-targets -D warningsexit 0, 24 pass / 9 skipped check-runs on the final head (Dylint Full, Crate Gate, LOC Gate, Boundary, Validate Boards all green), LOC 948 / 933 < 1000.Still open on this tracker (not in #2166): the
--prebuilt-coreconsumer flag (a flag with no consumer would add dead code), and the publish/bucket step, which is maintainer-only (doc/artifact-serving-decisions.md8c). Nothing here closes the issue.zackees commentedon Nov 24, 2026
Steward tick 2026-11-24T03:1xZ — the stamp half of 8a is corrected and merged: PR #2167 ->
d64af8ae.Two defects in the component-identity work landed an hour earlier (#2162 core, #2164 SDK variant, #2166 MCU skeleton):
component-identity.jsonsat at each component's root, but the SDK variant and the MCU skeleton of a chip both install intotools/esp32-arduino-libs/<mcu>/(merge_skeleton_mcu_entries), so the second writer overwrote the first andread_stamp(root)could not say which component an identity belonged to.tools/esp32-arduino-libs/esp32c2/that lacks FreeRTOS — that is whyensure_mcu_libsexists — so the merged directory is always a superset of the skeleton's staging tree.reconcile_stamptherefore always withdrew the skeleton's stamp, on exactly the MCUs skeletons exist for (C2, C61), and destroyed whatever stamp was in that file.Now in
main(d64af8ae):component-identity.<component>.json— one file per component,is_stamp_filerecognises a stamp only at a component rootread_stamp/remove_stamphas_stamp(root)patch_unless_stampeduses, so no stamped tree is mutated in placeentries_survived(staged, installed, excluded)content_identries_survivedviahash_entryVerification:
soldr cargo test -p fbuild-packages-fetch --lib component_id26 passed / 0 failed;soldr cargo test -p fbuild-library --lib esp32_framework60 passed / 0 failed;clippy -p fbuild-packages-fetch -p fbuild-library --all-targets -D warningsexit 0;ci/test_enforce_platform_boundary14 tests OK. RED first, proved by restoring each pre-fix behaviour and watching the new tests fail 0/1 (skeleton_identity_survives_a_preexisting_partial_tree_at_the_destination,a_skeleton_merge_keeps_the_sdk_variant_identity_that_shares_its_directory,two_components_share_one_directory_without_clobbering_each_other).Still open on this tracker, unchanged: the planner half (a fingerprint assembler that emits no fingerprint for a component without a stamp — test 20 of decision 8), the hidden
--prebuilt-core/FBUILD_PREBUILT_COREopt-in and the 8b ladder, and any publish (maintainer approval, 8c). Nothing here closes the issue.zackees commentedon Nov 24, 2026
Steward tick 2026-11-24T04:1xZ — the framework term of the fingerprint is on
main: PR #2168 ->6a6dc07b(2026-11-24T05:21:59Z).With the per-component stamps from #2162 / #2164 / #2166 / #2167 addressable, the 8a identity chain now has its first consumer.
component_id::component_term()TERM_SCHEMA-versioned hash over(component, version, content_id, recipe); sorted by component name, so it is order-independent, and hashes stamps only, so it is install-history independent.Nonefor an empty identity list or a duplicated component nameEsp32Framework::framework_identity(mcu, sdk_variant)corestamp plus thesdk-<variant>stamp of every required variant (MCU +build.chip_variant, #1897); includesmcu-<mcu>when present;Nonefor a legacy, half-installed or half-merged treeEsp32FingerprintMetadata.framework_identityskip_serializing_if = "Option::is_none"leaves a legacy tree's metadata byte-identicalVerification (real output, head
784545e3):component_term8 pass / 0 fail;framework_identity6 pass / 0 fail (incl. install-history independence — buildingesp32devinto the same core tree leaves theesp32c3term identical — and no-stamp-is-None);-p fbuild-build-esp --lib fingerprint5 pass / 0 fail; full libs 401 + 317 pass; clippy on the three touched crates--all-targets -D warningsexit 0; the skeleton assertion proven RED 0/1 by deleting the inclusion. CI: 41 checks green after oneFormattingfix and one rerun of the known runner-daemon flake (blake3/ringbuild.rs "lost the connection to the soldr daemon" while Dylint Full and all 9 ESP32 board builds were green at the same SHA). All nine board builds exercised the new metadata field end to end.Remaining cells on this tracker: the 8b ladder (
--prebuilt-core/FBUILD_PREBUILT_CORE, Catalog index/shard readers, daemon single-flight fetch + Range resume, retry-after-a-failed-hit) and any publish (§8c is a maintainer action). The flag is deliberately still absent: with no planner consuming a term yet it would be dead code, which the design document rejects.#1882 stays open.
zackees commentedon Nov 24, 2026
Steward tick 2026-11-24T07:3xZ — the canonical prebuilt-core fingerprint is on
main: PR #2169 ->81a224de(2026-11-24T07:31:13Z, merge queue).The identity chain (#2162 core, #2164 SDK variant, #2166 skeleton, #2167 per-component stamp files, #2168 framework term) can now be turned into a servable key.
prebuilt_core.rsinesp32_frameworkhashes exactly the inputs decision 8 lists and nothing else:CoreBuildInputsmcu,sdk_variant,units,configCompileUnit/ConfigDigestEsp32Framework::prebuilt_core_plan(&inputs)Option<PrebuiltCorePlan>;Noneunless the tree has an identity and every input is presentPrebuiltCorePlanfingerprint()+mcu(),sdk_variant(),core_version()canonical_argv_digest/canonical_config_digestNonefor an empty or unnamed listTest-18/19/20 properties, each with its own test: install-history independence (another chip in the same core tree does not move this chip's key — the property the closed pilot's option (c) failed), install-path independence (two tempdirs, same content, one fingerprint), and no-identity-no-serving (an unstamped tree plans nothing and no stamp is written). Every field is length-prefixed and domain-tagged under
ABI_SCHEMA = 1, so no two input tuples collide by shifting a character across a boundary.The module documents the contract it cannot enforce:
CompileUnit::argvmust already be canonical (prefix-mapped, no temp dirs). A fingerprint that moves with the build directory can never be served to a second user, so the caller owns that, not this hash.Verification (head
1080617c):prebuilt_core7 pass / 0 fail; full-p fbuild-library --lib408 pass / 0 fail (401 before); clippy--all-targets -D warningsexit 0;cargo fmt --all -- --checkexit 0; boundary 14 tests OK and research--checkrows=150 rc=0. RED proven, not asserted: replacingself.framework_identity(...)?with a constant makesan_unstamped_framework_never_plansandincomplete_inputs_never_planFAIL 5/2; restored -> 7/7. A-D, a changed header digest, or a different toolchain version each move the fingerprint.Still open on this tracker: the hidden
--prebuilt-core/FBUILD_PREBUILT_COREopt-in (unreachable without a fetch ladder, which is why no flag ships here), the eligibility predicate, the descriptor-verifying Catalog reader, the rung ladder with its fallout-to-source, and any publish (§8c is a maintainer action). No bucket key is rendered here either: decision 2 fixes thev1/shape but the<product>name for core objects is not yet ruled.#1882 stays open (remaining cells above).
zackees commentedon Nov 24, 2026
Steward tick 2026-11-24T09:5xZ — decision 8b's flag surface is on
main: PR #2170 ->ec5a8744(2026-11-24T09:57:43Z, merge queue).The fingerprint chain (#2162 core, #2164 SDK variant, #2166 skeleton, #2167 per-component stamps, #2168 framework term, #2169 canonical
prebuilt_core_plan) had no switch to ask for it —git grep prebuilt_libsonmainwas 0 hits, so even decision 1's public opt-out did not exist. That gap is closed:fbuild_build::prebuilt::PrebuiltPolicy{Disabled, Libs, Core}Default = Libs(per-chip libraries may be used, core objects stay research)PrebuiltPolicy::resolve/resolve_with_envfbuild_core::env_flag(canonical truth table —1/true/yes/on, and a typo is off)as_str/parsedisabled/libs/core; unknown text →None, never a silent default--no-prebuilt-libsglobal = true, documented in--help(decision 1's only user-facing switch)--prebuilt-coreglobal = true,conflicts_with = "no_prebuilt_libs"; the rejected spellings--prebuilt/--no-prebuiltdo not parsecli/prebuilt_notice.rsresolve_from_cli) and the explicit decision is reported once per build in theshrink_notice(#1459) style: the core opt-in warns that serving is not implemented yet and the framework compiles from source; the opt-out states the source compile. Default silent.Design-doc test 22 is covered, one test each: the opt-in parses, the opt-out is global and parses before the subcommand, the two conflict,
--prebuilt/--no-prebuilt/--prebuilt-libs-coreare rejected, and--helpdocuments the opt-out while never naming the hidden flag. Policy tests cover opt-out-wins in every flag×env combination, the env truth table (""and theturetypo included) and the wire round trip. RED proven twice by mutation (droppinghide/conflicts_with→ 0/2; flipping the resolve order → 2/6) then restored green.Verification (real output, head
9f7ab590):soldr cargo test -p fbuild-cli --bin fbuild511 pass / 0 fail,-p fbuild-build-engine --lib prebuilt6 pass / 0 fail, boundary--print-totalsrc 0, research inventory unchanged,ci.test_enforce_platform_boundary14 OK. CI: Dylint Full pass 4m1s,linux / Checkpass 19m23s, Formatting/Inventory/LOC/Monocrate/Boards/Uno/Teensy/Prooft/local-gate all pass, zero failures. (Local clippy was lease-blocked ~50 min by a sibling agent'ssoldr cargo dylint --workspace --target x86_64-pc-windows-msvc; the CI lanes above are its equivalent at the same SHA.)Still open on this tracker (the remaining units): the fetch ladder (local verified cache →
mirrors[]→ source fallback), the bucket key for core objects (needs the<product>ruling), the per-request field onBuildRequest/daemon models, and the actual--prebuilt-coreconsumer in the esp32 orchestrator. No publish (8c: maintainer action).No close keyword: #1882 stays open.
zackees commentedon Nov 24, 2026
Merged: #2171
feat(prebuilt): descriptor-verifying Catalog Index/shard reader— merge commitad30da5d(2026-11-24T14:07:01Z, via merge queue pos 1).Unit 6 of this issue is now on main:
crates/fbuild-packages-fetch/src/prebuilt/{mod,reader,tests}.rs. TheReaderpins exactsize_bytesand SHA-256 for the Index and every per-tool shard descriptor and re-checks both on fresh cache, network fetch, and stale-cache fallback; a hit additionally requires exact tool/version/min_client_version/none-arch-abi/fp-<16>flavor, afbuild-fp:<fp>provides match, a 64-hex asset SHA, and a single-stream URL list. This is stricter than the existing mirror reader, which rejects theCatalogkind and parses cached bytes without re-verifying against the current Index descriptor.Tests at merge: prebuilt 6 passed / 0 failed (local axum fixtures, no network); crate
--lib323 passed / 0 failed / 2 ignored; clippy-D warningsexit 0; fmt exit 0; boundary enforce rc 0 + unittest 14 OK. RED proven by mutation (dropping the exact-size check -> 1 FAIL; dropping the provides guard -> 2 FAIL; restored 6/6). Post-mergemain(ad30da5) green on every workflow.#1882 stays open (remaining cells: fetch ladder / single-flight / Range resume / GC / LRU, archive extraction, the
BuildRequestfield, and the bucket key — each its own unit).zackees commentedon Nov 24, 2026
Steward tick 2026-11-24T20:3xZ — unit 8 (streaming integrity-checked extraction) is up as PR #2176 (
agent/1882-extract, head1961461d), unmerged by the new-work rule.crates/fbuild-packages-fetch/src/prebuilt/{extract.rs,extract_tests.rs}+mod.rs/README:extract(&Artifact, &Path)/extract_with_limit.tar.zstonly; the declared exactsize_bytesand SHA-256 are recomputed over the compressed stream while the tar entries decompress, so a body swapped afterFetcherverified it cannot land.., symlinks, hard links, devices and fifos are refusedMAX_EXTRACTED_BYTES(16 GiB) decompressed andMAX_ENTRIES(200 000), so a few-KiB archive cannot fill the disk.prebuilt-tree.jsonis written; a killed process leaves a complete tree or nothing claimableextract_asyncOne pass, not two: the same read that decompresses also hashes, which keeps the 60 MB read count at one while still proving identity at the point of disk impact.
Verification (head
1961461d): prebuilt 30 pass / 0 fail (12 new real-tar.zst fixtures),-p fbuild-packages-fetch --lib347 pass / 0 fail / 2 ignored,cargo fmt --all -- --checkexit 0, boundary--print-totalsrc 0, research--checkrc 0,ci.test_enforce_platform_boundary14 OK. RED proven by mutation twice: disabling the digest comparison failsa_replaced_body_fails_the_descriptor_check(11/1) and allowingParentDirfailsparent_traversal_is_refused(11/1), each restored green. Local clippy could not take the build lease (a sibling agent's gate heldroot-maintenance.lockacross three attempts) so CI'slinux / Checkis the equivalent.Remaining cells on this tracker: staging/partial GC, the disk-cache LRU, the per-request
BuildRequestfield, the bucket key (needs the<product>ruling), the daemon-wide single-flight, and the--prebuilt-coreconsumer in the esp32 orchestrator.#1882 stays open (remaining cells above).
zackees commentedon Nov 25, 2026
Steward tick 2026-11-25T06:5xZ — unit 9 (staging/partial GC) is up as PR #2179 (
agent/1882-staging-gc, head307e13d5), unmerged by the new-work rule.crates/fbuild-packages-fetch/src/prebuilt/{gc.rs,gc_tests.rs}+mod.rs/README:.<16 lowercase hex>.<decimal attempt>.staging— a destination tree, a marker,.bak, an uppercase or wrong-width digest, a non-numeric attempt and a same-shaped file are all left alonesymlink_metadatafirst, so a symlink with a candidate name is neither followed nor unlinkedMIN_AGE(1 h) is kept; an unreadable or future mtime is kept too — guessing "old" is the unsafe direction.prebuilt-tree.jsonis kept and reported (a verified uncommitted tree is the caller's decision)MAX_REMOVALS(32) directories per sweep; removal errors carry their path, never swallowedSweepReport { removed, freed_bytes, kept_live, kept_marked };sweep_staging_asyncfor daemon callersOpt-in only: no extraction calls it implicitly, so a live attempt is never at risk.
Verification (head
307e13d5):-p fbuild-packages-fetch --lib360 pass / 0 fail / 2 ignored (10 new); fmt exit 0; clippy-D warningsexit 0; boundary--print-totalsrc 0 (rows=0; dylint_rows=0, same asorigin/main),ci.test_enforce_platform_boundary14 OK, research--checkrc 0,check_test_layoutrc 0. RED proven by mutation three times, each restored: grace period off → live-extraction test FAIL (9/1); marker guard off → marker test FAIL (9/1); name-shape guard off → foreign-names + symlink tests FAIL (8/2).Remaining cells on this tracker: the daemon call site for the sweep, the disk-cache LRU, the per-request
BuildRequestfield, the bucket key (needs the<product>ruling), the daemon-wide single-flight, and the--prebuilt-coreconsumer in the esp32 orchestrator.#1882 stays open (remaining cells above).
zackees commentedon Nov 26, 2026
Steward tick 2026-11-26T07:5xZ — unit 10 (the daemon call site for the sweep) is up as PR #2189 (
agent/1882-gc-callsite, heade9a19aba), unmerged by the new-work rule.The gap unit 9 left:
sweep_stagingreaped one directory and had no caller. That is not a test problem —extractcommits a tree wherever its consumer put it, so an abandoned.<sha16>.<attempt>.stagingsibling can sit at any depth, and nothing walked to find it. Decision 4 ofdocs/design/artifact-serving-decisions.mdalready says who should: "GC is daemon-owned: on daemon startup and every 6 h, on a blocking task that never touches the request path."prebuilt::sweep_staging_tree/_async{cache}/prebuilt/disk_cache::paths::prebuilt_root(the module that owns cache path construction){cache}/prebuilt/is read; a staging dir besidearchives/is left aloneMAX_SCAN_DIRS1024 directories,MAX_SCAN_DEPTH4,MAX_REMOVALSremovals in totalbin/entry/prebuilt_gc.rssweep_once+spawn_maintenance(startup, then every 6 h, blocking, silent when quiet)run_asyncmod prebuilt_gc;+ one call (entry/mod.rsat 993 LOC, under the 1000 gate)Verification (real output, head
e9a19aba):-p fbuild-packages-fetch --lib369 pass / 0 fail / 2 ignored (7 new),-p fbuild-daemon --lib349 pass / 0 fail / 3 ignored (4 new), clippy--all-targets -D warningsexit 0 on both crates, fmt exit 0, boundary--print-totalsrows=0; dylint_rows=0,ci.test_enforce_platform_boundary14 OK, research--checkrc 0,check_test_layoutok.RED → GREEN at the wiring, not just the function. A test that calls
sweep_onceproves the function, so the proof ran the real daemon binary against an isolatedHOME+FBUILD_CACHE_DIR(no contact with the live daemon), fixture cache holding one 3 h-old staging tree, one fresh one and one committed tree:INFO fbuild_daemon::entry::prebuilt_gc: prebuilt staging sweep: removed 1 abandoned attempt(s), 64.0 KiB freed, kept 0 marked + 1 live— stale gone, fresh + committed intact.Remaining cells on this tracker: the disk-cache LRU, the per-request
BuildRequestfield, the bucket key (needs the<product>ruling), the daemon-wide single-flight, and the--prebuilt-coreconsumer in the esp32 orchestrator.#1882 stays open.
zackees commentedon Nov 26, 2026
Unit 10 is merged: PR #2189 squash-merged as
99576510(2026-11-26T10:38:37Z, merge queue).A follow-up commit
47a48217cleared the one red gate:Dylint Fullfailed with 10 errors, all in the inline test module ofbin/entry/prebuilt_gc.rs(ban_std_pathbufx2 — fixture helpers returningstd::path::PathBuf;ban_std_fs_in_asyncx8 — that lint scopescrates/fbuild-daemon/src/**by file path and exempts only basenames containingtests, so an inline#[cfg(test)] modis policed). Fixed by moving the module toprebuilt_gc_tests.rs(same convention asprebuilt/gc.rs'sgc_tests.rs) and driving fixtures throughNormalizedPath; no allowlist entry, no production change.On main:
sweep_staging_tree{,_async}over{cache}/prebuilt/(MAX_SCAN_DIRS 1024 / MAX_SCAN_DEPTH 4 / MAX_REMOVALS, never entering a symlinked dir) withbin/entry/prebuilt_gc.rsrunning it at daemon startup + every 6 h on a blocking task.The issue stays open: the remaining cells are the extract-call-site marker policy and the measurement work, not this GC wire-up.
zackees commentedon Nov 26, 2026
Steward tick 2026-11-26T19:2xZ — unit 11 (the extract call site) is up as PR #2192 (
agent/1882-extract-marker, headcc069858), unmerged by the new-work rule.The gap this closes:
extractwas complete and had no caller. Nothing decided where a prebuilt tree lives, and nothing decided what happens when that place is already occupied — which is precisely a marker policy.obtain::tree_root{cache}/prebuilt/<framework>/<version>/<arch>/fp-<sha16>— the same key the bucket uses; a test asserts it equals the directoryoperator_urlsbuilds/,\,:, NUL,.,..and empty are refused) and the fingerprint 64 lowercase hex, so a catalog value cannot steer the writeobtain::obtainextract::existing_tree/Existing::{None,Same,Different};completed()becomes a thin caller and keeps its exact behavioursweep_staging_treevisits — a test shows the sweep reaps that sibling under the real layoutA real bug fell out of the wiring: the marker recorded only the archive size, so a reused tree reported the compressed size where a fresh extraction reported decompressed content bytes.
TreeMarker.extracted_bytesfixes that; the reuse test assertstree == freshandtree.bytes == content length.Verification:
prebuilt::54/54, crate lib 376 passed / 0 failed, clippy--all-targets -D warningsclean, fmt clean, platform boundaryrows=0; dylint_rows=0, new files 132 and 254 LOC.Still open cells: the per-request opt-in/kill-switch flags, the source-fallback retry after a failed hit, the disk-cache LRU, and the manual artifact builder + cold/warm benchmark hook. #1882 stays open.
zackees commentedon Nov 26, 2026
Steward tick 2026-11-26T21:0xZ — unit 11 is MERGED:
origin/mainis008d6ad7.#2192 (
agent/1882-extract-marker, headcc069858) merged through the merge queue at 2026-11-26T21:00:19Z. Merge-group run 45891360708 =success, and the pre-merge PR run 45883723100 wassuccesswith 34 passing checks and 0 failures.What landed:
obtain::tree_root{cache}/prebuilt/<framework>/<version>/<arch>/fp-<sha16>— byte-identical to the keyoperator_urlsbuilds (test asserts equality); every component validated as one ordinary path elementobtain::obtainextract::existing_tree/Existingcompleted()became a behaviour-identical caller of the same codeTreeMarkerstored only the compressed archive size, so a reused tree reported 92 B where a fresh extraction reported 7 B of content.TreeMarker.extracted_bytesmakes the two agree; the reuse test assertsreused == fresh, not just equal entry listsLayout test also proves unit 10's
sweep_staging_treereaps the staging sibling this call site produces, so the two cells compose.Real gates on the PR head:
prebuilt::54 passed / 0 failed (6 new); crate lib 376 passed / 0 failed / 2 ignored; clippy--all-targets -D warningsclean; fmt clean; platform-boundaryrows=0; dylint_rows=0.Remaining #1882 cells (unchanged by this PR): disk-cache LRU, source fallback with one retry after a hit fails, and the manual artifact builder + cold/warm benchmark hook. #1882 stays open.
zackees commentedon Nov 26, 2026
Steward tick 2026-11-26T23:0xZ — unit 12 (disk-cache LRU) is PR #2193
agent/1882-disk-cache-lru(unmerged).The plan's "staging/partial GC and disk-cache LRU" cell is now complete: #2189 delivered the staging sweep, this PR delivers the budget-capped LRU over the trees themselves.
prebuilt::lru:{cache}/prebuilt/holding a regularMARKER(written only after the whole tree verified) — the prebuilt root itself, a staging sibling, a partial destination and a loose file are never candidates;obtainnowtouches it on every reuse, so last use — not creation — orders eviction; a failed touch never fails a resolve;MIN_AGE, kept and counted, because there are no leases on this path;FBUILD_PREBUILT_BUDGETonly; unset/empty/unparseable disables the LRU so no existing cache is pruned by surprise (0is a real budget);MAX_REMOVALSper pass, stops as soon as the remaining bytes fit, ≤MAX_SCAN_DIRS/MAX_SCAN_DEPTH, never through a symlink, removal errors reported.Wiring:
bin/entry/prebuilt_gc.rs::prune_onceruns on the same 6 h schedule as the sweep, only when a budget is declared.Evidence:
prebuilt::66 passed / 0 failed (12 new LRU fixtures),entry::prebuilt_gc::6 passed (2 new),fmt --checkclean, boundaryrows=0; dylint_rows=0. The reuse-touch wiring is proven RED — deleting thetouchcall inobtainfailsa_reuse_records_itself_as_the_last_useand nothing else.Remaining cells of the track: source fallback with one retry, manual artifact builder + cold/warm benchmark hook, daemon-wide single-flight. #1882 stays open.
zackees commentedon Nov 27, 2026
Receipt — unit 12 (disk-cache LRU) merged.
PR #2193
agent/1882-disk-cache-lruMERGED 2026-11-27T00:33:33Z, merge commit8ec6b514;origin/main=8ec6b514. Second commit on the track this cycle (#2192008d6ad7was unit 11).What landed —
prebuilt::lru:.prebuilt-tree.jsonmarker; the root, staging siblings, partials and any symlinked marker are never candidates and eviction never traverses a symlink.obtainnowtouches the marker on every reuse, so a hot tree is not evicted while a stale one is. The wiring is proven RED: deleting thetouchcall fails exactlya_reuse_records_itself_as_the_last_useand nothing else.FBUILD_PREBUILT_BUDGET. Unset, empty or unparseable disables the LRU, so no existing cache is pruned by surprise; enabling it is an explicit operator decision.prune_onceon the same 6 h schedule as the staging sweep.Real test output:
prebuilt::66 passed / 0 failed (12 new fixtures);entry::prebuilt_gc::6 passed / 0 failed (2 new);fmt --checkclean; boundary scannerrows=0; dylint_rows=0.CI: 34/34 checks green on the PR head
f1a24aab, includingDylint Full(the gate that policesban_std_pathbuf/ban_std_fs_in_async/ban_poison_panicon new files). Merge group45915046443completed success; post-merge push gates on8ec6b514are green (Crate/LOC/Formatting/Boards/Drift/Lint-spawns/Nightly/Teensy/Uno),ci-minimalpush run still in flight.Honest gap: local clippy never ran this cycle —
soldrrouted builds to a remote forge worker whose build lease stayed held; CI'sDylint Fullstood in as the lint gate. No daemon, CI-variable or workflow change; no bench (the attached ESP32-C6 + LPC11U3x match no open bench cell).Cells still open on this track: source fallback +1 retry, and the artifact builder / bench hook. #1882 stays open.
zackees commentedon Nov 27, 2026
Steward tick 2026-11-27T01:5xZ — unit 13 of this track is shipped as #2194 (
agent/1882-source-fallback, unmerged, 4 files, +443/-2): the source fallback with one retry that this module's README listed as missing.prebuilt::serveis the serving decision and never returns an error: a transient failure (transport, exhausted sources, integrity, archive/IO, cancelled extraction) is retried exactly once — the fetcher keeps its partial so the retry resumes, and each extraction attempt stages in its own.<sha16>.<attempt>.stagingdirectory so a retry cannot inherit debris — while a permanent one (invalid fingerprint/key component, unsupported flavor, unsafe entry, size/entry ceiling, occupied destination, identity conflict) is refused at once with zero requests.Served::Source(Fallback { reason, attempts }), i.e. compile framework from source plus one printable line naming each attempt (Fallback::notice).ATTEMPTS = 2, bounded.Real output:
prebuilt::73 passed / 0 failed (7 new); crate lib 395 passed / 0 failed / 2 ignored; the retry case is RED-proven (ATTEMPTS = 1->a_transient_failure_is_retried_once_and_then_servedfails); fmt clean, boundaryrows=0; dylint_rows=0. Tests drive a real axum server that answers 500 for its first N requests (transient -> Prebuilt, 3 requests; dead source -> Source after exactly 4 requests and 2 attempts; bad fingerprint and foreign marker -> 1 attempt, 0 requests). Local clippy was blocked by a remote forge build lease, so CIDylint Fullis the lint gate.Track cells left: the catalog-consulting call site that would actually call
serveon a build path, the artifact builder, and the cold/warm benchmark hook. This issue stays open.zackees commentedon Nov 27, 2026
Unit 13 on main: source fallback (PR #2194,
80c377e3)Merged 2026-11-27T03:12:42Z after merge-group run 45930563645 completed success (
linux / Checkgreen on the Dell pool; 34 pass / 0 fail / 0 pending before enqueue).What is now in
prebuilt:servereturns a decision, never an error..<sha16>.<attempt>.stagingdir so a retry cannot inherit debris.Served::Source(Fallback{reason, attempts})plusnotice()-> compile from source with one honest line.ATTEMPTS = 2, bounded.Tests:
prebuilt::73 passed / 0 failed (7 new), crate lib 395 passed / 0 failed / 2 ignored. Retry proven RED by loweringATTEMPTSto 1 (transient test fails 0/1), then restored +touched green. Tests drive a real axum server answering 500 for its first N requests: transient -> Prebuilt in 3 requests; dead source -> Source after exactly 2 attempts / 4 requests and no tree; bad fingerprint and foreign marker -> 1 attempt, 0 requests. fmt clean; boundaryrows=0; dylint_rows=0; CIDylint Fullgreen.Track cells remaining on this issue: artifact builder / bench hook. #1882 stays open.
zackees commentedon Nov 27, 2026
Steward tick 2026-11-27T05:2xZ — unit 14 (the manual artifact builder) is up as PR #2195 (
agent/1882-artifact-builder, unmerged by the new-work rule).The publisher half of the track, and it turned up two client defects that no existing fixture could see.
Builder (
prebuilt::pack, hiddenfbuild __prebuilt-pack)tar.zst: entries sorted, mode from the executable bit, uid/gid 0, empty uname/gname, mtime 0 -> the same bytes pack to one digest on any host;base_url;.partsibling, re-hashes it from disk, then renames — a killed run leaves nothing publishable;bucket_keyderives decision 2's key from(product, reference, chip, digest);release/catalogemit the entry the reader accepts (flavor fp-<16>,provides fbuild-fp:<fingerprint>,os: none, single-stream);Two client faults found by the round trip (pack -> real axum server ->
Reader->Fetcher->obtain->extract)fetch::sanitizedkept only the first 48 characters of the asset name. A real v1 core-object name is 53 (arduino-esp32-core-3.3.12-esp32dev.<sha16>.tar.zst), so the local file lost.tar.zstandextractrefused it as an unsupported format — such an asset could never be extracted at all. It now keeps the archive suffix and shortens the stem.extractdropped the archive's execute bits (File::createcannot carry a mode), so a served tree differed from the tree the publisher fingerprinted. Only the execute bits are applied now, never setuid/setgid.Tests (real output)
prebuilt::83 passed / 0 failed (10 new)fbuild-packages-fetch --lib405 passed / 0 failed / 2 ignoredfbuild-cli --bin fbuild prebuilt_pack3 passed / 0 failedrows=0; dylint_rows=0;cargo fmtcleanStill open on this track: the cold/warm benchmark hook — it needs a real framework build to name a configuration where core objects pay before anything is published (§8's own advice). No publish, no workflow files, no new crates. #1882 stays open.
zackees commentedon Nov 27, 2026
Unit 14 (manual artifact builder) landed: PR #2195 merged at 2026-11-27T06:38:54Z;
origin/main=a7394a52("Merge pull request #2195 from FastLED/agent/1882-artifact-builder"). Merge-group run 45951180870 succeeded on the synthetic heada7394a52(Dylint Full PASS, linux/Check PASS, 0 failures before merge).What is now on main:
prebuilt::pack— one deterministictar.zst: entries sorted, mode derived from the exec bit only, uid/gid 0, mtime 0; a symlink, a special file, or an empty tree is refused before a byte is written; output goes to a.part, is re-hashed from disk, then renamed.bucket_key(the decision-2 key derivation) plusrelease/catalogentry emission, so the produced artifact is exactly the shape the client-side reader accepts.fbuild __prebuilt-packentry point; it prints that nothing was uploaded, because publishing remains a maintainer action (doc artifact-serving-decisions.md §8c). New dep edgefbuild-cli -> fbuild-packages-fetch.Two client defects the end-to-end round trip exposed were fixed here (no existing fixture could see either):
fetch::sanitizedtruncated local asset names at 48 chars — a real 53-char v1 core key (arduino-esp32-core-3.3.12-esp32dev.<sha16>.tar.zst) lost its.tar.zstsuffix andextractrefused it outright, so such an asset could never have been extracted. The archive suffix is now preserved and the stem shortened.extractsilently dropped the tar execute bit (File::createcannot carry a mode), so a served tree differed from the fingerprinted one. Exec bits are now applied explicitly (never setuid/setgid).Tests:
prebuilt::83 passed / 0 failed;fbuild-packages-fetch --lib405 passed / 0 failed / 2 ignored;fbuild-cli --bin fbuild prebuilt_test pack3 / 0; boundaryrows=0; dylint_rows=0; fmt clean. CI Dylint Full passed on the second run after one realban_std_pathbuffinding in a new test fixture was fixed in a second commit (no amend).Plan status — remaining cell is only the cold/warm benchmark hook (a fixture benchmark that needs a real framework build, no board involved). Everything else in the plan list is on main: fingerprints, catalog shards, self-contained reader, single-flight fetch/extract/resume, staging GC + disk-cache LRU, source fallback with one retry, per-request opt-in/kill-switch flags, and now the manual artifact builder.
This issue stays open.
zackees commentedon Nov 27, 2026
Steward tick 2026-11-27T08:4xZ — the last plan cell (cold/warm benchmark hook) is blocked on a consumer that does not exist yet, so it is not being written as a harness that cannot measure. Filed the missing cell as #2196. No close keyword: this issue stays OPEN.
Verified on
origin/maina7394a52(2026-11-27):git grep -n "fetches_prebuilt_libs()" -- '*.rs'→ onlycrates/fbuild-build-engine/src/prebuilt.rslines 126/134, i.e. its own unit tests. No build path consumes the policy.git grep -n "prebuilt::" -- 'crates/'→ one production hit:crates/fbuild-cli/src/cli/prebuilt_notice.rs:25(the type behind the notice line).variants::FetchRequest { … }iscrates/fbuild-library/src/library/esp32_framework/libs.rs:253, carrying{name, version, url, variant}— decision 1's mandatedPrebuiltLibsPolicyfield is absent, so--no-prebuilt-libscannot change what is fetched (the@esp-libsper-chip slice is still selected).Why that blocks the hook rather than merely delaying it: decision 6's headline is
cold_first_compile_wall_swith prebuilt libs against the source arm in the same job. With no consumer both arms execute the same code path, so every published ratio would be 1.0 by construction — an unfalsifiable number insite/bench/artifact-serving/, which is worse than no number. The gate ("any rung-6 fallback in a CI build is a hard failure") would also never fire, because no build reaches a rung.State of the track (all on main, re-verified): identity/fingerprint stamps,
obtain/tree_root(008d6ad7),servedecision enum + one retry (80c377e3), disk-cache LRU (8ec6b514), staging GC (99576510), deterministicpack+ bucket key + hiddenfbuild __prebuilt-pack(a7394a52), plus the two client defects that round trip exposed (48-char asset-name truncation dropping.tar.zst; the dropped tar exec bit).Next cell: #2196 — carry the policy on the build request, honour it in
select(), consultservebefore compiling framework libs, recordprebuilt_libsinbuild_info.json. The hook follows it, and with a real consumer it becomes measurable in the same PR series.zackees commentedon Nov 28, 2026
Steward tick 2026-11-28T21:1xZ — dependency satisfied; re-verified cell by cell on
origin/main46b3dcda.The
dependencyblock on this issue was pinned to the trigger "re-verify when #2196 lands". Theconsumer landed in full (#2199, #2200, #2201, #2202, #2203/#2204, #2206, #2207, #2208), so the
trigger has fired and the block is being dropped here — with the verification, not instead of it.
Every plan cell of this issue, checked on
origin/main46b3dcda:crates/fbuild-library/src/library/esp32_framework/prebuilt_core.rs:93fingerprint()(225 lines, decision 8)crates/fbuild-packages-fetch/src/prebuilt/pack.rs:187pack();objects.jsonunit map added by #2201crates/fbuild-packages-fetch/src/prebuilt/reader.rs(282 lines,Reader::new/from_environment).../prebuilt/fetch.rs(531 lines: Range/If-Range resume + process-local single-flight),.../extract.rs.../prebuilt/gc.rs:63sweep_staging,:99sweep_staging_tree;.../prebuilt/lru.rs(242 lines); daemon entrybin/entry/prebuilt_gc.rs.../prebuilt/serve.rs:64serve(),ATTEMPTS = 2, deterministic failures not retriedcrates/fbuild-build-engine/src/prebuilt.rs:41PrebuiltPolicy::resolve,:99fetches_prebuilt_libs; consumer wiringcrates/fbuild-build-esp/src/esp32/orchestrator/packages.rs:55; selectionvariants::FetchRequest.prebuilt_libscrates/fbuild-cli/src/cli/prebuilt_pack.rs(hiddenfbuild __prebuilt-pack),pack.rs:187,--units/--units-fileci/artifact_serving_bench.py+.github/workflows/artifact-serving-bench.yml(#2208, nightly, green-and-idle until a tree is published);warm_incremental_sis PR #2210What is genuinely left, stated as two cells and nothing else:
fallback_rung_histogram(decision 6 metric table): the ladder exposes no rung numbers —ServedisPrebuilt/Source(reason)with no rung, so a histogram today would be invented.This needs the rung carried from the fetch layer up into
prebuilt_libs. In-repo, small, andthe only remaining decision-6 metric with no wiring at all.
--measure --only-if-publishedexits 0 having measurednothing until a tree exists for the reference cell (
esp32s3×framework-arduinoespressif32-libs/core-3.3.12).Publishing one is a maintainer bucket action — the same missing credential that keeps mirror: state db drift, generator drops esp-toolchain, rejected UA, no release tracking #2040 and
audit: hard-coded vendor download URLs that bypass the fbuild mirror bucket (#2029 leftover) #2128 blocked (
gh secret listhas no Spaces/mirror bucket key). No agent can produce this number.So this issue stays OPEN, unblocked: cell 1 is real feature work a steward can take next, and cell 2
re-opens the moment a tree is published. Receipts for the consumer side are on #2196 (comments 4-13).
zackees commentedon Nov 30, 2026
Decision 6's
fallback_rung_histogramis on main — #2215ccc5ef4b(squash of5eceb831, merged 2026-11-30T09:14:59Z; merge-group 46387721719 SUCCESS,linux / Check12050-line log with 0soldr#3377/ 0INFRA -/ 0 relay resets / 0 FAILED / 0error[E, 56test result: ok).What landed (the last in-repo metric cell of decision 6):
prebuilt::Artifact.url: Option<String>— the URL whose body produced the file,Nonewhen the bytes were already verified in the local cache (rung 1, no request at all).prebuilt::Obtainedcarries it through extraction.prebuilt_core::served_outcomerecords it inprebuilt_libs.sourceinstead ofasset.urls[0]. A mirror list's first entry is where an ailing provider sits, so naming it after a build that never reached it is exactly the blind spot the histogram exists to remove. A reuse records the newprebuilt_record::CACHE_SOURCE("cache"), never a mirror.ci/artifact_serving_bench.pyreads each trial's record immediately after the COLD build, before the warm build overwrites it (a warm build always answerscache), bins byserved_bin(source)— host for a URL,cache/sourcefor the two terminal rungs,unknowninstead of a silent drop — and writesarms.<arm>.served_by+ a top-levelfallback_rung_histogram. The document stays additive (schema1, a document withoutserved_byloads).docs/design/artifact-serving-decisions.mdrecords that the bin is the answering source, not a rung number (cache= rung 1,source= rung 6).Tests (real):
fbuild-packages-fetch --lib prebuilt89 passed/0 failed;fbuild-build-esp --lib prebuilt13/0;fbuild-build-engine --lib prebuilt_record6/0;ci.test_artifact_serving_bench41 tests OK; fmt exit 0; boundaryrows=0; dylint_rows=0. RED proven: restoringserved_from: Some(asset.urls.first()…)fails the new assertion (left: https://example.invalid/v1/core.tar.zst / right: https://mirror-two.example/prebuilt/core.tar.zst, exit 101); restored → pass. The Python cold-vs-warm read is covered bytest_the_accounting_comes_from_the_cold_build_not_the_warm_one.Still open on this issue (unchanged, not claimed): a real measured histogram — the nightly
--measureis gated on a published tree, which needs the owner bucket upload.zackees commentedon Dec 1, 2026
In-repo cells re-verified on
origin/main920c354b(2026-12-01). Every code cell of the plan is delivered and CI-green; the one remaining cell is a publishing action, whichdocs/design/artifact-serving-decisions.md§8c reserves to a maintainer ("nothing is published until the fingerprint is install-history-independent, and publishing is a maintainer action"). Blocking at that gate so the ladder stops nominating a feature whose residual no agent can perform.Delivered, with the test that proves it (all green in
linux / Check (ubuntu-latest)job 142710660389 of push run 46664068344 at920c354b, 56 xtest result: ok):crates/fbuild-build-esp/src/esp32/orchestrator/prebuilt_core.rs(config set, canonical argv, exactQuery); packer sidefbuild __prebuilt-pack(crates/fbuild-cli/src/cli/prebuilt_pack.rs) +objects.jsonunit manifest.a_packed_tree_hydrates_through_the_real_publisher ... ok.crates/fbuild-packages-fetch/src/prebuilt/reader.rs(descriptor SHA + exact size re-checked on every cached or fetched shard read).prebuilt::{obtain,tree_root,serve,lru}: single-flight, streaming integrity check, Range/If-Range resume, staging GC, disk-cache LRU.the_ladder_serves_a_published_tree_and_it_is_hydrated ... ok.a_manifest_from_a_newer_publisher_is_refused,a_tree_without_a_manifest_is_refused,a_tree_that_covers_no_unit_is_reported_as_unusable ... ok(failure is never a build failure).PrebuiltPolicy{Disabled,Libs,Core}incrates/fbuild-build-engine/src/prebuilt.rs, carried on the request, honoured byvariants::select(disabled_prebuilt_libs_select_the_whole_bundle_never_a_slice ... ok).a_served_tree_and_a_source_build_archive_to_identical_bytes ... ok).ci/artifact_serving_bench.py+ci/test_artifact_serving_bench.py+.github/workflows/artifact-serving-bench.yml(nightly,--only-if-published, 10 % regression gate).The residual is publication: today's nightly, run 46610960804, completed green with
i.e. the bucket holds no prebuilt core tree. It cannot be produced from CI either:
gh secret list -R FastLED/fbuildstill shows onlyAZURE_*,PROJECT_APP_PRIVATE_KEY,SOLDR_S3_CACHE_{ACCESS,SECRET}_KEY— no Spaces/bucket credential (the same gap as #2040 and #2128), andsite/mirror/manifest.jsononmaincarries 0prebuiltentries.Re-verify (
--unblock-issue 1882) when a prebuilt tree for the reference cell (prebuilt-arduino-esp323.3.12 / esp32s3) is published, when a bucket credential lands in CI, or when a maintainer rules that the fingerprint is install-history-independent and shipping can proceed.