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
{{ message }}
Repository navigation
refactor(platform): phase 9/9 reach zero baseline and make enforcement permanent #1315
The crate-hook false positive is fixed and guarded: dylints/enforce_platform_boundary (a real Cargo.toml in the root [workspace] exclude) was missing from APPROVED_CRATE_DIRS in ci/hooks/crate_guard.py, so the PreToolUse hook denied every edit of that manifest with a "you are creating a new crate" message — blocking work on the permanent whole-tree scanner itself.
MERGED #1912 (e25dd466) adds the entry and ci/test_crate_guard_parity.py, which asserts the batch list == [workspace] members, that every excluded Cargo project is writable through the hook, that the hook authorizes nothing beyond members+exclude+root, and drives the real hook process for allow/deny. python ci/check_workspace_crates.py -> OK: 21 approved workspace members. Refs #1315.
Neither of the phase-9 acceptance criteria that need code was fully satisfiable in one pass, so this lands the two that were self-contained:
1. A capability left the transitional ledger through the boundary.crates/fbuild-daemon/src/handlers/health.rs selected the running image with #[cfg(target_os = "linux")] / #[cfg(not(target_os = "linux"))] pairs in the production handler and in its test. New platform::executable::replace_proof_live_image() puts the handle in each concrete zone (Linux → /proc/self/exe, which keeps naming the loaded inode after the launch path is replaced; Windows/macOS → None) and exposes it from platform/executable.rs with no caller-visible cfg and no host literal in the facade. The daemon keeps its own policy: on hosts without a replace-proof handle it re-checks source_mtime before hashing the launch path.
Ledger 44 → 40 rows, Dylint baseline 43 → 39; the independent whole-tree scanner reports rows=40; dylint_rows=39 and stays in exact agreement with the Dylint projection. ci/platform_boundary_research.tsv regenerated for the moved line numbers (205 rows, unchanged kinds/capabilities).
2. The regeneration escape hatch is deleted (criterion "Transitional baseline and regeneration path are deleted", second half). enforce_platform_boundary.py --write rewrote both the ledger and the Dylint baseline from whatever the tree contained — the inversion of docs/platform-boundary-research-inventory.md L278 ("must explain every delta instead of regenerating a baseline to make CI pass"). Switch and both render* helpers removed; --print-totals (the only mode CI calls, 4 workflow sites) unchanged. A test now asserts --write exits 2 and neither helper exists.
RED proof (criterion "reintroducing any forbidden occurrence fails"): after the commit, adding #[cfg(unix)] to health.rs makes the gate fail with new occurrence: crates/fbuild-daemon/src/handlers/health.rs attr_cfg #[cfg(unix)] host host_mechanic + Dylint baseline and independent scanner disagree, exit 1. Reverted → exit 0.
Still open for the closing pass: zero the baseline, the per-criterion audit table, and three-host validation. Note the ordering: most remaining rows belong to phase 8/9's "deploy, toolchain, emulator, and specialized exceptions" group (parent #1314), so the next unit is naturally esp_qemu* or executable_hash.
crates/fbuild-daemon/src/handlers/health.rs carries no cfg(target_os …) at all; the live-image handle comes from fbuild_core::platform::executable::replace_proof_live_image() (facade L173, consumers L53/L107).
ci/enforce_platform_boundary.py has NO --write mode; --print-totals is the only mode (L307) and CI's 4 call sites use it.
Phase 9/9 ledger migration, 3rd increment: the WebSocket serial handler tests.
Delivered:#2113agent/pty-capability (head 59713191) — new platform::pty capability (PtyPair::open, slave_name, wait_for_master_input, read_master_exact, is_supported) with the native openpty/ttyname_r/poll/read calls in crates/fbuild-core/src/platform/linux/pty.rs
(Windows/macOS report Unsupported; the pair type is unconstructible there). crates/fbuild-daemon/src/handlers/websockets_tests.rs loses all five #[cfg(target_os = "linux")] gates and all ten libc:: call sites, and the
daemon's libc dev-dependency is removed with its last user.
Evidence: -p fbuild-daemon --lib serial_ws 4 passed / 0 failed; red proof
— naming /dev/null as the slave device makes serial_ws_replies_follow_request_order
fail at the attach assertion, so the tests drive the new path and cannot pass
vacuously; -p fbuild-core --lib 452p/0f/2i; -p fbuild-daemon --lib
332p/0f/3i; clippy --all-targets --no-deps -D warnings exit 0; fmt clean; ci.test_enforce_platform_boundary + ci.test_platform_boundary_research
30 tests OK.
Remaining rows (24) — the closing pass, one unit per run: executable_hash.rs 7 (attr_cfg unix), esp_qemu.rs 6 (windows), websockets-free now; esp_qemu_runtime.rs 3, emulator/tests_process.rs 2, platformio_package_resolution.rs 2, emulator/tests_npm_cache.rs 1, qemu_linux_runtime.rs 1, fbuild-python/tests/python_facades/main.rs 1
(current_exe), fbuild-paths/dev_daemon_namespace.rs 1 (current_exe),
plus the authorized in-facade current_exe and the two fbuild-core target
dependency tables. The three-host audit table and zeroing the baseline still
need phase-8's toolchain/emulator group.
#2113 (agent/pty-capability, head 59713191) merged as fc2231ad at 2026-11-20T13:15:45Z via the merge queue (merge-group run 44739776921 success; merge-commit check-runs 18 success / 7 skipped / 5 running / 0 failure).
What landed (this was the handlers/websockets_tests.rs group, 15 of the 40 remaining rows):
Row class
Count
Resolution
libc::openpty / ttyname_r / poll / read
10
new platform::pty::PtyPair::{open, slave_name, wait_for_master_input, read_master_exact}
#[cfg(target_os = "linux")] gates in that file
5
gone — tests ask pty::is_supported() and runtime-skip
daemon libc dev-dependency
1
removed with its last user
Native calls live in crates/fbuild-core/src/platform/linux/pty.rs (exempt concrete zone).
Windows/macOS return Err(Unsupported) behind an Infallible field, so the success value is unconstructible there.
Red proof: naming /dev/null as the slave device makes serial_ws_replies_follow_request_order fail at the attach assertion, so the tests genuinely drive the new path rather than passing vacuously.
Remaining 24 rows: executable_hash 7, esp_qemu 6, esp_qemu_runtime 3, and the residue across the remaining files. Those plus zeroing the baseline and the closing three-host audit table are the rest of this issue — it stays open.
Ledger 24 -> 15 rows, Dylint baseline 24 -> 15, research inventory regenerated, boundary unittest's explicit count updated to 15. enforce_platform_boundary.py --print-totals = rows=15; dylint_rows=15 exit 0; research --check exit 0; 30 boundary unittests OK.
Non-vacuity: the new a_written_memo_is_trusted_instead_of_rehashing spoofs the digest stored in the memo file after the first hash and requires the second call to return the spoiled value — a direct rehash fails it. Unsupported hosts assert the opposite (no memo written, direct hash).
Remaining rows (15):esp_qemu.rs 6, esp_qemu_runtime.rs 3, platformio_package_resolution.rs 2, emulator/tests_process.rs 2, emulator/tests_npm_cache.rs 1, qemu_linux_runtime.rs 1 — plus the phase-8 toolchain/emulator group and the closing three-host audit table.
Delivered this unit: executable identity, the largest remaining ledger group (9 rows).
New capability platform::fs::executable_memo_supported() — Linux/macOS true (inode+ctime memo), Windows false; the exact split the old #[cfg(unix)] pair encoded.
crates/fbuild-paths/src/executable_hash.rs now has ONE implementation: the memo path only when supported, else direct hashing (7 cfg rows removed; the sole remaining #[cfg(...)] in the file is the #[cfg(test)] module gate).
dev_daemon_namespace::hash_current_exe and the Python facade test now use platform::executable::current_image() instead of std::env::current_exe (2 rows removed).
one stage_runtime_libraries(&path)? call at each of the five resolution arms; build_windows_qemu_path_env composes platform::runtime::runtime_library_dirs
3
toolchain/esp_qemu_runtime.rs
#[cfg(target_os = "linux")] / #[cfg(not(target_os = "linux"))] bodies in probe_qemu_binary + cfg_attr(not(linux), allow(dead_code)) on QemuProbe
platform::runtime::probe_binary behind a neutral BinaryProbe; the private enum is gone
New capability fbuild_core::platform::runtime: probe_binary, stage_runtime_libraries, runtime_library_dirs, library_path_var.
Linux probes (LD_LIBRARY_PATH) and stages nothing; Windows stages libiconv-2.dll beside the executable and reports PATH directories (the %ProgramFiles%\Git / %LOCALAPPDATA% avr-gcc discovery moved with it); macOS
binaries are self-contained and need neither. The lazy runtime-bundle policy,
the ETXTBSY retry, and both diagnostics stay in the toolchain.
Ledger: rows=15; dylint_rows=15 → rows=6; dylint_rows=6 — a migration,
not a re-baseline: the rows are gone because the selections are gone. ci/platform_boundary_research.tsv regenerated; the explicit count in ci/test_enforce_platform_boundary.py lowered to 6.
Receipts: -p fbuild-core --lib platform:: 77p/0f; -p fbuild-toolchain --lib
203p/0f/6i (the three probe tests now run through the capability); red proof —
forcing the Linux probe to report Started fails probe_linux_detects_missing_shared_library_exit_127 and probe_linux_exports_the_bundle_on_ld_library_path; workspace cargo check --all-targets --exclude fbuild-python clean; clippy -D warnings clean on both
crates; enforce_platform_boundary --print-totals exit 0; research --check
exit 0; ci unittest 30 OK.
Remaining 6 rows: fbuild-core/tests/it/platformio_package_resolution.rs ×2, fbuild-daemon/src/handlers/emulator/tests_npm_cache.rs ×1, handlers/emulator/tests_process.rs ×2, fbuild-packages/tests/it/qemu_linux_runtime.rs ×1 (#![cfg(target_os)] file
header). #1315 stays open for those plus the closing three-host audit.
The last six baselined occurrences were all test-only OS branches. PR #2119 removes them by asking the facade at run time, so ci/platform_boundary_ledger.tsv, ci/dylints/enforce_platform_boundary/src/baseline.txt and the research inventory now read 0.
file-URL mapping is host-adaptive (Url::to_file_path keeps the drive letter on Windows, folds it into /C: elsewhere) → expectation named at run time, now asserted on both hosts
fbuild-daemon/.../emulator/tests_npm_cache.rs
1
clearing PATHEXT only means something where PATHEXT exists
fbuild-daemon/.../emulator/tests_process.rs
2
script-runner shape is a runtime host fact; shell spelling via platform::executable::native_name
fbuild-packages/tests/it/qemu_linux_runtime.rs
1 (#![cfg(target_os)])
bundle provisioning is a Linux host policy → compiles everywhere, skips at run time
Progress across this pass: 44 → 40 (#2112) → 24 (#2113) → 15 (#2115) → 6 (#2116) → 0.
Two things worth recording:
An empty baseline is still a guard. Re-injecting one #[cfg(windows)] fails the gate with new occurrence … 0 host host_mechanic + Dylint baseline and independent scanner disagree, exit 1.
Emptying the ledger exposed five validation tests that borrowed row 0 from the committed data (IndexError, plus two assertions that had become vacuous once the data they indexed was gone). They now build a synthetic row over a real non-exempt source file, so they test the validation logic rather than the current contents of the ledger. test_no_raw_host_fact_reads_remain_outside_the_boundary and friends now assert over an empty set, which is the intended end state, and the explicit len(self.expected) == 0 keeps any new occurrence from landing silently.
Also forced by the repo's own guard: test_executable_spelling_does_not_bypass_the_executable_facade caught my first draft, which had cmd.exe as a literal inside a host branch — the spelling now comes from the executable facade.
Remaining cell: the closing three-host audit table (Linux run + Windows/macOS provenance by compilation and the full / windows / Check lane). #1315 stays open for that.
Phase 9/9 ledger is now zero on main and the gate that polices it accepts that as the end state.
Merged d3f6c86c (#2119) lands the last 6 test-only OS branches:
file-level #![cfg(target_os = "linux")] gone; bundle provisioning is a Linux policy, skips at run time
Ledger 6 → 0, Dylint baseline 6 → 0, enforce_platform_boundary.py --print-totals = rows=0; dylint_rows=0 on main (read back at d3f6c86c); re-injecting one #[cfg(windows)] still exits 1, so the empty baseline is a guard,
not a mute.
The zeroing exposed a gate bug, fixed in the same PR (f62c7ed6):.github/workflows/dylint.yml derives its
cross-target package list from baseline.txt and then asserted that list was non-empty. With a legitimately empty
ledger test 0 -gt 0 aborted the step under bash -e, so Dylint Full failed with no error message at all
(exit 1 straight after ##[endgroup]). The step now counts data rows explicitly: empty → "no cross-target passes
needed" plus the whole-workspace Linux pass; non-empty → unchanged behaviour, with a stronger guard (every data row
must name a crate package and the derived list must be non-empty, so a parse regression cannot silently narrow the pass).
Restored 6-row baseline still derives 3 packages / 3 targets; a corrupt row still exits 1. render_workflows --check
rc 0, ci unit suites 72 tests OK, Dylint Full pass 10m32s on the PR head, 22 SUCCESS / 9 SKIPPED / 0 failing.
Progress across the phase: 44 → 40 → 24 → 15 → 6 → 0 rows. Remaining cell for this issue: the closing
three-host audit table (Linux measured here; the Windows/macOS halves of the migrated capabilities are proven by
compilation and the full / windows / Check lane, not by a local run). #1315 stays open.
The requirement-by-requirement audit against #1306 is written and every number in it was
produced by a command on the tree, not projected. End state: ledger 0 data rows, Dylint
baseline 0, enforce_platform_boundary.py --print-totals → rows=0; dylint_rows=0,
research --check exit 0, onecfg_select! (three arms, no fallback), 21 workspace
members, native dependencies only in fbuild-core, and 166 of the 172 research-inventory
rows inside crates/fbuild-core/src/platform/** with the other 6 in that crate's manifest.
Ledger contraction: 505 → 272 → 163 → 108 → 95 → 58 → 34 → 45 (one 2026-09 growth) → 41
→ 25 → 16 → 7 → 0.
The audit's three-host run earned its keep: it found two Windows-only clippy errors that main had been carrying because check-windows.yml / check-macos.yml only run through ci-full and their last successes were 2026-11-01 (6b64d783) and 2026-08-28 (cab2098e).
Site
Lint
Fixed by
platform/windows/runtime.rs:66
useless_conversion on an identity NormalizedPath::from
Reproducible locally with clippy --target x86_64-pc-windows-msvc --all-targets --no-deps,
which is how the second one was found; the same lane is green on this PR's head and the
Linux lanes are unaffected (cargo test -p fbuild-daemon --lib websockets: 19 passed).
PR #2120 now carries only the document (diff vs main: docs/platform-boundary-closeout.md
plus two index links). Remaining closeout cells: that PR lands, then this issue and #1306
close with this evidence. No close keyword here.
RED proof shows reintroducing any forbidden occurrence fails
Live on c33cb403: appending #[cfg(windows)] to platform/host.rs -> rows=0; dylint_rows=0exit 1 with new occurrence: … attr_cfg … host_mechanic + Dylint baseline and independent scanner disagree; injecting #[cfg(unix)] + std::os::unix::fs::MetadataExt::dev into platform/executable.rs -> exit 1 reporting both attr_cfg and native_path. Both reverted -> exit 0, git status clean.
Transitional baseline and regeneration path are deleted
dylints/enforce_platform_boundary/src/baseline.txt = header line only; ci/platform_boundary_ledger.tsv = 0 data rows; grep 'write|dump' ci/enforce_platform_boundary.py = 0 hits (--print-totals is the only mode).
Permanent enforcement reports zero unclassified occurrences over all handwritten Rust sources
Exactly one production selector remains and has no fallback
grep -rn 'cfg_select!' crates/ = 1 hit, crates/fbuild-core/src/platform/mod.rs:17, three arms (windows/linux/macos), no _ arm — an unsupported host fails to compile.
No new workspace crate exists and no temporary adapter remains
21 approved members (unchanged); no crate outside the authorized boundary declares a native dependency: grep -rn 'windows-sys|libc|interprocess|socket2' --include=Cargo.toml crates/ -> only crates/fbuild-core/Cargo.toml (the rest are [workspace.dependencies] declarations in the root manifest).
Full repository validation and required three-host CI are GREEN
#2120 checks: 135 total, 123 SUCCESS / 12 SKIPPED / 0 failing, incl. full / windows / Check (windows-latest) and full / macos / Test on macos-15 and macos-15-intel. Dylint Full pass 10m32s; ci.test_enforce_platform_boundary + test_platform_boundary_research + test_rust_toolchain_pins -> 38 tests OK (re-run just now).
The PR records the final audit against every #1306 acceptance criterion
docs/platform-boundary-closeout.md on main (§3 = the #1306 table, §5 = the three-host matrix).
After merge, all phase issues are closed and #1306 can be closed with verified evidence
Phase issues #1314 (8/9) and this issue closed in this pass, then #1306.
Note for the record: the closeout's ci-full run was not ceremony — it caught two Windows-only lints invisible to every Linux lane (useless_conversion in platform/windows/runtime.rs, drop_non_drop on PtyPair), fixed by @zackees as #2122f0cc1c23.
Activity
zackees commentedon Nov 5, 2026
The crate-hook false positive is fixed and guarded:
dylints/enforce_platform_boundary(a realCargo.tomlin the root[workspace] exclude) was missing fromAPPROVED_CRATE_DIRSinci/hooks/crate_guard.py, so the PreToolUse hook denied every edit of that manifest with a "you are creating a new crate" message — blocking work on the permanent whole-tree scanner itself.MERGED #1912 (
e25dd466) adds the entry andci/test_crate_guard_parity.py, which asserts the batch list ==[workspace] members, that every excluded Cargo project is writable through the hook, that the hook authorizes nothing beyond members+exclude+root, and drives the real hook process for allow/deny.python ci/check_workspace_crates.py->OK: 21 approved workspace members. Refs #1315.zackees commentedon Nov 20, 2026
Steward receipt — phase 9/9, first landing: PR #2112 (unmerged, awaiting review).
What moved
Neither of the phase-9 acceptance criteria that need code was fully satisfiable in one pass, so this lands the two that were self-contained:
1. A capability left the transitional ledger through the boundary.
crates/fbuild-daemon/src/handlers/health.rsselected the running image with#[cfg(target_os = "linux")]/#[cfg(not(target_os = "linux"))]pairs in the production handler and in its test. Newplatform::executable::replace_proof_live_image()puts the handle in each concrete zone (Linux →/proc/self/exe, which keeps naming the loaded inode after the launch path is replaced; Windows/macOS →None) and exposes it fromplatform/executable.rswith no caller-visible cfg and no host literal in the facade. The daemon keeps its own policy: on hosts without a replace-proof handle it re-checkssource_mtimebefore hashing the launch path.Ledger 44 → 40 rows, Dylint baseline 43 → 39; the independent whole-tree scanner reports
rows=40; dylint_rows=39and stays in exact agreement with the Dylint projection.ci/platform_boundary_research.tsvregenerated for the moved line numbers (205 rows, unchanged kinds/capabilities).2. The regeneration escape hatch is deleted (criterion "Transitional baseline and regeneration path are deleted", second half).
enforce_platform_boundary.py --writerewrote both the ledger and the Dylint baseline from whatever the tree contained — the inversion ofdocs/platform-boundary-research-inventory.mdL278 ("must explain every delta instead of regenerating a baseline to make CI pass"). Switch and bothrender*helpers removed;--print-totals(the only mode CI calls, 4 workflow sites) unchanged. A test now asserts--writeexits 2 and neither helper exists.RED proof (criterion "reintroducing any forbidden occurrence fails"): after the commit, adding
#[cfg(unix)]tohealth.rsmakes the gate fail withnew occurrence: crates/fbuild-daemon/src/handlers/health.rs attr_cfg #[cfg(unix)] host host_mechanic+Dylint baseline and independent scanner disagree, exit 1. Reverted → exit 0.Verified:
-p fbuild-core --lib platform::74 passed / 0 failed;-p fbuild-daemon --lib health9 passed / 0 failed (incl.hashes_loaded_image_only_for_loopback_callers); clippy-p fbuild-core -p fbuild-daemon --all-targets --no-deps -D warningsexit 0; fmt clean;ci.test_enforce_platform_boundary+ci.test_platform_boundary_research30 tests OK; research--checkexit 0.Remaining cells (the rest of phase 9)
The ledger is now 40 classified rows in 11 files — each needs its own capability migration before the baseline can be deleted:
crates/fbuild-daemon/src/handlers/websockets_tests.rs(5attr_cfg+ 10native_path)crates/fbuild-paths/src/executable_hash.rs(unix-only memo)crates/fbuild-toolchain/src/toolchain/esp_qemu.rscrates/fbuild-toolchain/src/toolchain/esp_qemu_runtime.rscrates/fbuild-daemon/src/handlers/emulator/tests_process.rscrates/fbuild-core/tests/it/platformio_package_resolution.rsfbuild-python/tests/python_facades/main.rs,fbuild-paths/src/dev_daemon_namespace.rs,fbuild-packages/tests/it/qemu_linux_runtime.rs,fbuild-daemon/src/handlers/emulator/tests_npm_cache.rs,fbuild-daemon/Cargo.toml(libc,process)Still open for the closing pass: zero the baseline, the per-criterion audit table, and three-host validation. Note the ordering: most remaining rows belong to phase 8/9's "deploy, toolchain, emulator, and specialized exceptions" group (parent #1314), so the next unit is naturally
esp_qemu*orexecutable_hash.#1315 stays open.
zackees commentedon Nov 20, 2026
Steward receipt 2026-11-20T10:5xZ — phase-9 increment (2) merged: PR #2112
9c5df756(merge commit, main tip).Verified on
9c5df756:crates/fbuild-daemon/src/handlers/health.rscarries nocfg(target_os …)at all; the live-image handle comes fromfbuild_core::platform::executable::replace_proof_live_image()(facade L173, consumers L53/L107).ci/enforce_platform_boundary.pyhas NO--writemode;--print-totalsis the only mode (L307) and CI's 4 call sites use it.--print-totals→rows=40; dylint_rows=39, exit 0) — down from 44/43 before refactor(platform): own the live image path behind the facade; delete the ledger regeneration hatch #2112, i.e. a migration of one capability out of the ledger plus the escape-hatch deletion, not a re-baseline.This issue stays OPEN: 40 classified rows remain (websockets_tests 15, executable_hash 7, esp_qemu 6, esp_qemu_runtime 3, …) plus the closing three-host audit table. Remaining cells are phase-8's toolchain/emulator group, one capability per steward run.
zackees commentedon Nov 20, 2026
Phase 9/9 ledger migration, 3rd increment: the WebSocket serial handler tests.
Delivered: #2113
agent/pty-capability(head59713191) — newplatform::ptycapability (PtyPair::open,slave_name,wait_for_master_input,read_master_exact,is_supported) with the nativeopenpty/ttyname_r/poll/readcalls incrates/fbuild-core/src/platform/linux/pty.rs(Windows/macOS report
Unsupported; the pair type is unconstructible there).crates/fbuild-daemon/src/handlers/websockets_tests.rsloses all five#[cfg(target_os = "linux")]gates and all tenlibc::call sites, and thedaemon's
libcdev-dependency is removed with its last user.Counts: ledger 40 → 24 occurrences, Dylint baseline 39 → 24, research
TSV regenerated (
--checkexit 0),ci/test_enforce_platform_boundary.pyrowcount 40 → 24. Both cross-host checks agree:
rows=24; dylint_rows=24.Evidence:
-p fbuild-daemon --lib serial_ws4 passed / 0 failed; red proof— naming
/dev/nullas the slave device makesserial_ws_replies_follow_request_orderfail at the attach assertion, so the tests drive the new path and cannot pass
vacuously;
-p fbuild-core --lib452p/0f/2i;-p fbuild-daemon --lib332p/0f/3i; clippy
--all-targets --no-deps -D warningsexit 0; fmt clean;ci.test_enforce_platform_boundary+ci.test_platform_boundary_research30 tests OK.
Remaining rows (24) — the closing pass, one unit per run:
executable_hash.rs7 (attr_cfg unix),esp_qemu.rs6 (windows),websockets-free now;esp_qemu_runtime.rs3,emulator/tests_process.rs2,platformio_package_resolution.rs2,emulator/tests_npm_cache.rs1,qemu_linux_runtime.rs1,fbuild-python/tests/python_facades/main.rs1(
current_exe),fbuild-paths/dev_daemon_namespace.rs1 (current_exe),plus the authorized in-facade
current_exeand the twofbuild-coretargetdependency tables. The three-host audit table and zeroing the baseline still
need phase-8's toolchain/emulator group.
#1315 stays open.
zackees commentedon Nov 20, 2026
Steward receipt — phase 9/9 increment merged.
#2113(agent/pty-capability, head59713191) merged asfc2231adat 2026-11-20T13:15:45Z via the merge queue (merge-group run 44739776921 success; merge-commit check-runs 18 success / 7 skipped / 5 running / 0 failure).What landed (this was the
handlers/websockets_tests.rsgroup, 15 of the 40 remaining rows):libc::openpty/ttyname_r/poll/readplatform::pty::PtyPair::{open, slave_name, wait_for_master_input, read_master_exact}#[cfg(target_os = "linux")]gates in that filepty::is_supported()and runtime-skiplibcdev-dependencycrates/fbuild-core/src/platform/linux/pty.rs(exempt concrete zone).Err(Unsupported)behind anInfalliblefield, so the success value is unconstructible there./dev/nullas the slave device makesserial_ws_replies_follow_request_orderfail at the attach assertion, so the tests genuinely drive the new path rather than passing vacuously.Boundary state on main after the merge:
ci/enforce_platform_boundary.py --print-totals→rows=24; dylint_rows=24(was 40/39).baseline.txt39 → 24;ci/platform_boundary_research.tsvregenerated (--checkexit 0); explicit row count inci/test_enforce_platform_boundary.pyupdated.Remaining 24 rows:
executable_hash7,esp_qemu6,esp_qemu_runtime3, and the residue across the remaining files. Those plus zeroing the baseline and the closing three-host audit table are the rest of this issue — it stays open.zackees commentedon Nov 20, 2026
Phase 9/9 progress — executable identity migrated: PR #2115 (
agent/executable-identity, head29849585).Delivered in that PR
fbuild-paths/src/executable_hash.rs(#[cfg(unix)]x5,#[cfg(all(test,unix))],#[cfg(not(unix))])platform::fs::executable_memo_supported()(trueLinux/macOS from inode+ctime,falseWindows)fbuild-paths/src/dev_daemon_namespace.rsstd::env::current_exeplatform::executable::current_image()fbuild-python/tests/python_facades/main.rsstd::env::current_exeplatform::executable::current_image()Ledger 24 -> 15 rows, Dylint baseline 24 -> 15, research inventory regenerated, boundary unittest's explicit count updated to 15.
enforce_platform_boundary.py --print-totals=rows=15; dylint_rows=15exit 0; research--checkexit 0; 30 boundary unittests OK.Non-vacuity: the new
a_written_memo_is_trusted_instead_of_rehashingspoofs the digest stored in the memo file after the first hash and requires the second call to return the spoiled value — a direct rehash fails it. Unsupported hosts assert the opposite (no memo written, direct hash).Remaining rows (15):
esp_qemu.rs6,esp_qemu_runtime.rs3,platformio_package_resolution.rs2,emulator/tests_process.rs2,emulator/tests_npm_cache.rs1,qemu_linux_runtime.rs1 — plus the phase-8 toolchain/emulator group and the closing three-host audit table.This issue stays open.
zackees commentedon Nov 20, 2026
Steward receipt — PR #2115 merged
6f738585(2026-11-20T15:49:08Z, merge queue, merge-group run 44764540956 success).Delivered this unit: executable identity, the largest remaining ledger group (9 rows).
platform::fs::executable_memo_supported()— Linux/macOStrue(inode+ctime memo), Windowsfalse; the exact split the old#[cfg(unix)]pair encoded.crates/fbuild-paths/src/executable_hash.rsnow has ONE implementation: the memo path only when supported, else direct hashing (7 cfg rows removed; the sole remaining#[cfg(...)]in the file is the#[cfg(test)]module gate).dev_daemon_namespace::hash_current_exeand the Python facade test now useplatform::executable::current_image()instead ofstd::env::current_exe(2 rows removed).Ledger 24 → 15, Dylint baseline 24 → 15, research TSV regenerated, boundary unittest's explicit row count 24 → 15.
Read-back on
6f738585:origin/maintip is the merge commit;executable_memo_supportedatplatform/fs.rsL111; ledger = 15 data rows;baseline.txt= 15 lines. Merge-commit check-runs at read time: 18 success / 7 skipped / 5 running / 0 failure.Remaining 15 rows (next single units):
esp_qemu6 (fbuild-toolchain),esp_qemu_runtime3 (tests/it/qemu_linux_runtime.rs#![cfg(target_os)]), plus residue (platformio_package_resolution 2, emulator tests_npm_cache 1, tests_process 2, one more). Then the closing pass: baseline zeroing + the three-host audit table.This issue stays open; the remaining rows are the tracked work.
zackees commentedon Nov 20, 2026
Phase 9/9 progress — the QEMU runtime-library group is delivered (#2116).
Largest remaining group in the enforcement ledger, taken as one unit:
toolchain/esp_qemu.rs#[cfg(windows)]×4 +#[cfg(not(windows))]×2 aroundhydrate_windows_runtime/validate_windows_runtime(4 prod, 2 test)stage_runtime_libraries(&path)?call at each of the five resolution arms;build_windows_qemu_path_envcomposesplatform::runtime::runtime_library_dirstoolchain/esp_qemu_runtime.rs#[cfg(target_os = "linux")]/#[cfg(not(target_os = "linux"))]bodies inprobe_qemu_binary+cfg_attr(not(linux), allow(dead_code))onQemuProbeplatform::runtime::probe_binarybehind a neutralBinaryProbe; the private enum is goneNew capability
fbuild_core::platform::runtime:probe_binary,stage_runtime_libraries,runtime_library_dirs,library_path_var.Linux probes (
LD_LIBRARY_PATH) and stages nothing; Windows stageslibiconv-2.dllbeside the executable and reportsPATHdirectories (the%ProgramFiles%\Git/%LOCALAPPDATA%avr-gcc discovery moved with it); macOSbinaries are self-contained and need neither. The lazy runtime-bundle policy,
the
ETXTBSYretry, and both diagnostics stay in the toolchain.Ledger:
rows=15; dylint_rows=15→rows=6; dylint_rows=6— a migration,not a re-baseline: the rows are gone because the selections are gone.
ci/platform_boundary_research.tsvregenerated; the explicit count inci/test_enforce_platform_boundary.pylowered to 6.Receipts:
-p fbuild-core --lib platform::77p/0f;-p fbuild-toolchain --lib203p/0f/6i (the three probe tests now run through the capability); red proof —
forcing the Linux probe to report
Startedfailsprobe_linux_detects_missing_shared_library_exit_127andprobe_linux_exports_the_bundle_on_ld_library_path; workspacecargo check --all-targets --exclude fbuild-pythonclean; clippy-D warningsclean on bothcrates;
enforce_platform_boundary --print-totalsexit 0; research--checkexit 0; ci unittest 30 OK.
Remaining 6 rows:
fbuild-core/tests/it/platformio_package_resolution.rs×2,fbuild-daemon/src/handlers/emulator/tests_npm_cache.rs×1,handlers/emulator/tests_process.rs×2,fbuild-packages/tests/it/qemu_linux_runtime.rs×1 (#![cfg(target_os)]fileheader). #1315 stays open for those plus the closing three-host audit.
fix(platform): carry NormalizedPath through the Windows runtime disco…
zackees commentedon Nov 20, 2026
Steward receipt — ledger reaches zero (PR #2119).
The last six baselined occurrences were all test-only OS branches. PR #2119 removes them by asking the facade at run time, so
ci/platform_boundary_ledger.tsv,ci/dylints/enforce_platform_boundary/src/baseline.txtand the research inventory now read 0.cfgfbuild-core/tests/it/platformio_package_resolution.rsUrl::to_file_pathkeeps the drive letter on Windows, folds it into/C:elsewhere) → expectation named at run time, now asserted on both hostsfbuild-daemon/.../emulator/tests_npm_cache.rsPATHEXTonly means something wherePATHEXTexistsfbuild-daemon/.../emulator/tests_process.rsplatform::executable::native_namefbuild-packages/tests/it/qemu_linux_runtime.rs#![cfg(target_os)])Progress across this pass: 44 → 40 (
#2112) → 24 (#2113) → 15 (#2115) → 6 (#2116) → 0.Two things worth recording:
#[cfg(windows)]fails the gate withnew occurrence … 0 host host_mechanic+Dylint baseline and independent scanner disagree, exit 1.IndexError, plus two assertions that had become vacuous once the data they indexed was gone). They now build a synthetic row over a real non-exempt source file, so they test the validation logic rather than the current contents of the ledger.test_no_raw_host_fact_reads_remain_outside_the_boundaryand friends now assert over an empty set, which is the intended end state, and the explicitlen(self.expected) == 0keeps any new occurrence from landing silently.Also forced by the repo's own guard:
test_executable_spelling_does_not_bypass_the_executable_facadecaught my first draft, which hadcmd.exeas a literal inside a host branch — the spelling now comes from the executable facade.Remaining cell: the closing three-host audit table (Linux run + Windows/macOS provenance by compilation and the
full / windows / Checklane). #1315 stays open for that.zackees commentedon Nov 20, 2026
Phase 9/9 ledger is now zero on
mainand the gate that polices it accepts that as the end state.Merged
d3f6c86c(#2119) lands the last 6 test-only OS branches:crates/fbuild-core/tests/it/platformio_package_resolution.rsUrl::to_file_pathis host-adaptive (drive letter vs/C:fold), so the expectation is named at run time and the case covers both hostscrates/fbuild-daemon/src/handlers/emulator/tests_npm_cache.rsPATHEXTaskshost::is_windows()instead of compiling for one hostcrates/fbuild-daemon/src/handlers/emulator/tests_process.rsplatform::executable::native_namecrates/fbuild-packages/tests/it/qemu_linux_runtime.rs#![cfg(target_os = "linux")]gone; bundle provisioning is a Linux policy, skips at run timeLedger
6 → 0, Dylint baseline6 → 0,enforce_platform_boundary.py --print-totals=rows=0; dylint_rows=0onmain(read back atd3f6c86c); re-injecting one#[cfg(windows)]still exits 1, so the empty baseline is a guard,not a mute.
The zeroing exposed a gate bug, fixed in the same PR (
f62c7ed6):.github/workflows/dylint.ymlderives itscross-target package list from
baseline.txtand then asserted that list was non-empty. With a legitimately emptyledger
test 0 -gt 0aborted the step underbash -e, soDylint Fullfailed with no error message at all(exit 1 straight after
##[endgroup]). The step now counts data rows explicitly: empty → "no cross-target passesneeded" plus the whole-workspace Linux pass; non-empty → unchanged behaviour, with a stronger guard (every data row
must name a crate package and the derived list must be non-empty, so a parse regression cannot silently narrow the pass).
Restored 6-row baseline still derives 3 packages / 3 targets; a corrupt row still exits 1.
render_workflows --checkrc 0, ci unit suites 72 tests OK,
Dylint Fullpass 10m32s on the PR head, 22 SUCCESS / 9 SKIPPED / 0 failing.Progress across the phase: 44 → 40 → 24 → 15 → 6 → 0 rows. Remaining cell for this issue: the closing
three-host audit table (Linux measured here; the Windows/macOS halves of the migrated capabilities are proven by
compilation and the
full / windows / Checklane, not by a local run). #1315 stays open.zackees commentedon Nov 21, 2026
Phase 9/9 closeout audit — PR #2120 (open,
ci-full).The requirement-by-requirement audit against #1306 is written and every number in it was
produced by a command on the tree, not projected. End state: ledger 0 data rows, Dylint
baseline 0,
enforce_platform_boundary.py --print-totals→rows=0; dylint_rows=0,research
--checkexit 0, onecfg_select!(three arms, no fallback), 21 workspacemembers, native dependencies only in
fbuild-core, and 166 of the 172 research-inventoryrows inside
crates/fbuild-core/src/platform/**with the other 6 in that crate's manifest.Ledger contraction: 505 → 272 → 163 → 108 → 95 → 58 → 34 → 45 (one 2026-09 growth) → 41
→ 25 → 16 → 7 → 0.
The audit's three-host run earned its keep: it found two Windows-only clippy errors that
mainhad been carrying becausecheck-windows.yml/check-macos.ymlonly run throughci-fulland their last successes were 2026-11-01 (6b64d783) and 2026-08-28 (cab2098e).platform/windows/runtime.rs:66useless_conversionon an identityNormalizedPath::fromf0cc1c23)handlers/websockets_tests.rs:265,322drop_non_drop(drop()on aPtyPairwith no drop glue)PtyPair::close())Reproducible locally with
clippy --target x86_64-pc-windows-msvc --all-targets --no-deps,which is how the second one was found; the same lane is green on this PR's head and the
Linux lanes are unaffected (
cargo test -p fbuild-daemon --lib websockets: 19 passed).PR #2120 now carries only the document (diff vs
main:docs/platform-boundary-closeout.mdplus two index links). Remaining closeout cells: that PR lands, then this issue and #1306
close with this evidence. No close keyword here.
zackees commentedon Nov 21, 2026
Phase 9/9 verified DELIVERED on
mainc33cb403(2026-11-21). Closing.The closing audit merged as #2120
7586ecf4(docs/platform-boundary-closeout.md, requirement-by-requirement against #1306). Re-verified live this run:c33cb403: appending#[cfg(windows)]toplatform/host.rs->rows=0; dylint_rows=0exit 1 withnew occurrence: … attr_cfg … host_mechanic+Dylint baseline and independent scanner disagree; injecting#[cfg(unix)]+std::os::unix::fs::MetadataExt::devintoplatform/executable.rs-> exit 1 reporting bothattr_cfgandnative_path. Both reverted -> exit 0,git statusclean.dylints/enforce_platform_boundary/src/baseline.txt= header line only;ci/platform_boundary_ledger.tsv= 0 data rows;grep 'write|dump' ci/enforce_platform_boundary.py= 0 hits (--print-totalsis the only mode).enforce_platform_boundary.py --print-totals->rows=0; dylint_rows=0exit 0;platform_boundary_research.py --checkexit 0;check_workspace_crates.py->OK: 21 approved workspace members;check_rust_toolchain_pins.pyexit 0 (1.95.0).grep -rn 'cfg_select!' crates/= 1 hit,crates/fbuild-core/src/platform/mod.rs:17, three arms (windows/linux/macos), no_arm — an unsupported host fails to compile.grep -rn 'windows-sys|libc|interprocess|socket2' --include=Cargo.toml crates/-> onlycrates/fbuild-core/Cargo.toml(the rest are[workspace.dependencies]declarations in the root manifest).full / windows / Check (windows-latest)andfull / macos / Testonmacos-15andmacos-15-intel.Dylint Fullpass 10m32s;ci.test_enforce_platform_boundary + test_platform_boundary_research + test_rust_toolchain_pins-> 38 tests OK (re-run just now).docs/platform-boundary-closeout.mdon main (§3 = the #1306 table, §5 = the three-host matrix).Note for the record: the closeout's
ci-fullrun was not ceremony — it caught two Windows-only lints invisible to every Linux lane (useless_conversioninplatform/windows/runtime.rs,drop_non_droponPtyPair), fixed by @zackees as #2122f0cc1c23.