Spec Studio

Duplicate carrier IDs are excluded loudly

spec:validation.duplicate-idsUse Case / Behavior · featureready floor ready

Changed since the base graph base da4b141: relation.refines:spec:protocol.self-hosting; relation.refines:spec:validation.two-check-families

Base input: schema 0.11.0, 405 Specs.

Packs: pack:self-hosting-v1

Design: no design entries · no pinned declarations · no decisions

Findings: no errors, no warnings

specs/validation/duplicate-ids.sdp.md

No open questions and no blocking questions; implementation binding present, verifier binding present, and expected-outcome oracle none.

Intent
outcome
Prevent ambiguous authored identity from entering the graph.
Behavior
rule line 20 · specs/validation/duplicate-ids.sdp.md:20
If more than one carrier declares an ID, every duplicate site receives extract/duplicate-id and no ambiguous node is derived.
rule line 21 · specs/validation/duplicate-ids.sdp.md:21
Over a graph from any producer, every node whose id is carried by another node receives a conformance/duplicate-ids error; the extractor separately excludes ambiguous authored carriers through extract/duplicate-id.

2 unkeyed rules.

Verifying examples

TypeScript and Markdown duplicates are both refused · spec:validation.duplicate-ids.dual-carrier · ready floor ready

Executable Spec

Given a {firstCarrier: "TypeScript"} carrier declares {specId: "spec:fixture.duplicate"}
Given a {secondCarrier: "Markdown"} carrier declares {specId: "spec:fixture.duplicate"}
When the extraction root is read
Then both sites report {findingId: "extract/duplicate-id"}
Then no graph node is emitted for {specId: "spec:fixture.duplicate"}

Open example

Example space

Given a {firstCarrier:string} carrier declares {specId:string}
Given a {secondCarrier:string} carrier declares {specId:string}
When the extraction root is read
Then both sites report {findingId:string}
Then no graph node is emitted for {specId:string}
Verification

Verifier bindings

  • spec:validation.duplicate-ids.dual-carrier · TypeScript and Markdown duplicates are both refused · declared · example enabled · specs/validation/duplicate-ids.dual-carrier.sdp.md

    External run evidence from test/self-hosting-duplicate-ids.test.ts

    Test anchors: test:protocol.duplicate-ids.dual-carrier. Specs verified by those bindings: spec:validation.duplicate-ids, spec:validation.duplicate-ids.dual-carrier.

    Run 1: external run evidence from vitest 4.1.10

    Build: CI 380 · Branch: feature/roadmap-and-slices-v0 · Commit: 34909918bf0be0e849959644401797191cae379f · Start: 2026-10-22T17:40:31.456Z · Stop: 2026-10-22T17:42:16.171Z

    NameSuiteResultDuration
    names self-hosting generation before collecting its filtered tracergenerated contract preflightpassed47.15 ms
    names checkout generation before collecting its filtered examplegenerated contract preflightpassed41.75 ms
    names both generations when an unfiltered suite lacks both contract treesgenerated contract preflightpassed52.17 ms
    matches a Vitest substring filter before collecting the self-hosting tracergenerated contract preflightpassed42.03 ms
    matches a ./-prefixed filter before collecting the self-hosting tracergenerated contract preflightpassed55.66 ms
    matches an absolute-path filter before collecting the self-hosting tracergenerated contract preflightpassed55.97 ms
    does not require contracts for an unrelated Vitest filtergenerated contract preflightpassed94.09 ms
    proceeds for the unfiltered invocation once both contract trees are generatedgenerated contract preflightpassed129.27 ms
    fails a pooled run that mutates repository-root generated statepooled root generated-state sentinelpassed83.33 ms
    passes a pooled run that leaves repository-root generated state untouchedpooled root generated-state sentinelpassed83.32 ms
    derives the duplicate-ID verifier facts from the bound executable examplenot recordedpassed5140.53 ms
    executes the bound example against a fresh worldTypeScript and Markdown duplicates are both refused (spec:validation.duplicate-ids.dual-carrier)passed8.19 ms

Example space

  • firstCarrier · string · declared by a {firstCarrier} carrier declares {specId}
  • specId · string · declared by a {firstCarrier} carrier declares {specId}
  • secondCarrier · string · declared by a {secondCarrier} carrier declares {specId}

Bound points

ExamplefirstCarrierspecIdsecondCarrier
spec:validation.duplicate-ids.dual-carrier"TypeScript""spec:fixture.duplicate""Markdown"

Oracle binding: none

Coverage

firstCarrier: "TypeScript" · spec:validation.duplicate-ids.dual-carrier · not enumerable

specId: "spec:fixture.duplicate" · spec:validation.duplicate-ids.dual-carrier · not enumerable

secondCarrier: "Markdown" · spec:validation.duplicate-ids.dual-carrier · not enumerable

Unbound

  • firstCarrier: None
  • specId: None
  • secondCarrier: None
Design view

Requirement drawing

