Skip to content

Commit d40ed1a

Browse files
committed
Merge remote-tracking branch 'origin/main' into fix/1954-uninstall-symlinked-config
# Conflicts: # tests/test_cli.c
2 parents e5aabdf + 161df2b commit d40ed1a

12 files changed

Lines changed: 726 additions & 71 deletions

File tree

‎Makefile.cbm‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,7 @@ TEST_REPRO_SRCS = \
708708
tests/repro/repro_issue787.c \
709709
tests/repro/repro_issue842.c \
710710
tests/repro/repro_issue964.c \
711+
tests/repro/repro_issue1692.c \
711712
tests/repro/repro_invariant_calls.c \
712713
tests/repro/repro_invariant_graph.c \
713714
tests/repro/repro_invariant_breadth.c \

‎README.md‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ overwrite user-modified agents.
491491
| Agent | Activation | MCP config | Durable context / augmentation |
492492
|-------|------------|------------|--------------------------------|
493493
| Claude Code | Detected | `~/.claude.json` | Skill + three exact-tool graph agents; `SessionStart`, `SubagentStart`, non-blocking `PreToolUse` for `Grep`/`Glob`/`Bash`, and post-`Read` coverage |
494-
| Codex CLI | Detected | `$CODEX_HOME/config.toml` | `AGENTS.md`, skill, three read-only agents; `SessionStart` + `SubagentStart` |
494+
| Codex CLI | Detected | `$CODEX_HOME/config.toml` | Managed `AGENTS.md` activation pointer, skill, three read-only agents; `SessionStart` + `SubagentStart` |
495495
| Gemini CLI | Detected | `.gemini/settings.json` | `GEMINI.md`, three explicit read/graph-tool subagents; `BeforeTool`, `AfterTool` `read_file` coverage, and `SessionStart` |
496496
| Zed | Detected | platform `settings.json` (JSONC) | `AGENTS.md` + shared skill |
497497
| OpenCode | Detected | `$OPENCODE_CONFIG` or resolved global config | `AGENTS.md`, skill, three deny-by-default read-only agents; plugin adds grep/glob graph lookup, post-`read` coverage, first-tool-result session context, and post-compaction reinjection |
@@ -536,6 +536,11 @@ overwrite user-modified agents.
536536
| Oh My Pi (omp) | Detected | Effective agent directory (`OMP_PROFILE` / `PI_CODING_AGENT_DIR`; default `~/.omp/agent/mcp.json`) | Skill and three direct-MCP graph-tool subagents (Scout/Verify/Auditor); preserves user `AGENTS.md` |
537537
| Sourcegraph Cody | Explicit opt-in | Existing `$CBM_CODY_CONFIG_PATH` | MCP only |
538538

539+
For Codex, install keeps only a tiny managed activation pointer in global
540+
`$CODEX_HOME/AGENTS.md`; all detailed behavior lives in the installed `codebase-memory` skill.
541+
Fresh installs create the pointer, upgrades replace the legacy full managed block while preserving
542+
all user-owned bytes, and uninstall removes only the managed pointer.
543+
539544
### Sessions, compaction, and subagents
540545

541546
Hooks installed by this project are fail-open and context-only. Claude Code's

‎internal/cbm/extract_defs.c‎

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
#define MAX_PARAMS_MINUS_1 31
2424
#define MAX_RETURN_TYPES 16
2525
#define MAX_RETURN_TYPES_MINUS_1 15
26+
#define MAX_ATTR_WRAPPERS 16 // stacked C#/PHP attribute_list siblings per declaration (#1692)
27+
#define MAX_ATTR_WRAPPERS_MINUS_1 15
2628

