Skip to content

Tighten invalid commons receipt fixtures (v1.1.0)#15

Merged
GsCommand merged 1 commit intomainfrom
codex/fix-invalid-example-suite-in-protocol-commons
Mar 20, 2026
Merged

Tighten invalid commons receipt fixtures (v1.1.0)#15
GsCommand merged 1 commit intomainfrom
codex/fix-invalid-example-suite-in-protocol-commons

Conversation

@GsCommand
Copy link
Contributor

Motivation

  • Make the v1.1.0 invalid example suite more precise by turning noisy, copy-paste receipt fixtures into targeted negative tests that fail for one clear schema reason.

Description

  • Updated and tightened several receipt.invalid.json fixtures under examples/v1.1.0/commons/*/json/invalid to fail for a single, realistic reason (malformed hash pattern, malformed timestamp format, invalid signature pattern, or missing required top-level field).
  • Changed contents (and in a few cases renamed) these files: examples/v1.1.0/commons/analyze/json/invalid/900-invalid-request-hash.receipt.invalid.json, examples/v1.1.0/commons/clean/json/invalid/900-invalid-timestamp.receipt.invalid.json, examples/v1.1.0/commons/convert/json/invalid/900-invalid-signature.receipt.invalid.json, examples/v1.1.0/commons/convert/json/invalid/901-missing-request-hash.receipt.invalid.json, examples/v1.1.0/commons/describe/json/invalid/900-missing-status.receipt.invalid.json, examples/v1.1.0/commons/explain/json/invalid/900-missing-signature.receipt.invalid.json, examples/v1.1.0/commons/explain/json/invalid/901-invalid-request-hash.receipt.invalid.json, examples/v1.1.0/commons/fetch/json/invalid/900-invalid-result-hash.receipt.invalid.json, examples/v1.1.0/commons/parse/json/invalid/900-invalid-timestamp.receipt.invalid.json, and examples/v1.1.0/commons/summarize/json/invalid/900-invalid-request-hash.receipt.invalid.json.
  • Kept the repository’s v1.1.0 flat layout and validation entrypoints intact and avoided schema or tooling changes; the validator still selects schemas by example location so I scoped fixes to example JSON only.
  • Focused on receipts only in this pass (I did not change request fixtures or schema files) to minimize churn while producing clearer, protocol-realistic negative tests.

Testing

  • Ran node scripts/validate-all.mjs to compile/validate schemas and it completed successfully.
  • Ran node scripts/validate-examples.mjs and iterated until the example-suite validation passed; final run reports all v1.1.0 valid examples accepted and invalid examples rejected as expected.
  • Performed a custom Ajv spot-check script against the updated invalid receipts to confirm each updated file fails for the intended primary reason (pattern/format mismatch or missing required property), and those checks produced the expected Ajv error messages.

Codex Task

@GsCommand GsCommand merged commit cf8ae91 into main Mar 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant