Skip to content

Commit 9eb3a10

Browse files
authored
Merge pull request lidge-jun#1953 from lidge-jun/codex/wave5-nudge-namespace-guard
fix(adapters): restore the un-namespaced requirement on the shell-bridge check
2 parents 782b204 + 5764fd9 commit 9eb3a10

3 files changed

Lines changed: 76 additions & 4 deletions

File tree

‎devlog/_plan/260817_wave5_execution/090_wave6_closeout.md‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,38 @@ resolved: close-on-dev vs close-on-release; #1059 consecutive-green count;
4141
Cursor non-loopback HTTP; Antigravity undocumented protocol posture;
4242
needs-info lifetime; upstream-tracker accounting; #1795 recovery shape;
4343
#1899 disposition; #1836 disposition; #1903 HTTP/1.1 default.
44+
## Closure policy for THIS run (user decision, 2026-08-18)
45+
46+
> "이슈는 dev 머지되면 일단 닫아놔 이번 런만 그런거야"
47+
48+
Close issues when the fix reaches `dev`, not when it reaches a stable release. **Scoped to this
49+
run only** — the standing preference remains close-on-release, so a future campaign should not
50+
read this as precedent.
51+
52+
What this changes: the `released-in:vX.Y.Z` step no longer gates closure. What it does *not*
53+
change is the evidence bar — a close still needs the fix demonstrably on `origin/dev` by
54+
ancestry, and still must not close an umbrella from a partial fix. The three policy holds keep
55+
their own reasons, which are about missing evidence rather than about release timing:
56+
57+
| Issue | Still open because |
58+
|-------|--------------------|
59+
| #1059 | needs hosted Windows shard evidence; no local batch substitutes |
60+
| #1795 | needs a live SenseNova/Kimi canary showing zero undeclared calls |
61+
| #1852 | the reported defect (sync enumeration blocking the event loop) is #1876's unmerged async work |
62+
| #1849 | umbrella; its root cause is #1942 and unstarted |
63+
| #1049 | assessed and unstarted; needs the publication protocol |
64+
| #1926 | destination scope landed, but credential scope and emit-before-commit are still live in `src/bridge.ts` |
65+
| #1866 | explicitly scoped out of #1900; no PR addresses it |
66+
| #1730 | different provider and round from #1884's ClinePass replay fix |
67+
68+
Two **pull requests** are also held, and they belong in this record even though the table
69+
above is about issues — a reader working only from this document would otherwise see no trace
70+
of them:
71+
72+
| PR | Held because |
73+
|----|--------------|
74+
| #1891 | it makes `GOOGLE_ANTIGRAVITY_USER_AGENT` steerable into the `onboardUser` request body, violating this wave's accept criterion. Needs #1889 first, which is the one-line fix that makes `ide_version` a real constant. Detail in `080`. |
75+
| #1889 | unsponsored `src/oauth/` surface, plus still draft. The `maintainer-sponsored` label is the record that a security review happened, so an agent applying it would falsify that record. |
76+
77+
Neither is affected by the close-on-dev-merge decision: both are blocked *before* merge, so the
78+
policy that governs when a merged fix closes its issue never reaches them.

‎src/adapters/tool-catalog-nudge.ts‎

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,25 @@ const NEIGHBOR_AGENT_TOOL_NAMES = ["Read", "Grep", "Glob", "Bash", "LS"] as cons
2828
const CODEX_UNIFIED_EXEC_TOOL_NAME = "exec";
2929
const CODEX_SHELL_BRIDGE_TOOL_NAMES = ["exec_command", "shell_command"] as const;
3030

31-
function isCodexCodeModeExecTool(tool: Pick<OcxTool, "name" | "freeform">): boolean {
32-
return tool.name === CODEX_UNIFIED_EXEC_TOOL_NAME && tool.freeform === true;
31+
function isCodexCodeModeExecTool(tool: Pick<OcxTool, "namespace" | "name" | "freeform">): boolean {
32+
return !tool.namespace && tool.name === CODEX_UNIFIED_EXEC_TOOL_NAME && tool.freeform === true;
3333
}
3434

35-
function isBareShellBridgeTool(tool: Pick<OcxTool, "name">): boolean {
36-
return (CODEX_SHELL_BRIDGE_TOOL_NAMES as readonly string[]).includes(tool.name);
35+
/**
36+
* BARE means un-namespaced, and the word is load-bearing.
37+
*
38+
* An MCP server can advertise its own `exec_command` or `shell_command` — a docker, k8s or ssh
39+
* server plausibly does — and those arrive namespaced (`mcp__docker__exec_command`). They are
40+
* not Codex's shell bridge, so they must not cancel code mode: a genuine code-mode turn that
41+
* merely happens to sit beside an MCP shell tool would lose its guidance and fall back to the
42+
* generic sentence.
43+
*
44+
* The Cursor original this was ported from (`isBareCodexShellBridgeTool`) carries the same
45+
* `!tool.namespace` requirement; dropping it here made the name assert a check the body did not
46+
* perform.
47+
*/
48+
function isBareShellBridgeTool(tool: Pick<OcxTool, "namespace" | "name">): boolean {
49+
return !tool.namespace && (CODEX_SHELL_BRIDGE_TOOL_NAMES as readonly string[]).includes(tool.name);
3750
}
3851

3952
function quoteNames(names: readonly string[]): string {

‎tests/tool-catalog-nudge.test.ts‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,30 @@ describe("non-OpenAI tool catalog nudge", () => {
133133
expect(note).toContain("`custom_exec` is Codex code mode");
134134
});
135135

136+
// "Bare" means un-namespaced. An MCP server can advertise its own `exec_command` — docker,
137+
// k8s and ssh servers plausibly do — and that is not Codex's shell bridge. Letting it cancel
138+
// code mode silently strips the guidance from a genuine code-mode turn, which is how the
139+
// Cursor original (`isBareCodexShellBridgeTool`) has always read it.
140+
test("a namespaced MCP shell tool does not cancel code mode", () => {
141+
for (const name of ["exec_command", "shell_command"]) {
142+
const note = buildNonOpenAIToolCatalogNudgeForTools([
143+
codeModeExec(),
144+
{ namespace: "mcp__docker", name, parameters: {} } as OcxTool,
145+
]);
146+
147+
expect(note).toContain("is Codex code mode");
148+
}
149+
});
150+
151+
test("a namespaced freeform exec is not Codex's own code-mode tool", () => {
152+
const note = buildNonOpenAIToolCatalogNudgeForTools([
153+
{ namespace: "mcp__sandbox", name: "exec", freeform: true, parameters: {} } as OcxTool,
154+
]);
155+
156+
expect(note).not.toContain("is Codex code mode");
157+
expect(note).toContain("call the listed parent tool and use those helpers only inside that tool's input");
158+
});
159+
136160
// `advertised` holds WIRE names. A provider that rewrites them (Claude OAuth `custom_`,
137161
// Anthropic compat `cx_`) must not have every neighbor name declared unavailable while the
138162
// catalog plainly lists the prefixed form.

0 commit comments

Comments
 (0)