2729
// Tree traversal limits.
2830
enum {
@@ -1323,7 +1325,7 @@ static const char *extract_docstring(CBMArena *a, TSNode node, const char *sourc
13231325
return NULL;
13241326
}
13251327

1326-
static TSNode find_jvm_modifiers(TSNode node, CBMLanguage lang);
1328+
static int find_jvm_modifiers(TSNode node, CBMLanguage lang, TSNode *out, int max);
13271329

13281330
/* HTTP method names recognized in decorator calls (e.g., @router.post → "POST") */
13291331
static const char *decorator_method_name(const char *attr_text) {
@@ -1713,12 +1715,9 @@ static void scan_route_annotations(CBMArena *a, TSNode owner, const char *source
17131715
*out_method = NULL;
17141716
*out_jax_path = NULL;
17151717

1716-
TSNode wrappers[2];
1717-
int wn = 0;
1718-
TSNode modifiers = find_jvm_modifiers(owner, spec->language);
1719-
if (!ts_node_is_null(modifiers)) {
1720-
wrappers[wn++] = modifiers;
1721-
}
1718+
/* MINUS_1: the owner node itself is appended below, after the wrappers. */
1719+
TSNode wrappers[MAX_ATTR_WRAPPERS];
1720+
int wn = find_jvm_modifiers(owner, spec->language, wrappers, MAX_ATTR_WRAPPERS_MINUS_1);
17221721
/* Direct-child annotations (some grammars attach the annotation as a child
17231722
* of the method node rather than under `modifiers`). */
17241723
wrappers[wn++] = owner;
@@ -1872,13 +1871,23 @@ static int count_modifier_annotations(TSNode modifiers, const CBMLangSpec *spec)
18721871
return count;
18731872
}
18741873

1875-
// Find the wrapper child that holds annotations/attributes for languages where
1876-
// they are nested under an intermediate node rather than being a prev-sibling:
1877-
// Java/Kotlin/C#/Swift → `modifiers` (contains annotation/attribute)
1878-
// PHP 8 → `attribute_list` (contains attribute_group)
1879-
// Returns a null node when the language has no such wrapper.
1880-
static TSNode find_jvm_modifiers(TSNode node, CBMLanguage lang) {
1881-
TSNode null_node = {0};
1874+
// Find every wrapper child that holds annotations/attributes for languages
1875+
// where they are nested under an intermediate node rather than being a
1876+
// prev-sibling:
1877+
// Java/Kotlin/Swift → `modifiers` (one node, contains every annotation)
1878+
// C#/PHP 8 → `attribute_list` (contains attribute/attribute_group)
1879+
//
1880+
// C#/PHP attribute stacks are NOT a single wrapper: each bracketed group
1881+
// (`[Foo]`, `[Bar]`, ...) compiles to its own `attribute_list` node, so
1882+
// `[A] [B] [C]` above a declaration produces three separate `attribute_list`
1883+
// siblings among that declaration's children — not one `attribute_list`
1884+
// holding three entries. A field-name lookup (`ts_node_child_by_field_name`)
1885+
// only ever returns the first child registered under a given field, so using
1886+
// it here silently dropped every attribute after the first bracket group
1887+
// (#1692). Scanning all children by kind fixes that for C#/PHP and is a
1888+
// no-op change for Java/Kotlin/Swift, where `modifiers` never repeats.
1889+
// Writes up to `max` wrapper nodes into `out`; returns how many were found.
1890+
static int find_jvm_modifiers(TSNode node, CBMLanguage lang, TSNode *out, int max) {
18821891
const char *wrapper = NULL;
18831892
switch (lang) {
18841893
case CBM_LANG_JAVA:
@@ -1888,19 +1897,12 @@ static TSNode find_jvm_modifiers(TSNode node, CBMLanguage lang) {
18881897
break;
18891898
case CBM_LANG_CSHARP:
18901899
case CBM_LANG_PHP:
1891-
/* C# attributes live in an `attribute_list` child (modifiers like
1892-
* `public` are separate `modifier` nodes); PHP 8 likewise nests
1893-
* `attribute_group` under `attribute_list`. */
18941900
wrapper = "attribute_list";
18951901
break;
18961902
default:
1897-
return null_node;
1898-
}
1899-
TSNode w = ts_node_child_by_field_name(node, wrapper, (uint32_t)strlen(wrapper));
1900-
if (ts_node_is_null(w)) {
1901-
w = cbm_find_child_by_kind(node, wrapper);
1903+
return 0;
19021904
}
1903-
return w;
1905+
return cbm_find_children_by_kind(node, wrapper, out, max);
19041906
}
19051907

19061908
// Count direct children of `node` that are decorator/annotation nodes (used by
@@ -1978,13 +1980,14 @@ static const char **extract_decorators(CBMArena *a, TSNode node, const char *sou
19781980
prev = ts_node_prev_sibling(prev);
19791981
}
19801982

1981-
TSNode modifiers = {0};
1983+
TSNode wrappers[MAX_ATTR_WRAPPERS];
1984+
int wn = 0;
19821985
int mod_count = 0;
19831986
int child_count = 0;
19841987
if (count == 0) {
1985-
modifiers = find_jvm_modifiers(node, lang);
1986-
if (!ts_node_is_null(modifiers)) {
1987-
mod_count = count_modifier_annotations(modifiers, spec);
1988+
wn = find_jvm_modifiers(node, lang, wrappers, MAX_ATTR_WRAPPERS);
1989+
for (int w = 0; w < wn; w++) {
1990+
mod_count += count_modifier_annotations(wrappers[w], spec);
19881991
}
19891992
/* Languages like Scala attach the annotation directly as a child of the
19901993
* definition node (no wrapper, no prev-sibling). */
@@ -2014,8 +2017,8 @@ static const char **extract_decorators(CBMArena *a, TSNode node, const char *sou
20142017
}
20152018
prev = ts_node_prev_sibling(prev);
20162019
}
2017-
if (!ts_node_is_null(modifiers)) {
2018-
idx = collect_modifier_decorators(a, modifiers, source, spec, result, idx, total);
2020+
for (int w = 0; w < wn && mod_count > 0; w++) {
2021+
idx = collect_modifier_decorators(a, wrappers[w], source, spec, result, idx, total);
20192022
}
20202023
if (child_count > 0) {
20212024
idx = collect_child_decorators(a, node, source, spec, result, idx, total);

‎internal/cbm/helpers.c‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,18 @@ TSNode cbm_find_child_by_kind(TSNode parent, const char *kind) {
466466
return null_node;
467467
}
468468

469+
int cbm_find_children_by_kind(TSNode parent, const char *kind, TSNode *out, int max) {
470+
int n = 0;
471+
uint32_t count = ts_node_child_count(parent);
472+
for (uint32_t i = 0; i < count && n < max; i++) {
473+
TSNode child = ts_node_child(parent, i);
474+
if (strcmp(ts_node_type(child), kind) == 0) {
475+
out[n++] = child;
476+
}
477+
}
478+
return n;
479+
}
480+
469481
/* ── Node-type classification: TSSymbol bitset acceleration ───────────────
470482
* cbm_kind_in_set is called for nearly every AST node (function/class/call/
471483
* import/branching sets), so a linear strcmp over the type-name array is a hot

‎internal/cbm/helpers.h‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,13 @@ char *cbm_cpp_out_of_line_parent_class(CBMArena *a, TSNode node, const char *sou
122122
// Find a child node by kind string.
123123
TSNode cbm_find_child_by_kind(TSNode parent, const char *kind);
124124

125+
// Find every child node matching `kind` (unlike cbm_find_child_by_kind,
126+
// which stops at the first match). Writes up to `max` nodes into `out`;
127+
// returns how many were found. Repeated sibling nodes of the same kind are
128+
// common in some grammars (e.g. C#/PHP stack each `[Attr]` as its own
129+
// attribute_list child) — see #1692.
130+
int cbm_find_children_by_kind(TSNode parent, const char *kind, TSNode *out, int max);
131+
125132
/* --- Lisp-family shared gates ---------------------------------------------
126133
* The defs, calls and unified extractors each walk the same generic `list`
127134
* node and must agree on what it means. The predicates below therefore live

‎scripts/smoke-test.sh‎

Lines changed: 137 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,12 @@ run_no_crash() {
144144

145145
TMPDIR=$(smoke_mktemp_dir)
146146
DRYRUN_HOME=""
147+
CODEX_LIFECYCLE_HOME=""
147148
# On MSYS2/Windows, convert POSIX path to native Windows path for the binary
148149
if command -v cygpath &>/dev/null; then
149150
TMPDIR=$(cygpath -m "$TMPDIR")
150151
fi
151-
trap 'smoke_rmtree "$TMPDIR" "${DRYRUN_HOME:-}"' EXIT
152+
trap 'smoke_rmtree "$TMPDIR" "${DRYRUN_HOME:-}" "${CODEX_LIFECYCLE_HOME:-}"' EXIT
152153

153154
CLI_STDERR=$(smoke_mktemp_file)
154155
# 10 of the cli call sites assign directly (VAR=$(cli ...)). Under
@@ -1432,6 +1433,7 @@ echo '# Personal Rovo guidance' > "$ROVO_INSTRUCTIONS"
14321433
PHASE8_INSTALL_RC=0
14331434
PHASE8_INSTALL_LOG=$(smoke_mktemp_file)
14341435
HOME="$FAKE_HOME" \
1436+
CODEX_HOME="$FAKE_HOME/.codex" \
14351437
XDG_CONFIG_HOME="$FAKE_HOME/.config" \
14361438
APPDATA="$FAKE_HOME/AppData/Roaming" \
14371439
LOCALAPPDATA="$FAKE_HOME/AppData/Local" \
@@ -1704,12 +1706,139 @@ if ! grep -q 'existing_section' "$FAKE_HOME/.codex/config.toml"; then
17041706
fi
17051707
echo "OK 8f-h: Codex TOML (MCP + preserved existing)"
17061708

1707-
# 8i: Codex instructions
1708-
if [ ! -f "$FAKE_HOME/.codex/AGENTS.md" ] || ! grep -q 'codebase-memory-mcp' "$FAKE_HOME/.codex/AGENTS.md"; then
1709-
echo "FAIL 8i: Codex AGENTS.md missing"
1710-
exit 1
1711-
fi
1712-
echo "OK 8i: Codex instructions"
1709+
# 8i: Codex keeps only a tiny global activation pointer; the installed skill
1710+
# owns all detailed behavior. Exercise the complete lifecycle in a second HOME
1711+
# so Codex-only reinstalls cannot perturb the all-agent fixture below.
1712+
CODEX_POINTER_EXPECTED=$(smoke_mktemp_file)
1713+
printf '%s\n' \
1714+
'<!-- codebase-memory-mcp:start -->' \
1715+
'For structural codebase exploration, use the installed `codebase-memory` skill.' \
1716+
'<!-- codebase-memory-mcp:end -->' > "$CODEX_POINTER_EXPECTED"
1717+
if [ ! -f "$FAKE_HOME/.codex/AGENTS.md" ] ||
1718+
[ "$(smoke_file_sha256 "$FAKE_HOME/.codex/AGENTS.md")" != \
1719+
"$(smoke_file_sha256 "$CODEX_POINTER_EXPECTED")" ]; then
1720+
echo "FAIL 8i: fresh Codex install did not create the exact activation pointer"
1721+
exit 1
1722+
fi
1723+
1724+
CODEX_LIFECYCLE_HOME=$(smoke_mktemp_dir)
1725+
CODEX_LIFECYCLE_ROOT="$CODEX_LIFECYCLE_HOME/.codex"
1726+
CODEX_INSTRUCTIONS="$CODEX_LIFECYCLE_ROOT/AGENTS.md"
1727+
mkdir -p "$CODEX_LIFECYCLE_ROOT"
1728+
1729+
CODEX_FRESH_LOG=$(smoke_mktemp_file)
1730+
HOME="$CODEX_LIFECYCLE_HOME" \
1731+
CODEX_HOME="$CODEX_LIFECYCLE_ROOT" \
1732+
XDG_CONFIG_HOME="$CODEX_LIFECYCLE_HOME/.config" \
1733+
APPDATA="$CODEX_LIFECYCLE_HOME/AppData/Roaming" \
1734+
LOCALAPPDATA="$CODEX_LIFECYCLE_HOME/AppData/Local" \
1735+
"$BINARY" install --skip-binary --clients=codex -y > "$CODEX_FRESH_LOG" 2>&1
1736+
if [ ! -f "$CODEX_INSTRUCTIONS" ] ||
1737+
[ "$(smoke_file_sha256 "$CODEX_INSTRUCTIONS")" != \
1738+
"$(smoke_file_sha256 "$CODEX_POINTER_EXPECTED")" ] ||
1739+
! grep -q '\[mcp_servers.codebase-memory-mcp\]' "$CODEX_LIFECYCLE_ROOT/config.toml" ||
1740+
! grep -q 'search_graph' "$CODEX_LIFECYCLE_ROOT/skills/codebase-memory/SKILL.md" ||
1741+
[ ! -s "$CODEX_LIFECYCLE_ROOT/agents/codebase-memory-scout.toml" ] ||
1742+
[ ! -s "$CODEX_LIFECYCLE_ROOT/agents/codebase-memory.toml" ] ||
1743+
[ ! -s "$CODEX_LIFECYCLE_ROOT/agents/codebase-memory-auditor.toml" ] ||
1744+
! grep -q 'SessionStart' "$CODEX_LIFECYCLE_ROOT/config.toml" ||
1745+
! grep -q 'SubagentStart' "$CODEX_LIFECYCLE_ROOT/config.toml"; then
1746+
echo "FAIL 8i: isolated fresh Codex install lost the pointer or another surface"
1747+
exit 1
1748+
fi
1749+
1750+
printf '%s\n' \
1751+
'# Personal Codex guidance' \
1752+
'<!-- codebase-memory-mcp:start -->' \
1753+
'legacy managed guidance' \
1754+
'<!-- codebase-memory-mcp:end -->' \
1755+
'# Keep this line' > "$CODEX_INSTRUCTIONS"
1756+
CODEX_EXPECTED_MIGRATED=$(smoke_mktemp_file)
1757+
printf '%s\n' \
1758+
'# Personal Codex guidance' \
1759+
'<!-- codebase-memory-mcp:start -->' \
1760+
'For structural codebase exploration, use the installed `codebase-memory` skill.' \
1761+
'<!-- codebase-memory-mcp:end -->' \
1762+
'# Keep this line' > "$CODEX_EXPECTED_MIGRATED"
1763+
CODEX_EXPECTED_USER=$(smoke_mktemp_file)
1764+
printf '%s\n' '# Personal Codex guidance' '# Keep this line' > "$CODEX_EXPECTED_USER"
1765+
CODEX_LEGACY_SHA=$(smoke_file_sha256 "$CODEX_INSTRUCTIONS")
1766+
1767+
CODEX_PLAN=$(smoke_mktemp_file)
1768+
HOME="$CODEX_LIFECYCLE_HOME" \
1769+
CODEX_HOME="$CODEX_LIFECYCLE_ROOT" \
1770+
XDG_CONFIG_HOME="$CODEX_LIFECYCLE_HOME/.config" \
1771+
APPDATA="$CODEX_LIFECYCLE_HOME/AppData/Roaming" \
1772+
LOCALAPPDATA="$CODEX_LIFECYCLE_HOME/AppData/Local" \
1773+
"$BINARY" install --plan --skip-binary --clients=codex > "$CODEX_PLAN"
1774+
CODEX_INSTRUCTION_PATH=$(json_get "$CODEX_PLAN" \
1775+
"next((str(x) for x in d.get('instruction_files_planned', []) if str(x).replace('\\\\','/').endswith('/.codex/AGENTS.md')), '')")
1776+
CODEX_CLEANUP_COUNT=$(json_get "$CODEX_PLAN" "len(d.get('cleanup_actions_planned', []))")
1777+
if ! exact_path_match "$CODEX_INSTRUCTION_PATH" "$CODEX_INSTRUCTIONS" ||
1778+
[ "$CODEX_CLEANUP_COUNT" != "0" ] ||
1779+
[ "$CODEX_LEGACY_SHA" != "$(smoke_file_sha256 "$CODEX_INSTRUCTIONS")" ]; then
1780+
echo "FAIL 8i: Codex plan did not describe a non-mutating pointer upsert"
1781+
exit 1
1782+
fi
1783+
1784+
CODEX_DRY_LOG=$(smoke_mktemp_file)
1785+
HOME="$CODEX_LIFECYCLE_HOME" \
1786+
CODEX_HOME="$CODEX_LIFECYCLE_ROOT" \
1787+
XDG_CONFIG_HOME="$CODEX_LIFECYCLE_HOME/.config" \
1788+
APPDATA="$CODEX_LIFECYCLE_HOME/AppData/Roaming" \
1789+
LOCALAPPDATA="$CODEX_LIFECYCLE_HOME/AppData/Local" \
1790+
"$BINARY" install --dry-run --skip-binary --clients=codex -y > "$CODEX_DRY_LOG" 2>&1
1791+
if ! grep -q 'managed activation pointer' "$CODEX_DRY_LOG" ||
1792+
[ "$CODEX_LEGACY_SHA" != "$(smoke_file_sha256 "$CODEX_INSTRUCTIONS")" ]; then
1793+
echo "FAIL 8i: Codex dry-run did not preview a byte-identical pointer migration"
1794+
exit 1
1795+
fi
1796+
1797+
CODEX_MIGRATE_LOG=$(smoke_mktemp_file)
1798+
HOME="$CODEX_LIFECYCLE_HOME" \
1799+
CODEX_HOME="$CODEX_LIFECYCLE_ROOT" \
1800+
XDG_CONFIG_HOME="$CODEX_LIFECYCLE_HOME/.config" \
1801+
APPDATA="$CODEX_LIFECYCLE_HOME/AppData/Roaming" \
1802+
LOCALAPPDATA="$CODEX_LIFECYCLE_HOME/AppData/Local" \
1803+
"$BINARY" install --skip-binary --clients=codex -y > "$CODEX_MIGRATE_LOG" 2>&1
1804+
if [ ! -f "$CODEX_INSTRUCTIONS" ] ||
1805+
[ "$(smoke_file_sha256 "$CODEX_INSTRUCTIONS")" != \
1806+
"$(smoke_file_sha256 "$CODEX_EXPECTED_MIGRATED")" ]; then
1807+
echo "FAIL 8i: Codex migration did not replace only the legacy managed block"
1808+
exit 1
1809+
fi
1810+
1811+
HOME="$CODEX_LIFECYCLE_HOME" \
1812+
CODEX_HOME="$CODEX_LIFECYCLE_ROOT" \
1813+
XDG_CONFIG_HOME="$CODEX_LIFECYCLE_HOME/.config" \
1814+
APPDATA="$CODEX_LIFECYCLE_HOME/AppData/Roaming" \
1815+
LOCALAPPDATA="$CODEX_LIFECYCLE_HOME/AppData/Local" \
1816+
"$BINARY" install --skip-binary --clients=codex -y > /dev/null 2>&1
1817+
if [ ! -f "$CODEX_INSTRUCTIONS" ] ||
1818+
[ "$(smoke_file_sha256 "$CODEX_INSTRUCTIONS")" != \
1819+
"$(smoke_file_sha256 "$CODEX_EXPECTED_MIGRATED")" ] ||
1820+
[ "$(grep -c '<!-- codebase-memory-mcp:start -->' "$CODEX_INSTRUCTIONS")" -ne 1 ]; then
1821+
echo "FAIL 8i: Codex reinstall changed or duplicated the activation pointer"
1822+
exit 1
1823+
fi
1824+
CODEX_UNINSTALL_LOG=$(smoke_mktemp_file)
1825+
if ! HOME="$CODEX_LIFECYCLE_HOME" \
1826+
CODEX_HOME="$CODEX_LIFECYCLE_ROOT" \
1827+
XDG_CONFIG_HOME="$CODEX_LIFECYCLE_HOME/.config" \
1828+
APPDATA="$CODEX_LIFECYCLE_HOME/AppData/Roaming" \
1829+
LOCALAPPDATA="$CODEX_LIFECYCLE_HOME/AppData/Local" \
1830+
"$BINARY" uninstall -y -n > "$CODEX_UNINSTALL_LOG" 2>&1; then
1831+
echo "FAIL 8i: Codex uninstall returned nonzero"
1832+
cat "$CODEX_UNINSTALL_LOG"
1833+
exit 1
1834+
fi
1835+
if [ ! -f "$CODEX_INSTRUCTIONS" ] ||
1836+
[ "$(smoke_file_sha256 "$CODEX_INSTRUCTIONS")" != \
1837+
"$(smoke_file_sha256 "$CODEX_EXPECTED_USER")" ]; then
1838+
echo "FAIL 8i: Codex uninstall did not remove only the activation pointer"
1839+
exit 1
1840+
fi
1841+
echo "OK 8i: isolated Codex activation-pointer lifecycle"
17131842

17141843
# 8j-l: Gemini MCP + hooks + merge
17151844
CMD=$(json_get "$FAKE_HOME/.gemini/settings.json" "d['mcpServers']['codebase-memory-mcp']['command']")
@@ -2728,6 +2857,7 @@ if [[ "$BINARY" == *.exe ]]; then
27282857
UNINSTALL_BINARY="$SELF_PATH"
27292858
fi
27302859
HOME="$FAKE_HOME" \
2860+
CODEX_HOME="$FAKE_HOME/.codex" \
27312861
XDG_CONFIG_HOME="$FAKE_HOME/.config" \
27322862
APPDATA="$FAKE_HOME/AppData/Roaming" \
27332863
LOCALAPPDATA="$FAKE_HOME/AppData/Local" \

0 commit comments

Comments
 (0)