feat(retained): bounded source inspection through the private controller (#7955)

Closed
LO
1mo ago
+4236-236

What

Slice 5 of the stack replacing draft PR #8124. Squashes Cut C
(816687fa06..34a2605233), its review repairs (d997c84f59..6661b2f990) and
the deadline compatibility fix (ac4680d987, b354dca3af).

Behind the default-off retained-runtime feature, processing can drive a
bounded source inspection through the private retained controller:
authenticated inspection roots, revalidation after scope restoration,
composed local limits (work, bytes, deadline) layered onto the original
account, a deadline checked inside constructor source loops and at the
diagnostic byte borrow, isolated resumed-allowance terminal state, opt-in
backing charges, preserved diagnostic causes, and census rows kept after a
delivery refusal. The census example binds its build identity.

An expired inspection deadline is reported through the existing
ProgramStop::Cancelled and recorded internally
(inspection_deadline_fired, #[doc(hidden)]), so geometry::Error gains
no public variant and exhaustive downstream matches keep compiling with the
feature on.

The shared initial oracle-dispatch helper gains the Cut C busy-report
observer.

Review fixes included in this restack

Materializes diagnostic bytes per census row while its inspection is live, keeps source_step() a no-op on default builds while preserving prior structural stop checks, and isolates local allowance refusals from the caller account. Four tests were changed because they asserted the previous poisoned-account behavior. Inspection deadline expiry still records Cancelled on the caller account. CI now includes the geometry retained-runtime tests and retained_inspection_busy at this slice.

Place in the stack

Slice 5 of 8 replacing the oversized draft #8124 (kept open as a draft umbrella). Review and merge bottom-up; each PR's base is the previous slice.

  1. #8143 stack/7955-1-construction-contracts (base main): feat(geometry): private retained construction contracts and receipt/resource authority (#7955)
  2. #8144 stack/7955-2-contract-validators (base stack/7955-1-construction-contracts): feat: private retained contract validators, wire format and generated contracts (#7955)
  3. #8145 stack/7955-3-failure-origins (base stack/7955-2-contract-validators): feat(geometry): typed retained failure origins for structure, mapping, Boolean and frames (#7955)
  4. #8146 stack/7955-4-coverage-census (base stack/7955-3-failure-origins): feat(processing): read-only retained coverage census example (#7955)
  5. #8147 stack/7955-5-source-inspection (base stack/7955-4-coverage-census): feat(retained): bounded source inspection through the private controller (#7955) (this PR)
  6. #8148 stack/7955-6-native-diagnostic (base stack/7955-5-source-inspection): feat(processing): private native retained diagnostic driver and numerical oracles (#7955)
  7. #8149 stack/7955-7-wasm-inspection (base stack/7955-6-native-diagnostic): feat(wasm): development-only source inspection build isolated from shipped APIs (#7955)
  8. #8150 stack/7955-8-package-graph (base stack/7955-7-wasm-inspection): build(runtime): source-only package graph for the native geometry runtime (#7955)

Validation

Current head: ec13266850a862a022d2e8e72d192fc2dd0ef948; stack base: main 568a078ef5. Updated after the 2026-10-26 restack.

  • PC validation still running at df964de3bc. Original request auto-c5ca6f72a4e04236aa8a0fdc1cf3ff11, job faccdbb8-9ba2-457a-855f-76553f0c27ff. No completed test or Clippy verdict is claimed.
  • The validated/running source differs from this head only in .github/actions/setup-revert-oracle/action.yml and oracle patch files. A direct Git comparison confirms no Rust source differs. These earlier-commit runs do not execute the final oracle patches or qualify the changed setup action.

The PC validation command set uses RUSTUP_TOOLCHAIN=nightly-2025-11-15: fixture setup; cargo test --workspace --locked --no-fail-fast, repeated with --features ifc-lite-processing/retained-runtime; cargo clippy --workspace --all-targets -- -D warnings, repeated with retained-runtime (slices 2–5) or retained-native (slices 6–8); named source/contract gates; and the workflow's scripts test catch-all. It is not root pnpm test, typecheck, browser, or real SDK worker qualification.

Remaining acceptance evidence:

  • Default WASM SHA/size, three-model mesh fingerprints, and native instruction ratchets have not been rerun for slices 2–8 after restack. Previous figures apply to older heads and are intentionally omitted here.
  • Oracle patches were checked for reverse application only. Their production-observation runs remain pending until each slice is retargeted to main; test.yml is filtered to that base.
  • Slice 1 #8143 has all required hosted checks green at 370a2667f2, including all 32 oracle shards and the bundle ratchet. That fixes the formerly inherited bundle/85-minute timeout blockers, but does not establish this slice's own oracle or identity/performance results.
  • Fresh merge-gating review remains required on the final diff; a CodeRabbit status saying review was skipped is not a review verdict.

Refs #7955

šŸ¤– Generated with Claude Code