fix: persist review gate config outside transient state - #731
fix: persist review gate config outside transient state#731fscfede-beep wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e123511d2e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
sylvesterkaczmarek
left a comment
There was a problem hiding this comment.
Moving stopReviewGate out of transient plugin state fixes the authority boundary: Setup and Stop may legitimately run with different CLAUDE_PLUGIN_DATA, but the workspace policy must remain the same. Reusing one canonical workspace key for both paths avoids a second identity scheme, and preferring durable config while mirroring legacy state gives a reasonable compatibility transition. The cross-root integration test pins the actual fail-open bug rather than only the storage helper.
Summary
Fixes #684.
CODEX_HOME/plugin-cc/config/<workspace>.jsonCLAUDE_PLUGIN_DATA/ temp rootsgetConfig()prefer the durable config while retaining the existing state config as a legacy fallbacksetConfig()into the current legacy state for compatibilityThis removes
CLAUDE_PLUGIN_DATAfrom the authority boundary forstopReviewGate, so Setup and Stop can run with different plugin-data environments without silently disagreeing about whether the gate is enabled.Validation
Windows 11 / Node 26.3.1:
main: enable under plugin-data root A, read under root B ->false(fail-open)true, and disabling under B is observed under ACODEX_HOMEand correctly returns a blocking review decisionnode --check plugins/codex/scripts/lib/state.mjsgit diff --check