feat(SR-69): attest per-boundary strategy + the build configuration (ADR-7 P1) - #388
Merged
Conversation
…ADR-7 P1) ADR-7 requires each fused boundary's strategy to be DECLARED, ATTESTED and OBSERVABLE. Delivers both halves — and fixes a traceability defect found on the way. ## Per-boundary records One `BoundaryRecord` per fused cross-component call: endpoints, callee function + interface, the call-lowering class (direct / memory-copy / transcode / async-lift) and how it was ACTUALLY wired (inlined-direct / widening-wrapper / thunk). Captured at the WIRING step, not from the seam's `inline_eligible` — a widening wrapper outranks inlining, so eligibility would misreport what shipped. Emitted in `adapter_sites` order (the resolver sorts it into a total order), so deterministic under --reproducible. Surfaced in the attestation AND via a new `meld fuse --explain`. ## The defect this uncovered SR-28 requires every FuserConfig field to be attested so an auditor can reconstruct the build. But the parameter-recording code sat behind `#[cfg(feature = "attestation")]` — the optional wsc path, which RELEASES DO NOT BUILD. So shipped artifacts recorded no configuration beyond the memory strategy: `--share-stack` (a documented soundness envelope), `--pack-rebase`, `--address-rebase` and `--profile` were all unattested. The SR-28 sentinel could not catch it — it asserted against a map built inline in the test, never real output. Fixes: - New TYPED `FusionParameters` (not a map: key order fixed by declaration, so deterministic by construction — the wsc path's HashMap is precisely what makes that path non-reproducible). Un-gated the label helpers so both paths use them. - SR-28 completeness now enforced at COMPILE TIME: `attestation_parameters` destructures FuserConfig exhaustively, so adding a field fails the build until it is recorded or explicitly acknowledged (each exclusion documented with why). Demonstrated: a probe field yields `error[E0027]: pattern does not mention field` at the sentinel. - The SR-28 test now asserts against the REAL serialized attestation, values round-tripping. Neither addition perturbs the artifact hash — it is computed over the module with the attestation and provenance sections stripped. Tests: tests/boundary_records_p1.rs (3) + strengthened test_sr28_config_ completeness. rivet SR-69 + SWV-81 (PASS). fmt 0, clippy --workspace --all-targets -D warnings 0, tests --workspace 858/0 AND --all-features 857/0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WrmMqf1iuTS1UBEes5TmdC
LS-N verification gate✅ 59/59 approved LS entries verified
Approved Failed LS entries(none) Missing regression tests(none) Updated automatically by |
…R-69) Bumps workspace 0.50.0 -> 0.51.0. The CHANGELOG calls the missing-configuration attestation out under `Fixed` (not under the feature) and states plainly that artifacts from v0.50.0 and earlier carry no configuration attestation — anyone using meld attestations as audit evidence needs to know their older artifacts are thin. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WrmMqf1iuTS1UBEes5TmdC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Delivers ADR-7's "per-boundary strategy declared, attested, observable" — and
fixes a traceability defect found on the way that I think is the more important half.
1. Per-boundary records
One record per fused cross-component call: endpoints, callee function + interface,
the call-lowering class (
direct/memory-copy/transcode/async-lift) andhow it was actually wired (
inlined-direct/widening-wrapper/thunk).Captured at the wiring step, not from the lowering seam's
inline_eligible: awidening wrapper takes precedence over inlining, so eligibility alone would
misreport what shipped. A test asserts the
inlined-directrecords agree withstats.adapters_inlined, which is exactly what catches that confusion.Surfaced two ways — embedded in the attestation (auditable from a shipped artifact)
and printed by the new
meld fuse --explain:2. The defect this uncovered — shipped artifacts recorded no configuration
SR-28 requires every
FuserConfigfield to be attested so an auditor canreconstruct the build. But the parameter-recording code sat behind
#[cfg(feature = "attestation")]— the optional wsc path, which releases do notbuild. So shipped artifacts recorded nothing beyond the memory strategy:
--share-stack— which carries a documented soundness envelope--pack-rebase,--address-rebase— which change memory layout--profile safety— whose entire purpose is "declared and attested"The SR-28 sentinel couldn't catch it: it asserted against a map built inline in
the test, never touching real output.
Fixes:
FusionParameters(not a map — key order fixed by declaration, sodeterministic under
--reproducibleby construction; the wsc path'sHashMapis precisely what makes that path non-reproducible). Label helpers un-gated so
both paths use them.
attestation_parametersdestructures
FuserConfigexhaustively, so adding a field fails the build untilit is recorded or explicitly acknowledged (each exclusion documented with why).
Demonstrated by adding a probe field →
error[E0027]: pattern does not mention field, then removing it.round-tripping.
Notes
Neither addition perturbs the artifact hash — it is computed over the module with
the attestation and provenance sections stripped (verified recipe in
component_provenance.rs).Verification
rivet SR-69 + SWV-81 (PASS). fmt 0, clippy
--workspace --all-targets -D warnings0, tests--workspace858/0 and--all-features857/0 (both, perthe lesson from #387).
🤖 Generated with Claude Code