You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
expect(checkLedger([ok()],{proofRoot: HERE,proofRequiredForEnforced: true}).some((x)=>x.includes('carries no proof'))).toBe(true);
41
+
});
42
+
it('flags a surface classified by two rows',()=>{
43
+
expect(checkLedger([ok({id: 'a',covers: ['x']}),ok({id: 'b',covers: ['x']})],{proofRoot: HERE}).some((x)=>x.includes('more than one row'))).toBe(true);
0 commit comments