Strengthen fixture coverage and simplify validation commands#11
Merged
Strengthen fixture coverage and simplify validation commands#11
Conversation
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.
Motivation
Description
examples/v1.1.0/commons/*/json/{valid,invalid}to provide per-verb disciplined coverage (minimal + richer valid requests, canonical ok+error receipts, and targeted invalid cases such asmissing-verb,missing-input,empty-input,invalid-version,extra-property,invalid-mode,wrong-input-type, and explicitwrong-verb-literalcases). Representative files:examples/v1.1.0/commons/*/json/invalid/001-missing-verb.request.invalid.jsonand*/json/valid/900-ok.receipt.valid.json.sha256:digests, CID-shapedresult_cidvalues, and realistic example detached signatures (replaced1111..placeholders).package.jsonsonpm run validateis the single top-level command, with two distinct subcommands kept:validate:schemasandvalidate:examples; removed the redundantajv-run.mjsconvenience alias.scripts/validate-examples.mjsto be deterministic and more diagnostic: deterministic file sort, explicit detection of request vs receipt files, per-file AJV error formatting, per-verb and per-version summary counts, and safer schema preloading.README.md,ONBOARDING.md) to describe the canonical workflow and added a conciseFixture disciplinesection that records rules for realistic valid examples and targeted invalid fixtures.package.json,scripts/validate-examples.mjs,README.md,ONBOARDING.md, deletion ofscripts/ajv-run.mjs, and all JSON fixtures underexamples/v1.1.0/commons/*/json/{valid,invalid}(173 paths touched in the commit).v1.1.0schemas validated all new fixtures as intended.Testing
npm run validate:schemasand all schemas compiled successfully (45 schemas compiled).npm run validate:examplesand the new v1.1.0 fixture matrix passed; summary printed per-verb/per-version totals (example output included per-verb counts).npm run validate(full pass) and it completed successfully (schema compile + examples verification).Notes on scope and remaining gaps
Codex Task