You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 66b25d4
Browse filesBrowse the repository at this point in the historyBrowse files
docs(devlog): close audit blockers on routed tool-discovery landing pass
An independent audit of 094_landing_verification_pass.md returned FAIL over four
rounds. This closes every blocker it raised.
Scope of the central claim (correction 2). "Under code_mode_only MCP tools stay
callable in both modes" was unconditional and unsupported. It now reads "an
eligible MCP tool", with a table of the three flag-independent removal paths that
an override cannot repair: direct_only_tool_namespaces -> DirectModelOnly
(spec_plan.rs:210), excluded_tool_namespaces (spec_plan.rs:444), and MCP/App
policy filtering applied before exposure classification (mcp_tool_exposure.rs:20).
The flag also drives tool_search construction and the deferred-guidance text, so
exec.description is not the only delta.
Code Mode vs CodeModeOnly. The isolate is built for both
(`!matches!(tool_mode, CodeMode | CodeModeOnly)`, spec_plan.rs:459); only
ToolMode::Direct has none. 000, 004, 010, 020 and 094 are aligned on this, and
020's differential expectation no longer claims the delta is confined to
exec.description.
Cursor fence (unresolved #1596 P2). 012 no longer reproduces the slug check. Both
construction paths now specify one shared isCursorRoute(entry, providerId) helper
that prefers provider identity and falls back to the slug prefix only when no
CatalogModel is available. The third parameter becomes an options object
{ toolDiscoveryMode, providerId } so the existing public callers
(src/codex/catalog.ts re-export, tests/parallel-tool-calls-optin.test.ts) keep
their positional arguments. 003 updated to match.
Draft applicator. patches/apply-draft.mjs writes that same asymmetry while
printing "draft seams: OK", because --check asserts seam presence and not policy.
Every instruction to run it is withdrawn: the patches README is now marked
ARCHIVAL, the Korean summary's application block is removed, and the script's own
docblock opens with ARCHIVAL - KNOWN-DEFECTIVE - DO NOT EXECUTE. The body is kept
as the seam map it is.
Config contract. 011 now requires a load-path warning on degradation and
descriptor-before-read rejection of accessor/prototype-polluted model maps, both
as first-PR work with tests in 020.
Upstream paths. 004 corrected to codex-rs/code-mode/, with spec_plan_tests.rs
acknowledged as existing.
Verification: independent reviewer VERDICT PASS after four repair rounds;
bun test tests/repo-hygiene.test.ts (11 pass / 0 fail); bun run privacy:scan
passed; node --check patches/apply-draft.mjs passed; SHA256SUMS regenerated and
fully verified.
Copy file name to clipboardExpand all lines: devlog/_plan/260813_routed_tool_discovery_profiles/094_landing_verification_pass.md
+64-10Lines changed: 64 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,10 +74,16 @@ consequences the plan must absorb:
74
74
- The diagnostic in `014` must not claim the resolved catalog mode is the
75
75
effective runtime mode. It can only report what OpenCodex advertises.
76
76
77
-
## Correction 2 — under `code_mode_only`, MCP tools stay reachable in BOTH modes
77
+
## Correction 2 — under `code_mode_only`, an *eligible*MCP tool stays reachable in BOTH modes
78
78
79
79
This is the most important correction, and it strengthens the plan's default.
80
80
81
+
**Scope, stated first.** This correction holds for an **ordinary eligible MCP
82
+
tool** — one that already survived MCP/App visibility and policy filtering, is not
83
+
in `direct_only_tool_namespaces`, and is not in `excluded_tool_namespaces`. It is
84
+
not an unconditional statement about every tool on every surface. The exclusions
85
+
are enumerated below and each is independent of `supports_search_tool`.
86
+
81
87
`004` implies deferred discovery is what keeps tools reachable. In fact, under
82
88
`ToolMode::CodeModeOnly` the nested tool specs are handed to the `exec` handler
83
89
and installed as V8 globals in either mode:
@@ -100,15 +106,63 @@ let exposure = if search_tool_enabled { ToolExposure::Deferred } else { ToolExpo
100
106
101
107
With `supports_search_tool = false`, the tools' **full declarations** move into
102
108
`exec.description` because they enter `enabled_tools` rather than `deferred_tools`.
103
-
That is precisely the 96,699 → 258,929 character regression #1596 measured. So the
104
-
`direct` escape hatch buys **no additional callability under code mode** — it buys
105
-
schema text inside `exec.description`.
106
-
107
-
This reframes the override honestly: it is a *model-comprehension* lever (the model
108
-
sees full schemas inline instead of having to consult `ALL_TOOLS`), not a
109
-
*reachability* lever. `010`'s non-goal list already says "no claim that `direct` is
110
-
cheaper or preferred"; it must also say direct is not a reachability fix under code
111
-
mode. `044`'s weak-model fallback rationale is the honest use case.
109
+
That is precisely the 96,699 → 258,929 character regression #1596 measured. So for
110
+
an eligible tool the `direct` escape hatch buys **no additional callability under
111
+
code mode** — it buys schema text inside `exec.description`.
112
+
113
+
Confirmed by the upstream suite from both directions: a direct-exposure MCP tool
114
+
reaches the globals (`core/tests/suite/code_mode.rs:3248`), and a deferred one does
115
+
too (`core/tests/suite/code_mode.rs:644`).
116
+
117
+
### What else the flag changes, and what it never controls
118
+
119
+
Schema placement is the main difference but not the only one. Deferred exposure
120
+
also drives `tool_search` construction and the deferred-tool guidance text
121
+
(`spec_plan.rs:932`, `description.rs:10`).
122
+
123
+
And three mechanisms remove a tool from the Code Mode globals **independently of
124
+
this flag** — an override cannot fix any of them, and a reporter hitting one will
125
+
look like a discovery failure:
126
+
127
+
| Mechanism | Effect | Citation |
128
+
|---|---|---|
129
+
|`direct_only_tool_namespaces`| exposure becomes `DirectModelOnly`; the namespace stays top-level and is **excluded from Code Mode**|`spec_plan.rs:210`|
| MCP/App visibility and policy filtering | applied *before* exposure classification, so a filtered tool never reaches either path |`mcp_tool_exposure.rs:20`|
132
+
133
+
The isolate is not exclusive to `code_mode_only`. `build_code_mode_executors()`
0 commit comments