Skip to content

Let the compliance suite verify the ledger anchor - #37

Merged
vicmaster merged 1 commit into
mainfrom
feat/compliance-anchored
Nov 9, 2026
Merged

vicmaster merged 1 commit into
mainfrom
feat/compliance-anchored

Conversation

@vicmaster

Copy link
Copy Markdown
Owner

Changes

A new opt-in setting lets the compliance suite prove the ledger anchor works: with it on, the suite's ledger check makes a checkpoint, sends it to the configured anchor, reads it back, and verifies against it. Before, this needed a separate hand-written test. Off by default, so existing suites behave the same and never publish to an anchor they were not told to use. The README's CI section now shows the setting instead of the hand-written test.

Testing

Full suite green on SQLite, rubocop clean; CI covers PostgreSQL and MySQL.

  1. In a host app's test environment, point ledger_anchor at a scratch file and set compliance_anchored = true.
  2. Run the compliance suite: the ledger check passes and the scratch file gains one checkpoint line.
  3. Remove the anchor and run again: the ledger check fails and names config.ledger_anchor.
  4. Set compliance_anchored back to false: the check passes and the anchor file is not touched.

Opt-in config.compliance_anchored runs LedgerChain anchored in the suite. Not inferred from
ledger_anchor, so a suite never publishes to an anchor it was not told to use.
@vicmaster
vicmaster merged commit a519906 into main Nov 9, 2026
12 checks passed
@vicmaster
vicmaster deleted the feat/compliance-anchored branch November 9, 2026 18:01
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