# Which invariants prevent contract-net bid receipts from certifying work the bidder never actually committed to **Date of Record:** 2026 November 28 **Scope:** Applies to multi-agent systems where a manager agent issues a contract-net call for proposals, worker agents return bids, and the awarded worker returns a signed outcome receipt intended to prove the delivered artifact matches its committed bid. Does not apply to single-agent tool-call verification or to manager-only retry logic with no cross-agent receipt chain. ## Core Distinction The failure mode that matters here is not a lying bidder. It is a *receipt that is cryptographically valid but semantically unbound* — a signed outcome receipt whose payload was produced against the bidder's own restatement of the contract rather than against the manager's canonical task specification. Contract-net protocols assume the bid is a binding commitment: the worker declares capability, cost, and a deliverable schema, and the receipt is supposed to close the loop by proving the delivered object satisfies that declaration. The invariant that actually holds is weaker than the protocol intends: a receipt proves *the bidder signed something*, not *the bidder signed the thing the manager asked for*. The gap opens whenever the bid's acceptance criteria are restated by the bidder in its own free-form reasoning rather than referenced by a content-addressed hash of the manager's specification. The distinction is between **receipt authenticity** (the signature verifies, the key belongs to the awarded worker) and **receipt binding** (the signed payload is provably the evaluation of the manager's canonical spec, not a bidder-authored paraphrase of it). Most contract-net implementations check the first and assume the second. ## What Was Observed A manager agent broadcast a task spec `S` with a declared deliverable schema `D` (a JSON object with three required fields, one of them a list of at least five entries). Three workers bid. Worker `B` won with the lowest cost and, in its bid document, included an `acceptance_criteria` field — a natural-language restatement of `S` that it generated by reading `S` and summarizing it. This is common and looks benign. The manager's award message echoed back the bid document verbatim (including `B`'s restatement) rather than `S` itself, because the manager's context was near saturation and echoing the smaller bid document was cheaper than re-serializing `S`. Worker `B` then executed. During execution, `B`'s planning loop distilled its restatement into a checklist. The restatement had silently dropped the "at least five entries" constraint — a summarization loss typical of a 7-item spec compressed into a 4-bullet paraphrase under token pressure. `B` produced a deliverable with three entries, signed a receipt `R` whose payload included a hash of the deliverable and a hash of `B`'s own restatement (its `acceptance_criteria`), and returned it. The manager verified `R`: signature valid, key matches awarded worker, deliverable hash matches the returned artifact, and the receipt's `criteria_hash` matched the `acceptance_criteria` the manager had echoed in the award. All checks passed. The manager marked the contract complete. The deliverable violated `S`. The failure was invisible to every check in the pipeline because every check compared the artifact to *the bidder's paraphrase*, and the paraphrase was never compared to `S`. A second observation compounded it: on a later retry of a similar task, a different worker `C` bid with a restatement that was *stricter* than `S` (it added a "sorted ascending" requirement that `S` did not contain). `C` delivered a correct artifact that nonetheless failed its own self-imposed criterion, refused to sign a receipt, and the manager — seeing no receipt — treated the task as failed and re-broadcast, burning budget on a task that had actually succeeded. The same unbound-restatement mechanism produced both a false positive and a false negative. ## Condition of Validity The receipt-binding invariant holds only when the following condition is enforced at award time, not at receipt time: > The award message MUST reference the task specification by content hash of the manager's canonical `S`, and the receipt's `criteria_hash` MUST be verified to equal `hash(S)`, not `hash(restatement)`. If the manager echoes a bidder-authored restatement into the award, the receipt chain is anchored to the bidder's paraphrase and the invariant is void — regardless of how many signatures verify. The condition fails specifically when: 1. The manager's context budget forces it to echo a smaller document than `S` (the saturation trigger). 2. The bid schema permits free-form `acceptance_criteria` fields that are not required to be byte-identical to a slice of `S`. 3. The verification step compares receipt hashes to the *award document* rather than to the *original spec*, so the restatement is laundered into canonical status by the echo. The condition is *not* satisfied by re-checking the signature, by adding more auditors who also compare against the award document, or by asking the bidder to self-report compliance. All three reproduce the same binding to the wrong anchor. ## Decision Boundary The boundary is: **at what point does the manager commit the canonical spec hash into the contract, and is there any path by which a bidder-authored string can become the verification anchor?** - If the award message contains `spec_hash = H(S)` and the receipt must contain the same `spec_hash`, the bidder's restatement is irrelevant — it can be as lossy or as strict as it likes, because verification never touches it. This is the safe side. - If the award message contains only the bidder's restatement (or a manager-rewritten summary), the receipt binds to that summary and the safe invariant does not hold. This is the unsafe side. - The gray zone is a manager that includes `H(S)` *and* a restatement, where the verifier is not explicitly ordered to check `H(S)` and may check the restatement instead. This is the most dangerous configuration because it looks correct in the award document and fails silently in the verifier. Ordering the checks so that `spec_hash` equality is a hard precondition — and the restatement is never consulted by the verifier at all — closes it. The decision rule for the manager: never let a string that a bidder produced enter the set of objects the verifier compares against. Restatements belong in the bid, for the manager's *selection* reasoning, and nowhere else. The moment a restatement is echoed into the award, it has crossed into the verification anchor set and the boundary is breached. ## Operational Effect The practical consequence is that contract-net systems with unbound restatements produce receipts that are *auditable but not sound*: an external auditor replaying the receipt chain will verify every signature and conclude the work was certified, while the delivered artifact may violate the original spec by an unbounded margin. The failure is not detectable by replay because replay uses the same wrong anchor. It surfaces only when a downstream consumer of the artifact independently checks against `S` — often too late, after the contract is closed and the worker's budget is spent. The guardrail is a single structural change: the award message carries `spec_hash = H(S)` as a first-class field, the receipt schema *requires* `spec_hash`, and the verifier's first action is `assert receipt.spec_hash == award.spec_hash` before any other check. Bidder restatements are demoted to advisory metadata that the verifier ignores. This converts the receipt from "the bidder signed its own understanding" into "the bidder signed an evaluation of the manager's canonical spec," which is the invariant the protocol always assumed it had. ```python import hashlib from dataclasses import dataclass class ReceiptBindingError(RuntimeError): """Raised when an outcome receipt is not bound to the manager's canonical spec.""" @dataclass(frozen=True) class Award: spec_hash: str # H(canonical S), set by the manager worker_id: str echoed_restatement: str # bidder-authored; MUST NOT be a verification anchor @dataclass(frozen=True) class Receipt: worker_id: str spec_hash: str # what the worker claims it evaluated against deliverable_hash: str signature_valid: bool def verify_receipt(award: Award, receipt: Receipt, deliverable_bytes: bytes) -> None: # Authenticity checks (necessary, not sufficient). if not receipt.signature_valid: raise ReceiptBindingError("receipt signature invalid") if receipt.worker_id != award.worker_id: raise ReceiptBindingError( f"receipt worker {receipt.worker_id!r} != awarded worker {award.worker_id!r}" ) # Binding check: the receipt must be anchored to the manager's canonical spec, # NOT to the bidder-authored restatement echoed in the award. if receipt.spec_hash != award.spec_hash: raise ReceiptBindingError( "receipt bound to a non-canonical spec (likely a bidder restatement); " f"receipt.spec_hash={receipt.spec_hash} award.spec_hash={award.spec_hash}" ) # Deliverable integrity check. actual = hashlib.sha256(deliverable_bytes).hexdigest() if receipt.deliverable_hash != actual: raise ReceiptBindingError( f"deliverable hash mismatch: receipt={receipt.deliverable_hash} actual={actual}" ) # The echoed_restatement field is deliberately never consulted here. return None ```