Skip to content

Accepts ADR-0002: the datamodel document's JSON Schema - #39

Merged
johnnyt merged 1 commit into
mainfrom
sd-mr3-flip-adr-0002
Sep 27, 2026
Merged

johnnyt merged 1 commit into
mainfrom
sd-mr3-flip-adr-0002

Conversation

@johnnyt

@johnnyt johnnyt commented Sep 27, 2026

Copy link
Copy Markdown
Member

Flips ADR-0002 (the datamodel document's JSON Schema) to accepted. Its code shipped in statifier_datamodel 0.5.0 (tag v0.5.0 at 71de7e0); acceptance was given by the operator on 2026-09-27.

What changes

  • docs/adr/0002-datamodel-document-json-schema.md: the status line moves from proposed (2026-09-26) to accepted (2026-09-27) in place, the date moving with the word as ADR-0001's own flip did; a dated ## Note at the foot records the flip, the version and the SHAs verified at.
  • docs/adr/README.md: the ADR-0002 row's status cell moves to accepted.

git diff origin/main -- docs/adr/ removes two lines: the record's status line and the index row whose status cell moved. Every other line is an addition at the foot of the record. No code, no changelog fragment (changelog.d/README.md excludes ADRs).

Direction check (every claim against the tag and main)

Verified at 71de7e0 (the v0.5.0 tag) and at fde6da6 (origin/main). The one commit between them touches .claude/wurk/release.md only, and no commit after the record merged (c631e97) touches the record's cited files other than the code commit c61a52a and the release commit 71de7e0 (version bump, README pin, changelog).

  • Context, index/1 admits any map with a list under "scopes" and answers nil otherwise: StatifierDatamodel.Index.index/1. Holds.
  • Context, an unknown scope name indexes with scope: nil: Index's private scope_name/1 answers nil for a name outside @scopes. Holds.
  • Context, a runtime dependency is a decision to record: mix.exs, the comment above deps/0. Holds.
  • Decision 1, the file, its draft and the package list: priv/schemas/datamodel-document.schema.json carries the draft-07 $schema; priv/schemas is in mix.exs package/0 files:. Holds.
  • Decision 2, the drift test over the nine and one outside: test/statifier_datamodel/schema_test.exs, "each spelling the schema lists indexes to a type; one outside them does not", against index.ex's private @types. Holds.
  • Decision 3, StatifierDatamodel.Schema.path/0 and json/0, embedded with @external_resource, text not a map, no caller in lib/: lib/statifier_datamodel/schema.ex; a search of lib/ finds no other reference to the module. Holds.
  • Decision 4, advisory: the near-misses are rejected by the schema and index as before: schema_test.exs, "the near-misses". Holds.
  • Decision 5, the required keys and their types: the file's definitions (scope, entry, declaration, field) and top-level required. Holds; the keys the decision names without a type are required and untyped in the file, which the foot Note records as a reading, not a change.
  • Decision 6, type and item_type are strings and the nine are listed under definitions/closed_type: the file; the declared-name case is schema_test.exs, "an entry whose type names a declaration validates". Holds.
  • Decision 7, no additionalProperties: false anywhere: the file has no additionalProperties key. Holds.
  • Decision 8, the $id keyed on document version 1: the file's $id; schema_test.exs, "the file is draft-07 and its $id is keyed on document version 1". Holds; the URL does not resolve, which the decision already allows ("never fetched") and the foot Note records.
  • Decision 9, a change to what the document admits is breaking: changelog.d/README.md. Holds.
  • Decision 10, ex_json_schema ~> 0.11, only: :test: mix.exs deps/0; mix.lock resolves 0.11.5. Holds.
  • Worked example rows (nine declared paths; eight without event; card.last4 not sensitive; Settleable undeclared and read as opaque; version 2 indexed as 2; the declared-name entry typed {:declared, "cards.credit_txn"}): schema_test.exs negatives/0 and StatifierDatamodel.Types.parse/2's opaque answer. Holds.

No claim failed. The record's own sentence "this record does not flip its own status" stays true and is met in the foot Note: the operator flipped it.

Gate

mix quality ran green on the committed tree (format, compile with warnings as errors, doc links, dependencies, credo, docs, tests with coverage, dialyzer).

ADR-0002's status line moves from proposed to accepted in place, and
the ADR index row's status cell with it. A dated Note at the foot of
the record says the code it decides shipped in 0.5.0 (tag v0.5.0 at
71de7e0) and that every claim was verified against that tag and
against main at fde6da6, whose one later commit touches none of the
files the record cites. The Note also records two readings that change
nothing the record decides: the keys decision 5 requires without a
type are required and untyped in the file, and the $id decision 8
spells is an identifier that does not resolve.

The status line is the only line removed from the record; the index
row's status cell is the only other change in docs/adr/.

Documentation only: no code, and no changelog fragment
(changelog.d/README.md excludes ADRs). The full gate ran green on this
exact tree.

Refs: sd-mr3
@johnnyt
johnnyt merged commit 9066f55 into main Sep 27, 2026
1 check passed
@johnnyt
johnnyt deleted the sd-mr3-flip-adr-0002 branch September 27, 2026 15:53
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.

1 participant