Skip to content

test: fail closed on expired recovery drills and overclaiming receipts - #7

Merged
EauDoon merged 1 commit into
mainfrom
devloop/cycle-01-recovery-gate-failures
Aug 29, 2026
Merged

test: fail closed on expired recovery drills and overclaiming receipts#7
EauDoon merged 1 commit into
mainfrom
devloop/cycle-01-recovery-gate-failures

Conversation

@EauDoon

@EauDoon EauDoon commented Aug 29, 2026

Copy link
Copy Markdown
Owner

What

Closes two fail-closed gaps around gated execution and settlement receipts:

  • A recovery-gated rail now has tests that refuse expired attestations at permit and execute, reject REVIEW_COMPENSATED drills, and return HTTP 422 for unqualified or tampered recovery bundles without mutating the action.
  • Integrity verification now rejects re-signed receipts whose technical claim, limitations, or outcome overreach the protocol's bounded language, including receipt-profile bundles that skip semantic replay.

Why

Standalone recovery verification already failed at attestation expiry, but the rail gate that actually issues permits and consumes them did not have coverage for stale drills. Receipt-profile integrity checks also accepted any non-empty technical claim, so an overclaiming receipt could pass without lifecycle semantics.

How tested

node ./scripts/check.js
node --test

107 deterministic tests passed, including the new recovery-gate, HTTP 422, and overclaiming-receipt cases.


Devin Review

Recovery-gated permit and execute now have deterministic coverage for
stale attestations, REVIEW_COMPENSATED drills, and HTTP-submitted failed
bundles. Integrity verification also rejects settlement receipts whose
technical claim or limitations overreach the protocol's bounded language.
@EauDoon
EauDoon merged commit bf524e6 into main Aug 29, 2026
6 of 7 checks passed
@EauDoon
EauDoon deleted the devloop/cycle-01-recovery-gate-failures branch August 29, 2026 19:25

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Devin Review

Comment thread src/bundle-validation.js
Comment on lines +449 to +456
if (value.technical_claim !== RECEIPT_TECHNICAL_CLAIM) {
invalid("SettlementReceipt technical claim is unsupported.");
}
if (
value.limitations.length !== RECEIPT_LIMITATIONS.length ||
value.limitations.some((item, index) => item !== RECEIPT_LIMITATIONS[index])
) {
invalid("SettlementReceipt limitations are unsupported.");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Valid v0.1 receipts become unverifiable

Previously valid v0.1 receipts with alternative bounded disclosures fail RECEIPT_LIMITATIONS equality despite retaining the same schema version. Existing independently issued receipts can no longer be verified.

Prompt for agents
The v0.1 settlement receipt schema previously allowed arbitrary string technical_claim values and limitation arrays, while the verifier now requires one exact claim and three exact ordered limitations in src/bundle-validation.js receipt(). This invalidates already-issued artifacts without changing schema_version. Preserve compatibility by either introducing a new artifact version for the stricter canonical wording, or define a backward-compatible bounded-language validation rule for v0.1 and align spec/schemas/settlement-receipt.schema.json, verification behavior, and protocol documentation.
Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant