interplane.Get Omega
Read in your language

aien-protocols-mv

Canonical specifications, wire protocols, and schemas for the AIEN sovereign ecosystem

Brought by drakestapleton

branch main Branches Tags History

aien-protocols-mv / specs / evidence / ADAPTIVE_EVIDENCE_INTERFACE.md

176 lines · 21333 bytes Raw Blame History Source

Adaptive Evidence Interface (AEI1)

Status: Draft for freeze, 2026-10-11 (AIEN Adaptive Intelligence, Milestone 7 prerequisite). Contract version: 0.2.0 proposed (base receipt digest cutover approved 2026-10-26; coordinated adoption in CONSUMERS.md) License: Community Specification License 1.0 Authority: the Rust and C source named below, as pinned in section 8. Where this file and that source differ, the source wins and this file is wrong. Anything not found in source is marked OPEN and is a question, not a decision. Evidence: adaptive/INVENTORY.md and adaptive/inventory/evidence-chain.md (Milestone 0, 2026-10-11). Paths: aien-protocols = this repo at 407487b7e163; interplane 667fbe811f78; spark-rsi 24f412f699f1; omega 16e729b6d844.

1. Purpose and the one rule

Today four receipt formats exist and none binds a candidate to the run that tested it:

FormatWhereBinds candidateBinds run / transcriptSigned
SignedEvaluationReceiptaien-protocols crates/aien-evaluation-protocol/src/lib.rs:583subject_digest :514noyes, P-256
rsi-eval/2 judge receiptinterplane provenance/src/evaluation.rs:96-175candidate_id, subject_sha256noyes, P-256
EvidenceReceiptV1specs/evidence-receipt/SUBSET.md (partial); source in aien-sovereign-core aien-proofno (artifact lists)notier field, no signature found here
prime-race receipt v1benchmarks prime-drag-race/src/receipt.rs:20-40nonono

Rule A1 (no fourth format). The adaptive program produces exactly ONE evidence receipt, defined in section 2 as an extension of the aien-protocols evaluation receipt. No new receipt struct, schema string or signing scheme may be introduced. Existing formats are either adapted into the one receipt (OPEN Q2) or stay what they are and are never presented as adaptive evidence. A reviewer must refuse a PR that adds a fourth.

2. The one signed evidence receipt (AEI1 receipt)

2.1 Base type and what is added

Base: SignedEvaluationReceipt (aien-evaluation-protocol/src/lib.rs:583-589: receipt, signature, cryptographic_tier, key_fingerprint) wrapping EvaluationReceipt (:510-522). Chosen because it is the only existing format that has a pluggable hardware-capable signer (VerifierSigner :254, SoftwareP256Signer :262, TpmP256Signer :300), a plan-digest/policy binding, and a verifier identity (VerifierIdentity :222-228).

Fields reused unchanged from EvaluationReceipt (:510-522), all already in compute_receipt_digest (:525-555):

RequirementExisting fieldType
evaluation verdictverdictVerdict {Pass, Fail, Indeterminate} (:215-219)
candidate digestsubject_digestDigest32 (aien-protocol-types lib.rs:27, 32 bytes)
producer identityverifier: VerifierIdentity = principal_id, key_id, trust_epoch, trusted_build_digest, policy_bundle_digestString, String, u64, Digest32, Digest32
timestampsstarted_at, completed_atTimestamp(u64) microseconds (protocol-types lib.rs:178-188)
evaluation identityevaluation_id, request_digest, plan_digest, evidence_root, outcomes_root, protocol_versionas in :511-517

Fields added by AdaptiveEvidenceReceipt outside its EvaluationReceipt base enter the outer signed AEI1 digest, which embeds the base receipt digest. The receipt protocol_version MUST be bumped so an old verifier refuses the changed transcript:

