Skip to content

Contract authoring and runtime ownership

Status: open/proposed

  • The contract vocabulary (mcVersion-2 meta-schema) and the Finding DTO are cross-language normative now; which engine runs them is decided per surface, not globally.
  • The TS programmatic API (combinators + Zod) stays canonical until an explicit replacement decision for transforms, refinements, and custom rules exists.
  • Flip bars differ by surface: the declarative plane may flip on fixture + DTO parity; the programmatic surface flips only on demonstrated source-compatibility.

The Rust engine covers the declarative validation plane, not the full TS combinator/Zod surface. SDLC runs both a Zod registry and a Contract registry for related but non-identical jobs (_registry.ts, _contracts.ts). Treating “the engine” as one thing conflates vocabulary, authoring APIs, runtimes, and generated artifacts — each with its own compatibility promise.

SurfaceNormative nowRuntime ownershipFlip bar
Declarative YAML contractsmcVersion-2 vocabulary + published meta-schemaReplaceable (TS or Rust/WASM engine)Shared fixture corpus + Finding DTO parity
Programmatic contracts (combinators, Zod content plane)TS API is canonicalTS engineSource-compatibility demonstrated, plus an explicit replacement decision for Zod transforms/refinements/custom rules — never fixture parity alone
Finding DTOFrozen interchange shape: id, severity, path, span, hintAll engines emit itField changes require a contract-version bump per Q-5
Generated artifacts (JSON Schema projections, typed models)Derived, never hand-editedRegenerated from the normative surfacen/a
  • Q-4: the long-term authoring surface — TS/Zod, declarative YAML, Rust builders, or generated artifacts — and which parts are normative versus adapters.
  • Q-5: exactly which Finding fields are stable API (ids, severity, spans) versus changeable without a version bump (message text, hints).

D-7VMX-markdown-ecosystem-strategy review-discussion.md (R-2, Q-4, Q-5); ext-markdown-contract.md §7 on declarative-plane-only Rust coverage.


← Back to Decisions