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
There are three types called FrameAttestation in this workspace, all modelling "a provenance attestation bound to a frame", and the wire now has two places to put the same data.
contextgraph-host/src/lib.rs re-exports two of them under one name, which is an E0252 build error the moment PR #154 rebases onto current main.
The wire-level duplication is the serious half
Envelope::Frames is { id, result: ContextQueryResult, attestations: Vec<FrameAttestation> }, and ContextQueryResultalready carries frame_attestations and result_attestation (added by PR #138 for #90). So a signed answer can be expressed two ways in one envelope, and nothing says which wins when they disagree. For a protocol whose pitch is "enforced by contract, not convention", two encodings of one fact with no tie-breaking rule is exactly the defect it exists to prevent.
ContextQueryResult is also the right home on the merits, and ADR 0014 says why: an in-process provider that never builds an Envelope must still be able to sign what it serves.
attester_keys needs a decision, not a merge
PR #154 also adds attester_keys: Vec<AttesterKey> to Envelope::HandshakeAck. ADR 0016 (merged in PR #140) decided the opposite: a host learns a provider's signing key from the operator, ssh known_hosts-style, and the protocol specifies no PKI. A key self-asserted in handshake_ack proves continuity, not identity — which is precisely why #130 was filed as "no trust-on-first-use tier: handshake_ack carries no public key, so a host cannot pin one", as an open question rather than a shipped field.
So attester_keys is not a merge conflict to resolve. It is a protocol addition that contradicts a just-merged ADR, and it needs either its own ADR arguing the TOFU tier, or removal.
Why this happened
Three agents worked #88, #90 and #89 in parallel off the same base. Each needed somewhere to put an attestation, and none could see the others' answer. #140's own doc comment predicted it:
This shape lives here for now. ... Carrying attestations on the wire is issue #90; when that lands, this becomes the host-side view of a wire field rather than the only source of one.
#90 has landed. The prediction came true and the collapse never happened.
What to do
One type.contextgraph_types::FrameAttestation is canonical. Delete wire.rs's and trust.rs's, re-export the canonical one from contextgraph-host, and update call sites — trust.rs moves from frame_id: String to frame: FrameId and must handle attestation: Option<..>, since a frame attested only through a Merkle inclusion proof carries no per-frame signature.
One wire location. Remove Envelope::Frames.attestations; the carriage is result.frame_attestations / result.result_attestation.
Problem
There are three types called
FrameAttestationin this workspace, all modelling "a provenance attestation bound to a frame", and the wire now has two places to put the same data.contextgraph-types/src/attest.rsframe: FrameId,attestation: Option<..>,inclusion_proof: Option<..>contextgraph-host/src/trust.rsframe_id: String,attestation: ProvenanceAttestationcontextgraph-host/src/wire.rsframe_id: String,attestation: ProvenanceAttestationcontextgraph-host/src/lib.rsre-exports two of them under one name, which is anE0252build error the moment PR #154 rebases onto currentmain.The wire-level duplication is the serious half
Envelope::Framesis{ id, result: ContextQueryResult, attestations: Vec<FrameAttestation> }, andContextQueryResultalready carriesframe_attestationsandresult_attestation(added by PR #138 for #90). So a signed answer can be expressed two ways in one envelope, and nothing says which wins when they disagree. For a protocol whose pitch is "enforced by contract, not convention", two encodings of one fact with no tie-breaking rule is exactly the defect it exists to prevent.ContextQueryResultis also the right home on the merits, and ADR 0014 says why: an in-process provider that never builds anEnvelopemust still be able to sign what it serves.attester_keysneeds a decision, not a mergePR #154 also adds
attester_keys: Vec<AttesterKey>toEnvelope::HandshakeAck. ADR 0016 (merged in PR #140) decided the opposite: a host learns a provider's signing key from the operator,ssh known_hosts-style, and the protocol specifies no PKI. A key self-asserted inhandshake_ackproves continuity, not identity — which is precisely why #130 was filed as "no trust-on-first-use tier:handshake_ackcarries no public key, so a host cannot pin one", as an open question rather than a shipped field.So
attester_keysis not a merge conflict to resolve. It is a protocol addition that contradicts a just-merged ADR, and it needs either its own ADR arguing the TOFU tier, or removal.Why this happened
Three agents worked #88, #90 and #89 in parallel off the same base. Each needed somewhere to put an attestation, and none could see the others' answer. #140's own doc comment predicted it:
#90 has landed. The prediction came true and the collapse never happened.
What to do
contextgraph_types::FrameAttestationis canonical. Deletewire.rs's andtrust.rs's, re-export the canonical one fromcontextgraph-host, and update call sites —trust.rsmoves fromframe_id: Stringtoframe: FrameIdand must handleattestation: Option<..>, since a frame attested only through a Merkle inclusion proof carries no per-frame signature.Envelope::Frames.attestations; the carriage isresult.frame_attestations/result.result_attestation.attester_keysseparately under No trust-on-first-use tier: handshake_ack carries no public key, so a host cannot pin one #130. Do not land it as a side effect of a conformance PR.Files
contextgraph-types/src/attest.rs— the canonicalFrameAttestationcontextgraph-host/src/trust.rs,contextgraph-host/src/wire.rs,contextgraph-host/src/lib.rsfeat/attestation-conformance-b726a4bcVerify
command grep -rn "pub struct FrameAttestation" contextgraph-*/src/returns exactly one hit.cargo clippy -p contextgraph-host --all-targets --all-features -- -D warningsis clean (today it isE0252).framesenvelope round-trips with the attestations in exactly one place, andschema/validate-examples.pypasses.Done when
One
FrameAttestation, one wire location for an attestation, andattester_keyseither justified by an ADR or absent.Blocks PR #154 (#89), whose conformance work is otherwise complete and green — the five
--misbehavemodes and the F9 test all pass.