The Rust reference currently signs an AdaptiveEvidenceReceipt digest over the base receipt digest plus the adaptive fields. For this proposed revision, the base digest is the framed AIEN_EVALUATION_RECEIPT_V3 transcript described in specs/evaluation/SPEC.md; AEI1 requires protocol_version 3 so receipts issued with the older ambiguous base transcript are refused. The adaptive outer domain AEI1\0 and its own additional-field framing are unchanged.

New fieldTypeSource in existing codeNotes
world_idDigest32omega src/runtime/aien_machine_id.h:1-10: the one canonical AIEN machine identity, SHA-256("AIENOS-MACHINE-ID-V1\0"
cortex_sessionu64the Cortex session in the CX_WREC payload (omega rx_cortex_record.h:14, attach :42)DECIDED Q1: names the World session within that machine.
generationu64R9 active generation id: rx_gen_active(store,&id,&lineage) (omega rx_generation.h:169); the value the Cortex recorder stamps into CxHeader.generation (rx_cortex.h:121), protected as CX_PROT_GENERATION_ID (rx_cortex.h:78)DECIDED Q3: this and only this.
epochu64, optionalRxLivingProvenance.epoch, the Omega search epoch (rx_living.h:90)DECIDED Q3: a different axis, carried separately, never as generation.
execution_id[u8;32]TRN1 header run_id, bytes 8-40 (TRN1_TRANSCRIPT_SPEC.md:59, "opaque; the root causal id")Equals the transcript's run_id. Joins receipt to transcript.
transcript_digestDigest32TRN1 final digest: record digest of the END record (TRN1_TRANSCRIPT_SPEC.md:89-91)"publishing it in a receipt pins the whole file".
cortex_chain_headDigest32CxStore.chain[32], "running hash over every digest in append order" (omega rx_cortex.h:143)Head at the moment the receipt is issued, after the last evidence record.
producer_subsystemStringname of the producing subsystem; the TRN1 header producer u16 (TRN1_TRANSCRIPT_SPEC.md:60) must map to itNames the runtime that wrote the transcript. Compared in the self-approval rule (N-self). Distinct from verifier.
proposerStringEvaluationRequest.proposer (lib.rs:20)Copied into the receipt so self-approval (section 6, N-self) is checkable from the receipt alone.
evidence_classenum {Production, Fixture}section 5; mirrors ObservationProvenance {Measured, Synthetic} (spark-rsi src/canary_observation.rs:11-15)Type-level, in the digest.

candidate digest is subject_digest and nothing else; no second candidate field.

2.2 Verification requirements (frozen)

A consumer MUST, in this order, and refuse with a distinct code at the first failure:

  1. Recompute the receipt digest and verify the P-256 signature (SignedEvaluationReceipt::verify, lib.rs:591-601) against a key the operator supplies, never one carried in the receipt (same rule as interplane evaluation.rs:1-8).
  2. Check that cryptographic_tier and key_fingerprint match the trusted key. Today verify ignores both (lib.rs:591-601; evidence-chain.md sec. 7 gap 4). This is a defect to fix before AEI1 is usable, not a design choice.
  3. Check verifier.key_id == key_fingerprint (already enforced at signing, lib.rs:562, must also be enforced at verify).
  4. Check subject_digest equals the digest of the candidate bytes the consumer is about to admit.
  5. Check execution_id and transcript_digest against a TRN1 transcript that passes the reference verifier (tools/trn1_verify.c): header run_id equal, END record digest equal.
  6. Check cortex_chain_head is reachable in the Cortex journal being relied upon (OPEN Q4: how a consumer proves reachability; omega has cx_verify per INVENTORY row 4 but I did not read its contract here).
  7. Check evidence_class == Production unless the consumer is a fixture runner (section 5).
  8. Check proposer != verifier.principal_id and the self-approval rule (section 6, N-self).

3. TRN1 transcript production requirement

Facts: TRN1 status is "Not yet produced by any runtime" (TRN1_TRANSCRIPT_SPEC.md:3). Planned producers: omega tools/replay and sovereign-core crates/aien-replay (:9). The spec states "No signature over the final digest. Anchoring the final digest in a signed receipt belongs to the receipt format, not to TRN1" (:473-475). A rewrite that renumbers and rechains verifies (corpus f001, :389-392).

Requirements (frozen):

4. Measured execution observation (RSI, Milestone 5)

Reuse CanaryObservation (spark-rsi src/canary_observation.rs:17-25) and its canonical_bytes (:34-49: one JSON object, keys alphabetical, no whitespace) and digest_hex (SHA-256 of canonical bytes, :51-53). Today it has no signature and no source identity; the daemon feeds &[] (spark-rsi src/daemon.rs:445-446) so the production gate fails closed by design.

FieldStatusType / rule
observation_idexisting :19String, non-empty (checked in admit_production_quota)
candidate_digestexisting :21String (lowercase hex SHA-256). MUST equal the AEI1 subject_digest hex.
observed_at_msexisting :20u64 ms. OPEN Q6: AEI1 Timestamp is microseconds; unit conversion rule must be fixed.
statusexisting :23String, non-empty. OPEN Q7: closed vocabulary needed; reuse EvaluatorStatus names (lib.rs:142-147: Passed, Failed, Inconclusive, TimedOut)?
latency_usexisting :22u64
provenanceexisting :11-15Measured / Synthetic (see O4)
execution_idADDED[u8;32], the TRN1 run_id of the run that was observed
source_idADDEDString: producer principal; MUST match a key in the operator's trusted-source list
source_signatureADDEDP-256 signature by that source over digest_hex bytes (same scheme as SignedEvaluationReceipt: VerifierSigner lib.rs:254)
resource_costsADDEDlist of (metric String, value). Reuse Measurement (lib.rs:158) as the element type. OPEN Q8: which metrics are required beyond latency_us.

Rules (frozen):

5. Benchmark fixture versus production observation

Problem: benchmark receipts today are unsigned and use their own schema (aien-prime-race/receipt/v1, benchmarks prime-drag-race/src/lib.rs:15); developer fixtures and real runs share a shape.

Requirements (frozen):

6. Negative-test matrix (the implementation MUST pass all)

Each row: a bad artifact goes in; a named refusal comes out; no Pass. "Existing" lists a nearest test that proves the pattern, not that AEI1 passes.

IDAttackRequired refusalNearest existing test
N1Modified receipt (any digest-covered field, incl. each added field)signature invalidinterplane tests/evaluation.rs spark_rsi_receipt_with_any_field_changed_fails :586; protocols evaluator_protocol_tests.rs :109
N2Missing record (delete a Cortex record, a transcript record, or a required evaluator outcome)gap / chain / missing-evaluatorTRN1 GAP/CHAIN vectors (vectors/expected.txt:3-5); protocols evaluator_protocol_tests.rs :184; interplane real_chain.rs :223
N3Reordered events (swap two records, or an effect before its generation record)chain / orderTRN1 CHAIN; interplane effect_binding.rs :274, real_chain.rs :260
N4Altered policy file (policy, holdout set, thresholds)policy_bundle_digest / policy_digest mismatchinterplane evaluation.rs altered_policies_are_refused :327; protocols evaluator_protocol_tests.rs :94
N5Replayed observation (same id, different record; same execution_id, other candidate; receipt reused for another candidate)conflict / replayspark-rsi admit_production_quota id-conflict branch; interplane a_genuine_receipt_for_other_bytes_is_a_substituted_change :301
N6Unsigned (receipt, observation, or transcript digest not in a signed receipt)unsigned / untrusted sourceinterplane wrong_keys_are_refused :276 (receipt only; observation case has no test)
N7Mismatched candidate (subject_digest or observation candidate_digest differs from admitted bytes)subject mismatchspark-rsi admit_production_quota digest check; interplane evaluation_subject_mismatch code (evaluation.rs check)
N-selfSelf-approval (DECIDED Q11: "same subsystem" = same signing-key fingerprint OR same producer_subsystem string). Refuse a promotion when (a) promotion authority key fingerprint == receipt producer's key_fingerprint, (b) it == the proposer's key fingerprint, or (c) producer_subsystem == promoter subsystem string. One test per equality. Also refuse if the candidate modified the evaluator, thresholds or verifier keysrefuse, never Passnone. Rule from specs/evaluation/SPEC.md:14. Depends on blocking precondition aien-protocols#20 (verify ignores tier and fingerprint, lib.rs:591-601)
N9Fixture presented as production (evidence_class flipped, fixture-signed observation, fixture file in production loader)class / untrusted sourcenone
N10Wrong tier or fingerprint (receipt claims Tier4 but was signed with a software key)tier mismatchnone; verify ignores both today (lib.rs:591-601)
N11Transcript valid but receipt execution_id / transcript_digest differsjoin mismatchnone
N12Stale pin: consumer built against an aien-protocols commit not equal to the receipt's protocol_version contractrefuse at build or loadnone

Also required: a negative control per row (a deliberately defective verifier that skips that check must be caught), in the style of interplane conformance/negative-controls.json:4-13 and TRN1 mutate-verifier.sh.

7. Pin and version rule

Stale or unpinned consumers found by the Milestone 0 inventory (aien-protocols head 407487b7e163):

ConsumerCurrent pinEvidence
interplane adapters/aienAIEN_PROTOCOLS_REV=3a4cdbe8d360 (not head; lag in commits UNVERIFIED)interplane/adapters/aien/PINS
spark-rsipath dep ../aien-protocols/crates/aien-protocol-types, aien-evaluation-protocol, aien-probe, no revspark-rsi/Cargo.toml:43-45
spark-inquisitor (ARCHIVED)unpinned path depsspark-inquisitor/Cargo.toml:14-16
aegis-runtime, aien-local-stack, aien-sovereign-corev0.1.0 by pathCONSUMERS.md:3-12
benchmarksno aien-protocols dependency; depends on absent siblingbenchmarks/Cargo.toml:18-22
CONSUMERS.md row spark-inquisitorstale (repo archived; canonical copy has no protocols dep)evidence-chain.md sec. 3

8. OPEN questions (not decisions)

  1. DECIDED (world identity). world_id = machine identity digest from aien_machine_id.h; plus cortex_session u64. See section 2.1.
  2. Adapters. Is rsi-eval/2 (interplane) re-signed into AEI1 by a new adapter, or does spark-rsi switch to EvaluationReceipt? Same for the prime-race receipt. (Rule A1 forbids a fourth format either way.)
  3. DECIDED (generation). R9 active generation id; search epoch is a separate optional epoch. See section 2.1.
  4. Cortex chain reachability. What check proves cortex_chain_head belongs to a journal a consumer can open? cx_verify (rx_cortex.h:230) verifies one object by id, not a chain head.
  5. Transcript writer separation. How does omega or sovereign-core keep the TRN1 writer outside the candidate's authority? No existing mechanism cited.
  6. Time units. ms (observed_at_ms) versus micros (Timestamp).
  7. Status vocabulary for observations.
  8. Resource cost metrics required beyond latency_us.
  9. Replay window between observation time and receipt times.
  10. Synthetic marker enforcement: how to guarantee a production key can never sign Synthetic.
  11. DECIDED (self-approval). Same key fingerprint or same producer_subsystem string; matrix row N-self.
  12. Approval binding. interplane's AIEN adapter uses a shared-secret HMAC (compose_ledger.rs:94,132,190), not public-key signatures. Does AEI1 replace it for adaptive evidence?
  13. Tier floor. Which CryptographicTier (lib.rs:231-240) is the minimum for production: Tier2 software or Tier4 TPM only?

Freeze preconditions: aien-protocols#20 (verify ignores tier and fingerprint, lib.rs:591-601) must be fixed. All three former freeze blockers (1, 3, 11) are decided; 10 questions remain OPEN (2, 4 to 10, 12, 13). Questions 6 to 10 block only M5/M6.