Skip to content

feat(ci): ai admission fixture corpus for publish-time parity (#627) - #629

Merged
enricopiovesan merged 1 commit into
mainfrom
claude/issue-627-ai-admission-fixtures
Oct 2, 2026
Merged

enricopiovesan merged 1 commit into
mainfrom
claude/issue-627-ai-admission-fixtures

Conversation

@enricopiovesan

Copy link
Copy Markdown
Contributor

Summary

Closes #627. Adds a registry-owned fixture corpus for the ai admission rules: accept/reject cases plus a test proving capability_validation.py agrees with every one. traverse-cli capability publish will vendor a pinned copy, so it can reject the same contracts locally before a registry PR exists (traverse Decision 109, traverse-framework/traverse#1459 / traverse-framework/traverse#1597).

Governing Spec

  • 001-registry-foundation
  • 002-capability-validation
  • 026-model-rights-compliance

Project Item

What Changed

  • scripts/ci/fixtures/ai_admission_corpus.json: 103 fixtures, corpus_version 1.0.0.
    • Each fixture has a tier (contract_decidable | ci_only), an evaluated_as (newly_added | existing), and the sorted set of expected CI error codes.
    • Coverage:
      • FR-017 shapes, including legacy vs. new contracts, ai: null, and mixed arrays;
      • immutable pins;
      • SPDX syntax;
      • the full spec 026 rights record;
      • evidence-file shape;
      • derivation;
      • data obligations;
      • rights_change;
      • the network and cross-file ci_only cases.
  • scripts/ci/tests/test_ai_admission_corpus.py runs the exact CI code paths. It is wired into the required capability-validation job.
  • validate_ai_declaration is split out of validate_contract, with no behaviour change. The existing 210 tests pass unchanged.
  • Bug fix: the corpus surfaced four TypeError: unhashable type crashes. A list or object given as a rights enum, verification.status, a derivation.transformations[] entry, or data_obligations[].kind crashed CI instead of failing with the documented code. All four are now guarded and covered by fixtures.
  • docs/model-rights.md: a new "Admission fixture corpus" section, with the rule that changing an ai rule means updating the fixtures in the same PR.
  • Decision-log entry 129.

Validation

  • python3 -m unittest scripts/ci/tests/test_ai_admission_corpus.py: all 103 fixtures agree
  • python3 -m unittest scripts/ci/tests/test_capability_validation.py: 210 tests pass
  • The test fails when a fixture's expected codes are changed
  • The four crash inputs raise TypeError on main's validator and fail cleanly with this change
  • pre_pr_check.sh

🤖 Generated with Claude Code

103 registry-owned accept/reject fixtures for the spec 001 FR-017 / spec 026
ai rules with a test that drives the exact CI code paths. traverse-cli
capability publish vendors a pinned copy (traverse Decision 109). Also fixes
four TypeError crashes on non-string rights/status/transformation/kind values.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@enricopiovesan
enricopiovesan merged commit f5221c4 into main Oct 2, 2026
11 checks passed
@enricopiovesan
enricopiovesan deleted the claude/issue-627-ai-admission-fixtures branch October 2, 2026 05:49
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.

Admission fixture corpus for ai/model-attribution rules (CLI parity, traverse Decision 109)

1 participant