Skip to content

Semantic conformance: TC-SEM-01..03 and RFC-0002 TC-RC-01..05 validators - #4

Merged
emmanuel-a-otchere merged 1 commit into
mainfrom
vibe/rfc0002-semantic-8eb746
Oct 31, 2026
Merged

emmanuel-a-otchere merged 1 commit into
mainfrom
vibe/rfc0002-semantic-8eb746

Conversation

@emmanuel-a-otchere

Copy link
Copy Markdown
Contributor

Summary

  • Implement src/contracts/semantic-integrity.ts:
    • TC-SEM-01 URN grammar (urn:source-engineering:<type>:<id> on every cots/source/decision/evidence/claim/constraint identifier)
    • TC-SEM-02 evidence-chain resolution: every source_id resolves to a source artifact, every claim_id to a claim, every claim evidence reference to an evidence item, every decision_id/decision_record_id to a DecisionRecord. No dangling references
    • TC-SEM-03 temporal ordering: no evidence issued after produced_at, no validation before production. Source expiry remains TC-CI-03's warning; TC-SEM-03 only fails impossible orderings
    • TC-RC-01..05 (RFC-0002): model-generated evidence items warned under admitted policies, bounded recursion requires a max_levels bound (bound > 1 warns), unbounded recursion warns, terminal policy violated by a model-generated item fails, legacy pre-RFC-0002 COTSs warn
  • Add the RFC-0002 optional fields to src/types.ts (source_type, chain_termination)
  • Wire the four validators into the runner
  • Add 9 fixtures and tests/semantic.test.ts (14 tests incl. two end-to-end runner tests)

The suite now proves the COTS is trustworthy, not just present: this operationalizes the first case study's Q3.2 finding (a COTS citing itself).

Verification

  • npx vitest run: 37/37 tests pass
  • npx tsc --noEmit: clean

…-RC-01..05 recursive chain validators per RFC-0002

Co-authored-by: emmanuel-a-otchere <emmanuel-a-otchere@users.noreply.github.com>
@emmanuel-a-otchere
emmanuel-a-otchere marked this pull request as ready for review October 31, 2026 00:51
@emmanuel-a-otchere
emmanuel-a-otchere merged commit 28c033e into main Oct 31, 2026
1 check passed
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.

2 participants