Skip to content

feat(spec): settle schema identity — bare-host $id, no rename, single-file profile carriage - #14

Merged
qmarcelle merged 2 commits into
mainfrom
docs/adr-005-schema-identity
Jul 30, 2026
Merged

feat(spec): settle schema identity — bare-host $id, no rename, single-file profile carriage#14
qmarcelle merged 2 commits into
mainfrom
docs/adr-005-schema-identity

Conversation

@qmarcelle

@qmarcelle qmarcelle commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Settles the schema's identity — as distinct from its contents — and makes the
one byte change that follows.

Two commits. The first reconciles the $id host. The second consolidates two
concurrently-authored ADR-005 records into one, folds in the two decisions that
were made alongside the host but not written down, and fixes a stale reference
that would have shipped to npm.

The change

$id moves from https://www.workspacejson.dev/schema/v1.json to
https://workspacejson.dev/schema/v1.json.

This is consistency restoration, not a new choice. Three surfaces already treat
the bare domain as canonical — the package manifests, the migration provenance
record, and workspacejson/cli, whose architecture test has been asserting a
host this repository did not emit. The schema was the outlier.

Both hosts continue to serve the schema. Only a consumer comparing the $id
string byte-for-byte, or holding a pinned digest, observes anything.

Two decisions recorded, neither changing bytes

The file is not renamed. Decided against, permanently — not deferred. An open
question invites a later rename, and a rename is a second byte change and a
second invalidated digest. The name is already invisible to consumers: the export
key is ./schema, so the filename leaks only through the $id path component.
The misleading v1 is a documentation problem versioning.md already solves in
prose.

No sibling schema document will be introduced. Profiles continue to ride the
generated.specVersion enum with per-profile constraints as conditional
subschemas — the mechanism ADR-004 established. This is what makes the rename
decision hold: a filename only needs to disambiguate when there is something to
disambiguate from.

Recording both together is deliberate. The second is load-bearing for the first,
and a reader who finds only one cannot reconstruct why either holds.

Defect fixed

packages/spec/README.md:55 documented the $id as the www. host in a code
example, while the same file stated the bare host as canonical at line 148.
README.md is in the package files array, so the published tarball would have
told consumers the old string was the value to compare against — exactly the use
this record designates part of the contract surface.

Also corrects Depends on, which read Nothing while the entire release-folding
argument rests on ADR-004.

Why this ships in 0.4.5

That release has not published. A consumer moving from 0.4.4 sees one
transition covering both the ADR-004 widening and the corrected identity.
Publishing 0.4.5 first would make this a second pin invalidation.

It must not ride in v0.5, which carries profile changes. Two independent
byte-changing reasons in one release are indistinguishable to someone debugging
a digest that no longer matches.

Verification

  • pnpm -r typecheck — clean, both packages
  • pnpm -r build
  • pnpm -r test — 221 passed (48 spec, 173 rules)
  • pnpm run check:architecture
  • pnpm run check:architecture:test — 25 passed
  • pnpm run check:schema$id confirmed bare
  • pnpm run check:examples — 4/4
  • pnpm run check:docsnow passing; the superseded draft carried an internal tracker identifier in public prose and was not covered by the earlier verification run
  • pnpm run release:verify-packs
  • pnpm run check:conformance against the real producer — 28/28

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 — conformance green
  • No new ambient declare module for a standard-owned package

Release impact

  • Schema bytes changed, intentionally — one line, the $id host
  • Package name, version, bin, exports and files unchanged; the ./schema export key does not move
  • Changeset present, folding with the ADR-004 changeset into 0.4.5

Notes

Status is Accepted. Recorded on the basis that both questions were decided
explicitly before the record was written. Say so and I will move it to Proposed
— it is a one-line change and the index row.

migration/ is untouched. Those files record what was true at migration time
and are not rewritten to match a later decision; the remaining www. strings
there are correct as history.

…DR-005 (META-272)

The schema $id was https://www.workspacejson.dev/schema/v1.json while every
package manifest and doc uses https://workspacejson.dev without the www. prefix.
Both hosts serve the schema, but the strings disagreed — and versioning.md
instructs consumers to hash-check the materialized schema, making $id part of
the contract surface.

Changed to https://workspacejson.dev/schema/v1.json. Filename v1.json unchanged.
Folded into the same release as ADR-004 so consumers experience one schema-byte
transition rather than two consecutive pin invalidations.

- ADR-005 authored and accepted
- $id updated in schema/v1.json and schema.ts
- CANONICAL_ID test constant updated
- versioning.md, conformance.md, packages/spec/README.md updated
- Changeset added (patch, folds with existing ADR-004 changeset into 0.4.5)

Verification:
- pnpm -r typecheck: OK
- pnpm -r build: OK
- pnpm -r test: 221 tests passed (48 spec + 173 rules)
- pnpm run check:architecture: 145 files, 0 violations
- pnpm run check:architecture:test: 25 passed, 0 failed
- pnpm run release:verify-packs: both tarballs release-safe
- pnpm run check:schema: $id confirmed as bare domain
Copilot AI review requested due to automatic review settings July 28, 2026 18:15

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.

Two ADR-005 records were authored concurrently against the same branch. This
keeps the host reconciliation exactly as implemented and folds in the two
decisions that were made alongside it but not recorded, leaving one record.

Fixes a stale reference that would have shipped. packages/spec/README.md
documented the $id as the www host in a code example while the same file stated
the bare host as canonical twelve lines later. README.md is in the package files
array, so the published tarball would have told consumers the old string was
the value to compare against — the precise use the record calls part of the
contract surface.

Adds the two decisions:

The file is not renamed. Not deferred, decided against: an open question invites
a later rename, and a rename is a second byte change and a second invalidated
digest. The name is already invisible to consumers, since the export key is
./schema and the filename leaks only through the $id path component.

No sibling schema document will be introduced. Profiles continue to ride the
generated.specVersion enum with per-profile constraints as conditional
subschemas. This is what makes the rename decision hold — a filename only needs
to disambiguate when there is something to disambiguate from.

Also records the additionalProperties constraint encountered while implementing
ADR-004: it considers only properties declared in the same schema object, so a
single file must declare the union of every retained profile's root properties.
Corrects Depends on, which said Nothing while the release-folding argument rests
entirely on ADR-004.

check:docs now passes; the superseded draft carried an internal tracker
identifier in public prose and was not covered by the earlier verification run.
@qmarcelle qmarcelle changed the title feat(spec): reconcile schema $id host to bare canonical domain, per ADR-005 (META-272) feat(spec): settle schema identity — bare-host $id, no rename, single-file profile carriage Jul 29, 2026
@qmarcelle
qmarcelle merged commit 7739260 into main Jul 30, 2026
3 checks passed
@qmarcelle
qmarcelle deleted the docs/adr-005-schema-identity branch July 30, 2026 17:03
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