# In what scenarios must an instance reject a contract-net award whose attestation verifies against a stale outcome digest rather than the current task epoch **Date of Record:** 2026 November 28 **Scope:** Applies to any multi-agent system where a manager agent awards work via a contract net protocol (CFP → bids → award) and requires bidders to submit cryptographic or hash-based outcome attestations proving prior competence. Does not apply to single-shot tool invocations or to systems where attestations are re-derived on-line per award. ## Core Distinction The failure mode here is not a forged attestation, a missing signature, or a dishonest bidder. Those are the well-understood cases. The boundary condition is narrower and more dangerous: an attestation that **verifies perfectly** — correct signature, correct issuer identity, correct Merkle proof against the claimed root — but whose outcome digest was committed against a **task epoch that is no longer current**. Contract-net bidding with verifiable attestations implicitly assumes that "I have done this task before and can prove it" is a stable predicate over time. It is not. Task specifications drift: a manager redefines the acceptance predicate between epochs (tighter tolerance, new required output schema, a changed safety constraint, a different tool allowlist). When the spec drifts, an attestation issued under epoch *n* remains cryptographically valid forever, but its evidential value about epoch *n+1* is zero — or worse, negative, because the bidder's demonstrated competence was measured against a predicate the manager has since abandoned. The core distinction is between **attestation validity** (does the proof check out?) and **attestation relevance** (does the proven outcome bear on the current acceptance predicate?). Contract-net implementations that conflate these two will award work to bidders whose proven track record is a proof of competence at the *wrong task*. ## What Was Observed A manager agent (call it M) runs a contract net over a fleet of worker agents for a recurring extraction task. Each epoch, M issues a CFP carrying `task_epoch`, `spec_digest`, and `acceptance_predicate_hash`. Bidders respond with `(bid_price, attestation)`, where the attestation is a signed bundle: ``` attestation = { issuer: worker_id, task_epoch: , spec_digest: , outcome_digest: , acceptance_proof: , signature: } ``` The verifier in M does the obvious thing: it checks the signature, checks that `acceptance_proof` roots to a trusted auditor tree, and checks that `outcome_digest` is present in that tree. All three pass. M awards the contract. The trace that exposed the failure: at epoch 41, M tightened the acceptance predicate — the extraction task now required a confidence field per record, and the auditor's acceptance function rejected artifacts missing it. At epoch 42, worker W submitted an attestation whose `task_epoch` field read `40` and whose `spec_digest` matched the epoch-40 spec. The signature verified. The Merkle proof verified. The outcome had, in fact, been accepted at epoch 40 — legitimately. M awarded W the epoch-42 contract. W executed against the epoch-42 spec, but its internal pipeline was the epoch-40 pipeline; it produced artifacts without the confidence field, which the epoch-42 auditor rejected on delivery. M had to re-run the contract net, and the delay propagated to three downstream agents that had already checkpointed against W's promised output slot. The subtle part: W was not lying. W's attestation was a truthful statement about epoch 40. The verifier was correct that the attestation was authentic. The bug was that M's verifier never compared `attestation.spec_digest` to the *current* `spec_digest` in the CFP, and never compared `attestation.task_epoch` to the current epoch. The verifier checked proof validity but not proof *relevance to the current epoch*. A second trace showed the inverse hazard. At epoch 43, worker V submitted an attestation with `task_epoch: 42` and the correct current `spec_digest`. It verified, and V was awarded. But the auditor tree that V's proof rooted to had been rotated at epoch 42.5 — the old tree was deprecated but not revoked, and V's proof was against the old root. M's verifier accepted any root in its trust store, including deprecated ones. V's "acceptance" at epoch 42 had been a *provisional* acceptance that the epoch-42.5 audit had later overturned. M awarded on the strength of a proof that the system itself had already retracted. ## Condition of Validity The invariant required to make attestation-gated awards sound is: > An attestation may be used to support an award for task epoch *e* if and only if (1) `attestation.spec_digest == CFP.spec_digest(e)`, (2) `attestation.task_epoch == e` or the manager explicitly declares epoch *e* backward-compatible with `attestation.task_epoch` via a signed compatibility edge, and (3) the auditor root that `acceptance_proof` resolves to is *live* at the time of award — not merely present in the trust store. Condition (1) is the spec-pinning invariant. Without it, an attestation proves competence at an arbitrary past task. Condition (2) is the epoch-monotonicity invariant: it forces the manager to make backward compatibility an explicit, auditable decision rather than an implicit assumption. Condition (3) is the revocation-liveness invariant: a rotated auditor root must be treated as revoked for the purposes of *new* awards, even if historical verifications against it remain valid for audit purposes. The failure is *non-obvious* because each individual check that a naive verifier performs is correct. Signature verification is correct. Merkle proof verification is correct. Trust-store membership is correct. The bug lives in the *composition* — in the missing cross-check between the attestation's declared epoch/spec and the CFP's current epoch/spec. A verifier that checks all three of {signature, proof, root-membership} and none of {spec match, epoch match, root liveness} will pass every forged-attestation test and fail every stale-attestation test. ## Decision Boundary The manager instance must distinguish three cases at award time, and the boundary between them is not "does the proof verify" but "does the proof verify *against the current epoch's contract*": - **Accept**: proof verifies, `spec_digest` matches current CFP, epoch matches current, root is live. Award proceeds. - **Reject as stale**: proof verifies, but `spec_digest` or `task_epoch` does not match current. The bidder is not dishonest; the attestation is simply inapplicable. The manager must reject the *bid* (not the bidder) and, if it wants to use the bidder, must require a fresh attestation under the current spec — which usually means the bidder must re-execute a calibration task, which the manager should price into the CFP. - **Reject as retracted**: proof verifies against a root that is no longer live. This is the dangerous case because the proof looks *newer* than a stale one (it may carry the current epoch) while actually being evidence the system has disavowed. The manager must treat root liveness as a hard gate, not a soft preference. The decision boundary that trips implementations is the middle case: engineers reason "the proof is valid, so the bid is valid," and the epoch/spec mismatch is treated as a warning rather than a rejection. The correct posture is that a valid-but-stale attestation is *strictly worse than no attestation*, because it induces false confidence in the award decision. A bidder with no attestation is priced as unproven; a bidder with a stale attestation is priced as proven, and the manager's downstream scheduling assumes proven competence that does not exist for the current spec. ## Operational Effect The downstream effect of getting this wrong is not a single failed task; it is a **scheduling cascade**. The manager awards on stale evidence, commits the worker's output slot to downstream agents that have already checkpointed against it, and the worker fails at delivery against the current acceptance predicate. The downstream agents must either re-plan (expensive) or resume from a checkpoint that assumed an output that never arrived (the checkpoint/resume failure mode layered on top of the contract-net failure). The manager's own state now contains an award record whose justification was a proof of competence at the wrong epoch — which, if the manager later distills its award history into a semantic memory of "which workers are reliable," will poison that memory with a false positive. The guardrail is a single composed predicate at award time, not three independent checks. Implement it as a function that takes the CFP and the attestation and returns `Accept | Stale | Retracted`, raising on any case where the manager cannot decide (e.g., the compatibility edge is unsigned). The invariant to enforce in code is that an award record may only be written when the predicate returns `Accept`, and that `Stale` and `Retracted` are distinct outcomes with distinct remediation paths (re-calibrate vs. re-audit). ```python from dataclasses import dataclass from enum import Enum from typing import Optional class AttestationRejected(RuntimeError): """Raised when an attestation cannot be used to support an award.""" pass class AwardVerdict(Enum): ACCEPT = "accept" STALE = "stale" # valid proof, wrong epoch/spec RETRACTED = "retracted" # valid proof, dead auditor root @dataclass(frozen=True) class CFP: task_epoch: int spec_digest: str live_auditor_roots: frozenset @dataclass(frozen=True) class Attestation: issuer: str task_epoch: int spec_digest: str outcome_digest: str auditor_root: str signature_valid: bool proof_valid: bool def evaluate_award( cfp: CFP, att: Attestation, compatibility_edges: dict, # (from_epoch, to_epoch) -> bool, signed by manager ) -> AwardVerdict: # Hard gate: cryptographic validity. A forged attestation is a different # failure class and must never be silently downgraded to STALE. if not att.signature_valid or not att.proof_valid: raise AttestationRejected( f"attestation from {att.issuer} failed cryptographic verification; " f"this is a forgery-class rejection, not a staleness rejection" ) # Invariant (3): root liveness. A rotated root is revoked for new awards. if att.auditor_root not in cfp.live_auditor_roots: return AwardVerdict.RETRACTED # Invariant (1): spec pinning. if att.spec_digest != cfp.spec_digest: # Invariant (2): epoch monotonicity requires an explicit signed edge. edge = (att.task_epoch, cfp.task_epoch) if compatibility_edges.get(edge) is True: return AwardVerdict.ACCEPT return AwardVerdict.STALE # Spec matches; still require epoch match or signed compatibility edge. if att.task_epoch != cfp.task_epoch: edge = (att.task_epoch, cfp.task_epoch) if compatibility_edges.get(edge) is True: return AwardVerdict.ACCEPT return AwardVerdict.STALE return AwardVerdict.ACCEPT def award_contract(cfp: CFP, att: Attestation, compatibility_edges: dict) -> str: verdict = evaluate_award(cfp, att, compatibility_edges) if verdict is AwardVerdict.STALE: raise AttestationRejected( f"attestation from {att.issuer} is valid but inapplicable: " f"spec_digest={att.spec_digest} epoch={att.task_epoch} " f"does not match CFP spec_digest={cfp.spec_digest} epoch={cfp.task_epoch}; " f"require fresh attestation or signed compatibility edge" ) if verdict is AwardVerdict.RETRACTED: raise AttestationRejected( f"attestation from {att.issuer} roots to auditor root " f"{att.auditor_root} which is no longer live; the acceptance it " f"proves has been retracted and cannot justify a new award" ) # Only ACCEPT reaches here; write the award record with the attestation # digest pinned so downstream memory distillation cannot re-use it # against a future epoch without re-evaluation. return f"awarded:{att.issuer}:epoch{cfp.task_epoch}:{att.outcome_digest}" ```