Skip to content

Implement TC-L2-01..06 Layer 2 validators per RFC-0001 - #3

Merged
emmanuel-a-otchere merged 1 commit into
mainfrom
vibe/rfc0001-layer2-floor-8eb746
Oct 30, 2026
Merged

emmanuel-a-otchere merged 1 commit into
mainfrom
vibe/rfc0001-layer2-floor-8eb746

Conversation

@emmanuel-a-otchere

Copy link
Copy Markdown
Contributor

Summary

  • Implement src/contracts/layer2-integrity.ts: validators for TC-L2-01..06, covering Validation record well-formedness, flag_type and decision_on_validation enum enforcement, flags/decision consistency, validated_at timestamp validity, and the v1.0.0 optionality of the field
  • Add the Layer2Validation types to src/types.ts (COTS schema v1.1.0, RFC-0001; optional field)
  • Wire validateLayer2Records into the runner
  • Add five Layer 2 fixtures (conformant, bad flag type, bad decision, flags/decision mismatch, bad timestamp) and tests/layer2.test.ts (8 tests, including two end-to-end runner tests)
  • Add .gitignore (node_modules, dist) - the repo had none

Verification

  • npx vitest run: 23/23 tests pass (15 existing + 8 new)
  • npx tsc --noEmit: clean

Relationship to the floor

Reference implementation PR: Source-Engineering/source-engineering-reference-implementation#3. Specification changes: Source-Engineering/source-engineering-specifications (RFC-0001 branch).

…and fixtures per RFC-0001

Co-authored-by: emmanuel-a-otchere <emmanuel-a-otchere@users.noreply.github.com>
@emmanuel-a-otchere
emmanuel-a-otchere force-pushed the vibe/rfc0001-layer2-floor-8eb746 branch from ff7f7e4 to 84df9b9 Compare October 30, 2026 10:41
@emmanuel-a-otchere
emmanuel-a-otchere marked this pull request as ready for review October 30, 2026 12:23
@emmanuel-a-otchere
emmanuel-a-otchere merged commit 859ee9f into main Oct 30, 2026
1 check passed
@emmanuel-a-otchere
emmanuel-a-otchere deleted the vibe/rfc0001-layer2-floor-8eb746 branch October 30, 2026 12:24
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