Repository navigation
Conversation
…, not restated per store The synchronous value became one declaration in the previous commit, but the mechanism that applies a WAL store connection's policy was still written twice: WalStore._configured_writer set foreign_keys + synchronous inline, and CoordinationStore.configure_connection set the same pair with its own literals. Two openers of a WAL store could therefore still disagree on what a connection's policy is. Extract the per-connection pair onto StoreWriter.apply_connection_policy (where synchronous already lives); WalStore and CoordinationStore both call it and restate neither PRAGMA. WAL-mode assertion stays where each store needs it (WalStore re-asserts per open; the coordinator sets it once on the private stage), since that timing is a real per-store difference, not a duplicated fact. Behavior-identical: same two PRAGMAs, same values. Coordination + cohort + WAL carry + response tests green (base's one test_registry_revision red is pre-existing, confirmed on 21ff333). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XbFMSnLEc51gw21bLFFRK1
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.
Follow-up to #4781. That PR made the
synchronousvalue one declaration; this makes the mechanism that applies a WAL store connection's policy one declaration too.foreign_keys = ON+synchronous = <policy>was still applied in two places —WalStore._configured_writerinline, andCoordinationStore.configure_connectionwith its own literals — so two openers of a WAL store could still disagree about a connection's policy. Extracted toStoreWriter.apply_connection_policy(wheresynchronousalready lives); both call it and restate neither PRAGMA.WAL-mode assertion stays per store on purpose (
WalStorere-asserts per open; the coordinator sets WAL once on the private stage) — that timing is a real per-store difference, not a duplicated fact.Behavior-identical: same two PRAGMAs, same values (verified
apply_connection_policysets foreign_keys=1, synchronous=1/NORMAL;CoordinationStore/WalStoreinherit it). 106 passed across coordination/cohort/WAL-carry/response; the onetest_registry_revisionred is pre-existing (fails identically on base21ff3333d).🤖 Generated with Claude Code
https://claude.ai/code/session_01XbFMSnLEc51gw21bLFFRK1