Skip to content

docs(adr): ratify ADR-004 — root version compatibility profile for v0.4.x - #10

Merged
qmarcelle merged 1 commit into
mainfrom
docs/adr-004-root-version
Jul 28, 2026
Merged

docs(adr): ratify ADR-004 — root version compatibility profile for v0.4.x#10
qmarcelle merged 1 commit into
mainfrom
docs/adr-004-root-version

Conversation

@qmarcelle

Copy link
Copy Markdown
Contributor

Summary

Adds ADR-004, the transition record ratifying how an optional root version key
may be accepted in the v0.4.x line, and the order in which acceptance and
emission are allowed to ship.

This is a decision record only. It changes no schema, no types, no validator
and no producer output. It is the ratification gate that the v0.4.5 reader-widening
work depends on.

Two measurements shaped the record and are reproducible from public materials:

  • The root object is additionalProperties: false, so adding a root key is
    additive to the schema as a document and breaking for every already-deployed
    reader that validates. Measured against @workspacejson/spec@0.4.4: both shipped
    examples validate today and both fail with a root key added.
  • The one known external reader gates on the root key, compares the major
    component only against a hardcoded supported set, and returns null on mismatch —
    silent, total artifact loss. Every 0.x value passes; 1.0 trips it.

Together those invert the assumed risk: emitting 0.4 now is safe and exercises a
gate that has never run while the stakes are zero. The hazard is the 1.0 boundary,
recorded as a standing constraint in §9.

The consequence is §8's forced ordering — widen the validator, wait for adoption,
only then emit. Those are three changes, not one, and collapsing them is the
failure the sequence exists to prevent.

Verification

  • pnpm -r typecheck — unaffected, docs-only change
  • pnpm -r build — unaffected, docs-only change
  • pnpm -r test — unaffected, docs-only change
  • pnpm run check:architecture — OK, 144 tracked files, 0 violations
  • pnpm run check:architecture:test — 25 passed, 0 failed
  • pnpm run check:schema — OK, canonical schema single-sourced and complete
  • pnpm run check:examples — OK, 4/4 examples validate
  • pnpm run check:docs — OK, 125 links resolved, no tracker identifiers
  • pnpm run release:verify-packs — unaffected, no package content changed

Boundary check

  • No producer, host-integration or site code added (see OWNERSHIP.md)
  • No @marcelle-labs/*, private Vreko source or workspace.vreko.json reference
  • No prescriptive policy field and no daemon assumption introduced
  • The four stable read paths are unchanged — §6 and the Boundaries section state this explicitly
  • No new ambient declare module for a standard-owned package

Release impact

  • Schema bytes unchanged
  • Package name, version, bin, exports and files unchanged
  • No changeset — this record is not release-facing on its own

Notes

Status is Proposed. Merging this publishes the record; ratification is the
separate act of moving Status to Accepted with a decision date.

No behavior change ships here. The schema/types/validator widening, and the
six conformance fixtures enumerated in §7, are the follow-on implementation work.

Index numbering. This adds row 004 and skips 003, which is drafted on a
separate branch. Whichever merges second will need a trivial docs/adr/README.md
rebase — same table, adjacent rows.

Producer side. workspacejson/cli already satisfies the constraints in §5 and
§8 without changes: it emits generated.specVersion: '0.4' and writes no root
version. Its follow-on work is a receipt proving output shape is unchanged
against the widened validator, not a producer change.

A document declares its profile in generated.specVersion. At least one
external consumer gates on a root `version` key no producer has ever emitted,
so that gate has never executed. Repairing the mismatch looks additive and is
not.

Two measurements taken against the shipped validator and the consumer's
public reader decide the record:

The root object is `additionalProperties: false`, so adding a root key
invalidates every document that carries it. Both shipped examples flip from
validate=true to validate=false. The change is additive to the schema and
breaking for every deployed reader that validates before reading — which is
what docs/conformance.md instructs consumers to do. Section 8 therefore
sequences validator widening, adoption, and emission as three changes that
must not land together.

The external gate compares major components only against a hardcoded set, so
every 0.x value passes and 1.0 does not. Emitting 0.4 now is safe and
exercises a gate that has never run while the stakes are zero. Section 9
records the 1.0 boundary as a breaking change for that consumer regardless of
this profile being additive, so the constraint outlives anyone's memory of
the conversation.

Also decides the equality invariant, absence and disagreement semantics,
specVersion retention, validator widening over a named profile, and the
fixture set including the perturbation pair that makes the invariant a test
rather than prose.
Copilot AI review requested due to automatic review settings July 28, 2026 17:14

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@qmarcelle
qmarcelle merged commit ee22850 into main Jul 28, 2026
3 checks passed
@qmarcelle
qmarcelle deleted the docs/adr-004-root-version branch July 28, 2026 17:16
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