Add durable Studio confirmation ledger - #35
Merged
Conversation
ohdearquant
marked this pull request as ready for review
August 17, 2026 16:38
An interrupt between creating the database file and committing its schema left a zero-byte file that failed the constructor's non-empty check forever, taking down a deployment's confirmation authority until a human deleted a file the module declares owner-private. The remnant is now treated exactly like a missing file: constructible, denied on reads with the same error, and adopted and re-initialized by the next bootstrap under the init lock. The test helper no longer swallows ledger registration failures for override-built contexts, so a tamper test cannot silently change what it exercises. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…into fix/ledger-bootstrap-remnant # Conflicts: # eval/openrouter_real_e2e.py
…into fix/ledger-bootstrap-remnant
The durability pragmas write the SQLite header before the schema transaction commits, so an interrupted first bootstrap usually leaves a non-empty, schema-less file that the zero-byte adoption predicate never matched: every later bootstrap failed ledger_corruption forever. Adoption now reads the database and adopts exactly the files provably holding zero committed objects; a committed schema still living in an uncheckpointed WAL is recognized and never discarded, unreadable bytes stay ledger_corruption, and reads deny a schema-less remnant like a missing file. Contract text updated to match, with a rule-separating WAL fixture in the tests.
Merging the parent's scan-first handler and widening its post-scan passthrough: a clock_invalid raised after the paid POST now runs the terminal artifact scan first, so a regressed clock can never mask a persisted credential; the diagnostic survives only a clean scan. Adds the post-response clock-regression guard tests in both directions.
ohdearquant
changed the base branch from
codex/openrouter-e2e-finalizer
to
main
August 17, 2026 18:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
BEGIN IMMEDIATEconsume transactionScope and safety
This is an offline persistence/integration slice stacked on the credential-free finalizer PR.
Live/paid execution remains HOLD:
No Keychain access, live discovery, or provider request was made.
Verification
git diff --check: passed