Add the R8 operator lever: V2Primary defaults key routes the app at the migrated v2 store#142
Merged
Merged
Conversation
…he migrated v2 store The Swift wrapper constructs the backend's environment from a fixed map, so there was no way to select v2-primary on a real install without editing code (Foundation Process replaces the child environment wholesale, so a GUI-session launchctl setenv never reaches the daemon). `defaults write com.openmessage.app V2Primary -bool true` now adds OPENMESSAGES_V2_PRIMARY=1 to the backend launch environment; deleting the key rolls back to the legacy store on next launch. The backend refuses primary mode when <dataDir>/v2 is missing, so setting the key on an unmigrated install fails loudly rather than silently serving an empty store. The lever off leaves the environment byte-identical to the shipped contract, pinned by a test comparing the full map.
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.
R8 flip lever
The wrapper's env map is fixed and Foundation
Processreplaces the child env wholesale — so v2-primary had no operator path on a real install. This adds one:OPENMESSAGES_V2_PRIMARY=1); backend refuses primary if<dataDir>/v2is missing (fails loudly on unmigrated installs).swift test: 10 executed, 0 failures.Part of the R8 cutover Max authorized; the live store is already migrated and gate-passed (
passed: true, 62,501/62,501 msgs, 9,441/9,441 reactions).🤖 Generated with Claude Code