Requirement drawing for spec:validation.duplicate-ids
The diagram as text
  • spec:validation.duplicate-ids: Duplicate carrier IDs are excluded loudly · declared Spec
  • spec:validation.duplicate-ids.dual-carrier: TypeScript and Markdown duplicates are both refused · declared Spec
  • spec:validation.two-check-families: Validation separates well-formedness from non-pretending · declared Spec
  • impl:protocol.duplicate-id-exclusion: excludes duplicated carrier ids from the graph · anchored code · src/extract/index.ts:93
  • impl:protocol.duplicate-ids: rejects duplicate node identities from any graph producer · anchored code · src/validate/validators.ts:263
  • test:protocol.duplicate-ids.dual-carrier: dual-carrier duplicate-ID contract verifies carrier exclusion · anchored test binding · binding present · test/self-hosting-duplicate-ids.test.ts:316
  • spec:validation.duplicate-ids refines spec:validation.two-check-families · declared — duplicate identity is a conformance refusal
  • spec:validation.duplicate-ids.dual-carrier refines spec:validation.duplicate-ids · declared
  • spec:validation.duplicate-ids.dual-carrier verifies spec:validation.duplicate-ids · declared
  • impl:protocol.duplicate-id-exclusion satisfies spec:validation.duplicate-ids · anchored
  • impl:protocol.duplicate-ids satisfies spec:validation.duplicate-ids · anchored
  • test:protocol.duplicate-ids.dual-carrier verifies spec:validation.duplicate-ids.dual-carrier · anchored
Mermaid source

Copyable source; the Studio draws static SVG.

Preferred and chosen syntax: requirementDiagram; exact refines, satisfies and verifies, with claim words in nodes and per-edge comments.

Decisions

No decision record named.

Runtime
  • component:protocol.extract · the carrier and source pipeline · src/extract/index.ts:192 · layer application · context protocol

    Uses

    • component:protocol.graph · the one graph and its semantic decisions · src/graph/schema.ts:34 · layer domain · context protocol
    • component:protocol.model · the authored contracts and stable ids · src/model/anchors.ts:100 · layer domain · context protocol
    • component:protocol.notation · the leaf step codec · src/notation/slots.ts:261 · layer domain · context protocol
    • component:protocol.validate · one finding currency and ordered checks · src/validate/validators.ts:72 · layer domain · context protocol
  • component:protocol.validate · one finding currency and ordered checks · src/validate/validators.ts:72 · layer domain · context protocol

    Uses

  • impl:protocol.duplicate-id-exclusion · excludes duplicated carrier ids from the graph · src/extract/index.ts:93

    Component: component:protocol.extract · the carrier and source pipeline · src/extract/index.ts:192 · layer application · context protocol

    Uses

    None.

  • impl:protocol.duplicate-ids · rejects duplicate node identities from any graph producer · src/validate/validators.ts:263

    Component: component:protocol.validate · one finding currency and ordered checks · src/validate/validators.ts:72 · layer domain · context protocol

    Uses

    None.

Runtime observation: not tracked.

Evidence

Runtime observation: not tracked.

Build attestations: not tracked.

Deployments: not tracked.

Bills of materials: not tracked.

Impact
Relations of spec:validation.duplicate-ids
  • E4: verifies · declared
The diagram as text
  • spec:carrier.markdown-parser: The Markdown parser reifies the ruled subset
  • spec:validation.duplicate-ids: Duplicate carrier IDs are excluded loudly
  • spec:validation.duplicate-ids.dual-carrier: TypeScript and Markdown duplicates are both refused
  • spec:validation.two-check-families: Validation separates well-formedness from non-pretending
  • spec:validation.duplicate-ids dependsOn spec:carrier.markdown-parser · declared — duplicate exclusion includes the default Markdown carrier
  • spec:validation.duplicate-ids refines spec:validation.two-check-families · declared — duplicate identity is a conformance refusal
  • spec:validation.duplicate-ids.dual-carrier refines spec:validation.duplicate-ids · declared
  • spec:validation.duplicate-ids.dual-carrier verifies spec:validation.duplicate-ids · declared
Mermaid source

Copyable source; the Studio draws static SVG.

Preferred syntax: flowchart. Chosen syntax: labelled flowchart, preserving exact relations, claims and folds.

Rests on

Rested on by

Distance 1

Relations

Relation and directionOther endClaimReasonExercised keys
dependsOn · outgoingThe Markdown parser reifies the ruled subset
spec:carrier.markdown-parser · resolves
declaredduplicate exclusion includes the default Markdown carrierNone
refines · outgoingValidation separates well-formedness from non-pretending
spec:validation.two-check-families · resolves
declaredduplicate identity is a conformance refusalNone
refines · incomingTypeScript and Markdown duplicates are both refused
spec:validation.duplicate-ids.dual-carrier · resolves
declaredNoneNone
verifies · incomingTypeScript and Markdown duplicates are both refused
spec:validation.duplicate-ids.dual-carrier · resolves
declaredNoneNone

Bindings

Implementation binding: present

  • impl:protocol.duplicate-id-exclusion · excludes duplicated carrier ids from the graph · src/extract/index.ts:93 · role validator · component component:protocol.extract · layer application · context protocol
  • impl:protocol.duplicate-ids · rejects duplicate node identities from any graph producer · src/validate/validators.ts:263 · role validator · component component:protocol.validate · layer domain · context protocol

Design reference: none

Verifier binding: present

Expected-outcome oracle: none

Runtime observation: not tracked.

Run results: not recorded in the graph.

Findings

None.

Composing (0)

Composing needs the script.