[codex] Fail closed pair slash command routing#98262
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 5, 2026, 9:39 PM ET / 01:39 UTC. Summary PR surface: Source +15, Tests +53. Total +68 across 5 files. Reproducibility: yes. at source level: current main parses Review metrics: none identified. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land this narrow command-boundary fix after exact-head QA finishes, keeping spaced slash routing tied to active registered plugin commands. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main parses Is this the best way to solve the issue? Yes: fixing the registered plugin command matcher and authorization trigger is the narrow owner boundary shared by Control UI and text transports. A UI rewrite or broad manifest-level fail-closed policy would be wider and less maintainable. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4f8eeeaca9a9. Label changesLabel justifications:
Evidence reviewedPR surface: Source +15, Tests +53. Total +68 across 5 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
47269cc to
39f03a0
Compare
|
Merged via squash.
|
* fix: keep pair qr from widening gateway bind * fix: honor plugin activation for slash reservations * fix: authorize spaced slash commands * fix: keep reserved commands out of manifest reservations * fix: avoid manifest fail-closed for declined commands * fix: gate manifest command fallback by auth * fix: keep runtime command probe internal * fix: scope spaced slash authorization * fix: route spaced plugin slash commands * docs: note spaced plugin command routing * docs: note spaced plugin command routing * docs: split command routing changelog follow-up --------- Co-authored-by: brokemac79 <255583030+brokemac79@users.noreply.github.com> Co-authored-by: Peter Steinberger <58493+steipete@users.noreply.github.com> Co-authored-by: Peter Steinberger <steipete@gmail.com>
* fix: keep pair qr from widening gateway bind * fix: honor plugin activation for slash reservations * fix: authorize spaced slash commands * fix: keep reserved commands out of manifest reservations * fix: avoid manifest fail-closed for declined commands * fix: gate manifest command fallback by auth * fix: keep runtime command probe internal * fix: scope spaced slash authorization * fix: route spaced plugin slash commands * docs: note spaced plugin command routing * docs: note spaced plugin command routing * docs: split command routing changelog follow-up --------- Co-authored-by: brokemac79 <255583030+brokemac79@users.noreply.github.com> Co-authored-by: Peter Steinberger <58493+steipete@users.noreply.github.com> Co-authored-by: Peter Steinberger <steipete@gmail.com>
* fix: keep pair qr from widening gateway bind * fix: honor plugin activation for slash reservations * fix: authorize spaced slash commands * fix: keep reserved commands out of manifest reservations * fix: avoid manifest fail-closed for declined commands * fix: gate manifest command fallback by auth * fix: keep runtime command probe internal * fix: scope spaced slash authorization * fix: route spaced plugin slash commands * docs: note spaced plugin command routing * docs: note spaced plugin command routing * docs: split command routing changelog follow-up --------- Co-authored-by: brokemac79 <255583030+brokemac79@users.noreply.github.com> Co-authored-by: Peter Steinberger <58493+steipete@users.noreply.github.com> Co-authored-by: Peter Steinberger <steipete@gmail.com> (cherry picked from commit 49ae7ec)
What Problem This Solves
Fixes #98239.
The Control UI sends chat text literally through
chat.send. A spaced plugin slash command such as/ pair qrdid not match the active/pairregistration, so it could continue through the normal agent path. In the reported Tailscale Serve setup, that exposed an availability risk because an agent turn could try to repair configuration and movegateway.bindaway from the loopback backend used by Serve.Why This Change Was Made
This keeps the fix at the registered plugin-command boundary:
/, including/ pair qrThe earlier manifest-level unavailable-handler fallback was removed because it would have established a new fail-closed policy for every manifest-declared runtime slash alias. This PR does not make that product-policy change.
User Impact
When device-pair is active,
/ pair qris handled by the same authorized, LLM-free device-pair path as/pair qr; it cannot fall through into an agent turn. If device-pair is inactive or denied, the text keeps the existing inactive-plugin behavior rather than claiming a new command reservation.Evidence
Exact candidate:
bcfa481fbefb8895421d280cb977f71848d8d808.tbx_01kwe8v2agj1mes7fjajb7b9be: focused command/plugin suite passed, 4 files / 139 tests./ pair qrunchanged aschat.sendinput./ pair qr, observed the device-pair QR response, and read backgateway.bind=loopback. Gateway logs showeddevice-pair: /pair invoked ... action=qrand no agent run.pnpm check:changedpassed, including core/core-test typechecks, changed-file lint, import-cycle check, pairing guards, storage guards, and changed-surface policy checks.pnpm check:import-cyclesreported 0 runtime value cycles.oxfmt --checkpassed for all five changed files.434a7f18exercised Tailscale Serve with a loopback backend and observedgateway.bind=loopback, HTTPS root200, and HTTPS health200after both/pair qrand/ pair qr; production state was restored afterward.No
CHANGELOG.mdchange.