Skip to content

feat(schemas): add SeamDefinition schema — typed seam registry object [T0-2] - #230

Merged
mdheller merged 1 commit into
mainfrom
feat/t0-2-seam-definition-schema
Jul 31, 2026
Merged

feat(schemas): add SeamDefinition schema — typed seam registry object [T0-2]#230
mdheller merged 1 commit into
mainfrom
feat/t0-2-seam-definition-schema

Conversation

@mdheller

Copy link
Copy Markdown
Contributor

Implements T0-2. Adds schemas/SeamDefinition.json + 3 example seams (SEAM-002/008/013) + validator wired into make validate.

Verification

  • python3 tools/validate_seam_definition_examples.pyOK: SeamDefinition schema valid; 3 seams validated (SEAM-002, SEAM-008, SEAM-013); 5 rejection invariants enforced (R1-R5)
  • make validate-duplicate-schema-idsOK: 324 unique schema $id values
  • make validateOK: validate

Acceptance criteria

  • Schema validates against draft 2020-12
  • implementation_status enum contains exactly four values (asserted by validator)
  • Example covers ≥3 seams
  • make validate passes

Rejection invariants: R1 bad status · R2 empty gate_requirements · R3 missing seam_id · R4 malformed seam_id · R5 bad priority.

Closes #229

… (T0-2)

Typed architectural seam: an ungated boundary that is an attack surface. Each
names where trust is not enforced, the exploit vector, and the gate that closes
it. One object per example file (type discriminator) per repo convention;
examples cover SEAM-002/008/013 from the 13-seam registry.

- schemas/SeamDefinition.json (v1.0.0, draft 2020-12); seam_id pattern SEAM-###,
  implementation_status 4-enum, gate_requirements required non-empty.
- tools/validate_seam_definition_examples.py: validates each example + 5
  rejection invariants (R1-R5).
- Makefile: validate-seam-definition-examples wired into validate.

make validate green; validator enforces R1-R5. Closes #229
Copilot AI review requested due to automatic review settings July 31, 2026 03:54
@mdheller
mdheller merged commit 14a906b into main Jul 31, 2026
8 checks passed
@mdheller
mdheller deleted the feat/t0-2-seam-definition-schema branch July 31, 2026 03:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements Issue #229 (T0-2) by introducing a new Draft 2020-12 JSON Schema (SeamDefinition) plus validated example fixtures, and wiring a dedicated validator into make validate so the spec stays fixture-backed and regression-checked.

Changes:

  • Added schemas/SeamDefinition.json defining the canonical typed seam registry object (including required gate_requirements, implementation_status, and priority enums).
  • Added three examples/seam-definition*.json fixtures (SEAM-002, SEAM-008, SEAM-013) and a validator (tools/validate_seam_definition_examples.py) that enforces both positive validation and rejection invariants (R1–R5).
  • Integrated seam validation into the Makefile via validate-seam-definition-examples and included it in the validate meta-target.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tools/validate_seam_definition_examples.py Adds schema+fixtures validator with enum assertion and negative controls (R1–R5).
schemas/SeamDefinition.json Introduces the SeamDefinition Draft 2020-12 schema and required fields/enums.
Makefile Wires the new seam-definition validator into make validate.
examples/seam-definition.json Adds SEAM-002 example instance.
examples/seam-definition.seam-008.json Adds SEAM-008 example instance.
examples/seam-definition.seam-013.json Adds SEAM-013 example instance.
Suppressed comments (2)

schemas/SeamDefinition.json:40

  • gate_requirements is required/non-empty via minItems: 1, but individual entries can still be empty strings. Enforcing minLength on each item better matches the intent (“no stated gate is not actionable”) and is consistent with other schemas’ string arrays.
      "items": { "type": "string" },

schemas/SeamDefinition.json:51

  • linked_repos currently allows empty-string entries. Consider requiring non-empty strings for consistency with other string-array fields and to avoid placeholder/blank values silently validating.
      "items": { "type": "string" },

"attack_vector": { "type": "string", "minLength": 1, "description": "How the ungated boundary is exploited." },
"known_exploits": {
"type": "array",
"items": { "type": "string" },
Comment thread Makefile
@@ -1,12 +1,16 @@
.PHONY: validate validate-resource-contract validate-measurement validate-value-type validate-source-locator validate-sourceos-repo-manifest validate-mesh-action-registry validate-control-plane-examples validate-nlboot-examples validate-lattice-data-governai-examples validate-ops-history-examples validate-runtime-observability-examples validate-interpretability-examples validate-lifecycle-boundary-examples validate-svf-contracts validate-sync-cycle-receipts validate-onboarding-examples validate-runtime-causality-examples validate-agentic-os-examples validate-triparty-examples validate-labor-market-examples validate-supply-chain-risk-examples validate-reasoning-examples validate-mpcc-event-examples validate-knowledge-nugget-examples validate-semantic-action-examples validate-epistemic-kernel-examples validate-ab-update-examples validate-device-service-examples validate-duplicate-schema-ids validate-lawful-dispatch-receipt validate-architectural-building-block validate-agent-passport-examples validate-measurement
.PHONY: validate validate-resource-contract validate-measurement validate-value-type validate-source-locator validate-sourceos-repo-manifest validate-mesh-action-registry validate-control-plane-examples validate-nlboot-examples validate-lattice-data-governai-examples validate-ops-history-examples validate-runtime-observability-examples validate-interpretability-examples validate-lifecycle-boundary-examples validate-svf-contracts validate-sync-cycle-receipts validate-onboarding-examples validate-runtime-causality-examples validate-agentic-os-examples validate-triparty-examples validate-labor-market-examples validate-supply-chain-risk-examples validate-reasoning-examples validate-mpcc-event-examples validate-knowledge-nugget-examples validate-semantic-action-examples validate-epistemic-kernel-examples validate-ab-update-examples validate-device-service-examples validate-duplicate-schema-ids validate-lawful-dispatch-receipt validate-architectural-building-block validate-agent-passport-examples validate-seam-definition-examples validate-measurement
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.

feat(schemas): add SeamDefinition schema — typed seam registry object [T0-2]

2 participants