Skip to content

feat(verify): ADR-0060 P1 — reusable conformance-ledger helper + unify two ledgers#2104

Merged
xuyushun441-sys merged 1 commit into
mainfrom
feat/conformance-ledger-helper
Jun 21, 2026
Merged

feat(verify): ADR-0060 P1 — reusable conformance-ledger helper + unify two ledgers#2104
xuyushun441-sys merged 1 commit into
mainfrom
feat/conformance-ledger-helper

Conversation

@xuyushun441-sys

Copy link
Copy Markdown
Contributor

ADR-0060 (#2103) P1: promote the conformance-ledger discipline to a reusable platform capability.

@objectstack/verify now exports checkLedger(rows, opts): string[] + ConformanceRow — the static complement to its runtime harness, encoding the invariants the platform hand-wrote twice (ADR-0056 D10 authz + ADR-0058 D7 expression): unique ids, valid state, enforced-has-site, experimental/removed-has-note, proof-file-exists, high-risk-has-proof, exactly-one-cover, and the discover ratchet (fail on unclassified/stale surfaces). Both existing ledgers are refactored onto it (the expression site field unified to enforcement; ExprSurface extends ConformanceRow).

Verification: full build 75/75 · dogfood 133 (incl. 16 conformance tests). Ratchet verified still has teeth. Next: P2 — validation-rule-surface ledger (pins ADR-0020 state_machine).

🤖 Generated with Claude Code

…y two ledgers

Promote the conformance-ledger discipline (hand-written twice: ADR-0056 D10 authz
matrix, ADR-0058 D7 expression surface) to a reusable platform capability:

- @objectstack/verify gains a `conformance` module: `ConformanceRow` + `checkLedger
  (rows, opts): string[]` — returns problems (empty = sound), so the helper carries
  no test-runner dependency. It encodes the shared invariants once (unique ids,
  valid state, enforced-has-enforcement, experimental/removed-has-note, proof-file-
  exists, high-risk-has-proof, exactly-one-cover) and the ratchet (discover the
  real surface from source; fail on unclassified or stale covers). 12-case unit test.
- authz-conformance + expression-conformance refactored onto checkLedger: one call
  replaces the duplicated assertion logic. The expression ledger's `site` field is
  unified to `enforcement` and ExprSurface now `extends ConformanceRow`; its
  expression-specific invariants (mode/dialect/fail-policy, compile rows name the
  canonical compiler) stay local. Ratchet verified still has teeth.

Green: full build 75/75, dogfood 133 (incl. 16 conformance tests).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jun 21, 2026 7:09am

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation tests tooling size/m labels Jun 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

No hand-written docs reference the 2 changed package(s). ✅

@xuyushun441-sys
xuyushun441-sys merged commit ee86099 into main Jun 21, 2026
17 checks passed
@xuyushun441-sys
xuyushun441-sys deleted the feat/conformance-ledger-helper branch June 21, 2026 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants