mirror of
https://github.com/PR0M3TH3AN/TORCH.git
synced 2026-10-27 07:51:52 +00:00
Six JSON Schema 2020-12 contracts under docs/v2/schemas — campaign,
milestone, task-contract, pledge, evidence-bundle, and the public
stewardship-manifest — with valid/invalid fixtures and a dependency-
free subset validator (scripts/validate-v2-contracts.mjs) wired into
npm test as validate:v2. Unsupported schema keywords fail loudly so
the interpreter and the schema files cannot drift apart.
test_integrity_note:
change_type: [new_tests]
scenarios:
- id: SCN-v2-fixture-expectations
given: committed schemas plus valid/ and invalid/ fixtures
when: the full validation run executes
then: valid fixtures pass, invalid fixtures fail, >=12 checked
- id: SCN-v2-no-ceiling-omission
given: a well-formed task contract
when: spendingCeiling is removed
then: validation reports the missing property
- id: SCN-v2-pledge-not-money
given: a well-formed pledge
when: a balance-shaped extra field is added
then: validation rejects the unexpected property
- id: SCN-v2-evidence-completeness
given: a well-formed evidence bundle
when: an artifact family or digest is removed/truncated
then: validation fails the required/pattern check
observable_outcomes:
- validator error lists at the runValidation()/validateAgainstSchema() boundary
determinism_controls:
- hermetic filesystem fixtures; no network, clock, or randomness
anti_cheat_rationale:
prevents:
- schema files diverging from what the validator enforces
- budget/provenance fields being omitted to skip enforcement
relaxation:
did_relax_any_assertion: false
if_true_explain_spec_basis: ""
Co-Authored-By: Claude Fable 5 <[email protected]>