test: fail closed on expired recovery drills and overclaiming receipts - #7
Merged
Merged
Conversation
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.
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."); |
There was a problem hiding this comment.
🟡 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.
Was this helpful? React with 👍 or 👎 to provide feedback.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Closes two fail-closed gaps around gated execution and settlement receipts:
REVIEW_COMPENSATEDdrills, and return HTTP 422 for unqualified or tampered recovery bundles without mutating the action.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
107 deterministic tests passed, including the new recovery-gate, HTTP 422, and overclaiming-receipt cases.