Repository navigation
fix: keep app-owned notify out of the protected overlay - #3
Merged
Merged
Conversation
The Codex desktop app rewrites `notify` with a version-scoped runtime path (`runtimes\cua_node\<hash>\...`), so a copy captured before an app update goes stale. Because the explicit `repair` command runs with `manual = true` and merges without requiring a clobber fingerprint, following the `status` hint after an app update rewrote the live file to point at a runtime directory that no longer exists, silently breaking the `turn-ended` Computer Use hook. `notify` now joins `mcp_servers.node_repl` in the default `ignored` set: neither protected nor restored. That also stops `ccswitch adopt` from publishing the path into CC Switch's `common_config_codex`, where it would have poisoned every future provider switch. Recorded reproduction: baseline notify -> runtime 2134bcb1950af07e, live notify -> runtime 81ea4d5168ddd0a3 (app update), `repair` -> `overwritten notify`, stale runtime restored. After the fix the same scenario reports NoChange and `repair` performs no action. Regression coverage: `manual_repair_keeps_an_app_updated_notify`; `ignored_matches_app_owned_churn`; `watch_repairs_a_cc_switch_style_clobber` and `cc_switch_adopt_publishes_common_config_providers_and_mcp` now assert the app-owned key is left alone. Verified: cargo fmt --check, cargo clippy -D warnings, cargo test --workspace (27 tests).
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.
Problem
notifywas treated as user-owned and captured into the protected overlay. The Codexdesktop app rewrites that key with a version-scoped runtime path
(
runtimes\cua_node\<hash>\...), so any captured copy goes stale the moment the appupdates.
The explicit
repaircommand runs withmanual = trueand therefore merges withoutrequiring a clobber fingerprint (
store.rs). So the sequence below silently rewrote thelive config to point at a runtime directory that no longer exists:
Effect: the
turn-endedComputer Use hook stops firing, and the wrong value persistsbecause nothing re-reads the deleted directory.
Fix
notifynow sits in the defaultignoredset next tomcp_servers.node_repl, which hasexactly the same lifecycle.
ignoredmeans neither protected nor restored — the key isleft to the app that owns it.
This also closes a second, worse path:
ccswitch adoptpublished the overlay into CCSwitch's
common_config_codex, so the stale runtime path would have been injected intoevery future provider switch.
Evidence
Recorded reproduction against the previous binary (isolated
CODEX_HOME):notify2134bcb1950af07enotifyafter app update81ea4d5168ddd0a3repairoverwritten notify2134bcb1950af07erestored (directory no longer exists)After the fix, the same scenario with the freshly built binary:
Tests
manual_repair_keeps_an_app_updated_notify— fails on the old behaviour.ignored_matches_app_owned_churn— assertsnotifyis ignored, and that a genuineuser-owned registration (
mcp_servers.prima-mock-api) is still protected.watch_repairs_a_cc_switch_style_clobber/cc_switch_adopt_publishes_common_config_providers_and_mcp— updated to assert app-owned churn is left alone and never published.
Verification gates
Behaviour change to be aware of
After a CC Switch clobber,
notifyis no longer restored from the overlay; it is absentuntil the Codex app rewrites it. The failure mode changes from silently pointing at a
deleted runtime, indefinitely to briefly missing, self-healed by the owning app. Users
who maintain
notifyby hand can protect it again by removing it fromignoredinpolicy.toml.Version
Crate
0.1.0-alpha.3, release tagv26.0-Alpha.3.