Skip to content

gut: delete 8 zero-caller EXCLUDE-STUB files in src/gateway/#2375

Merged
alexey-pelykh merged 2 commits intomainfrom
gut/delete-gateway-stubs-2369
Apr 16, 2026
Merged

gut: delete 8 zero-caller EXCLUDE-STUB files in src/gateway/#2375
alexey-pelykh merged 2 commits intomainfrom
gut/delete-gateway-stubs-2369

Conversation

@alexey-pelykh
Copy link
Copy Markdown

Summary

  • Delete 8 EXCLUDE-STUB stubs in src/gateway/ and eliminate all their callers
  • connection-auth.ts — callers in runner.ts, acp/server.ts simplified to use explicit opts
  • exec-approval-manager.ts + exec-approval.ts — creation, context fields, handler spread, and test block removed
  • doctor.ts + exec-approvals.ts — handler spreads removed from server-methods.ts
  • server-model-catalog.ts — context field, re-export, and all callers removed
  • server/http-auth.ts — canvas auth inlined (always-skip/reject), plugin auth inlined (always-pass)
  • startup-control-ui-origins.ts — startup call removed from server.impl.ts
  • Disposition entries updated: EXCLUDE-STUB → EXCLUDE-GUT

Closes #2369

Test plan

  • pnpm check passes (format + typecheck + lint)
  • pnpm test — no new failures (pre-existing: gateway chat transcript writes guardrail, discord exec-approvals stubs)
  • All 8 stub files deleted
  • All callers eliminated (no dangling imports)

🤖 Generated with Claude Code

alexey-pelykh and others added 2 commits April 16, 2026 14:54
Delete 8 EXCLUDE-STUB stubs and eliminate all their callers:

- connection-auth.ts — callers in runner.ts, acp/server.ts simplified
- exec-approval-manager.ts — callers in server.impl.ts, types.ts, tests removed
- server-methods/doctor.ts — handler spread removed from server-methods.ts
- server-methods/exec-approval.ts — handler factory + test block removed
- server-methods/exec-approvals.ts — handler spread removed
- server-model-catalog.ts — context field + re-export + callers removed
- server/http-auth.ts — canvas auth inlined (always-skip/reject), plugin auth inlined (always-pass)
- startup-control-ui-origins.ts — startup call removed from server.impl.ts

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Delete 8 EXCLUDE-STUB stubs and eliminate all their callers:

- connection-auth.ts — callers in runner.ts, acp/server.ts simplified
- exec-approval-manager.ts — callers in server.impl.ts, types.ts, tests removed
- server-methods/doctor.ts — handler spread removed from server-methods.ts
- server-methods/exec-approval.ts — handler factory + test block removed
- server-methods/exec-approvals.ts — handler spread removed
- server-model-catalog.ts — context field + re-export + callers removed
- server/http-auth.ts — canvas auth inlined (always-skip/reject), plugin auth inlined (always-pass)
- startup-control-ui-origins.ts — startup call removed from server.impl.ts

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@alexey-pelykh alexey-pelykh enabled auto-merge (squash) April 16, 2026 13:01
@alexey-pelykh alexey-pelykh merged commit 4e84640 into main Apr 16, 2026
12 checks passed
@alexey-pelykh alexey-pelykh deleted the gut/delete-gateway-stubs-2369 branch April 16, 2026 13:09
alexey-pelykh added a commit that referenced this pull request Apr 27, 2026
…2606)

The gateway handlers for `exec.approval.{request,waitDecision,resolve}`
were deleted by PR #2375 (commit 4e84640, 2026-04-16) — themselves
zero-caller stubs at that point, after the original implementation was
gutted by PR #70/#71 (commit 45d6734, 2026-02-27). The protocol-level
declarations (method-scopes, server-methods-list, schemas, validators,
broadcast scope guards) and live RPC callers (TS agents node-tool, CLI
nodes-cli register.invoke, web UI app.ts, macOS GatewayConnection +
ExecApprovalsGatewayPrompter) survived. Net result: an unreachable RPC
surface where every live caller would receive `INVALID_REQUEST: unknown
method: exec.approval.*` from the gateway today.

The audit (`docs/refactor/exec-approval-singular-audit-2606.md`) walks
each of #2606's four acceptance criteria with file:line evidence,
documents the subsystem split (singular `exec.approval.*` request/decision
flow vs plural `exec.approvals.*` policy/storage — the latter is in
active use and out of scope), confirms zero broadcast producers exist for
`exec.approval.{requested,resolved}` events, and verifies that no shared
correlation shape would be worth extracting before deletion.

Documentation finding: `docs/concepts/exec-approvals-architecture.md` was
written 2026-04-26 (10 days after the singular handlers were deleted by
PR #2375) and still asserts "End-to-end functional" for this path. The
audit doc is now the authoritative current-status reference.

This PR is audit-only — restore-vs-full-gut is a follow-up sized after
this lands, per the issue body. Recommendations live at the end of the
audit doc.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
alexey-pelykh added a commit that referenced this pull request Apr 27, 2026
…2606) (#2609)

The gateway handlers for `exec.approval.{request,waitDecision,resolve}`
were deleted by PR #2375 (commit 4e84640, 2026-04-16) — themselves
zero-caller stubs at that point, after the original implementation was
gutted by PR #70/#71 (commit 45d6734, 2026-02-27). The protocol-level
declarations (method-scopes, server-methods-list, schemas, validators,
broadcast scope guards) and live RPC callers (TS agents node-tool, CLI
nodes-cli register.invoke, web UI app.ts, macOS GatewayConnection +
ExecApprovalsGatewayPrompter) survived. Net result: an unreachable RPC
surface where every live caller would receive `INVALID_REQUEST: unknown
method: exec.approval.*` from the gateway today.

The audit (`docs/refactor/exec-approval-singular-audit-2606.md`) walks
each of #2606's four acceptance criteria with file:line evidence,
documents the subsystem split (singular `exec.approval.*` request/decision
flow vs plural `exec.approvals.*` policy/storage — the latter is in
active use and out of scope), confirms zero broadcast producers exist for
`exec.approval.{requested,resolved}` events, and verifies that no shared
correlation shape would be worth extracting before deletion.

Documentation finding: `docs/concepts/exec-approvals-architecture.md` was
written 2026-04-26 (10 days after the singular handlers were deleted by
PR #2375) and still asserts "End-to-end functional" for this path. The
audit doc is now the authoritative current-status reference.

This PR is audit-only — restore-vs-full-gut is a follow-up sized after
this lands, per the issue body. Recommendations live at the end of the
audit doc.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
alexey-pelykh added a commit that referenced this pull request Apr 27, 2026
#2618)

Two doc-only changes anticipating the broader cleanup tracked in #2618:

1. ICED banner on docs/concepts/exec-approvals-architecture.md — the
   architecture described is not currently implemented (gateway handlers
   for exec.approval.{request,waitDecision,resolve} were deleted by
   PR #2375; macOS-mediated path is broken; verified by the audit doc
   at docs/refactor/exec-approval-singular-audit-2606.md from PR #2609).
   Status changed: Accepted → Iced. Doc preserved for historical
   context only; will be replaced when the new approach ships.

2. middleware-architecture.md § The Middleware Boundary Principle table
   gains a row clarifying the boundary for tool-approval routing:
   - LEFT (RemoteClaw): AgentRuntime tool-approval routing (capture
     and surface to channels)
   - RIGHT (Agent): Tool-execution decisions and the actual invocation
     post-approval

   Plus a clarifying paragraph: routing is RemoteClaw's because the
   user is reachable only via RemoteClaw's channel adapters (the
   "requires RemoteClaw infrastructure?" test is satisfied); tool
   execution itself remains the agent CLI's responsibility.

The broader cleanup (gut 4 stranded callers + protocol declarations +
tests) is in #2618. The chat-mediated AgentRuntime tool-approval
routing implementation is in #2616 (referenced from the new
boundary-table paragraph).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
alexey-pelykh added a commit that referenced this pull request Apr 27, 2026
#2618) (#2619)

Two doc-only changes anticipating the broader cleanup tracked in #2618:

1. ICED banner on docs/concepts/exec-approvals-architecture.md — the
   architecture described is not currently implemented (gateway handlers
   for exec.approval.{request,waitDecision,resolve} were deleted by
   PR #2375; macOS-mediated path is broken; verified by the audit doc
   at docs/refactor/exec-approval-singular-audit-2606.md from PR #2609).
   Status changed: Accepted → Iced. Doc preserved for historical
   context only; will be replaced when the new approach ships.

2. middleware-architecture.md § The Middleware Boundary Principle table
   gains a row clarifying the boundary for tool-approval routing:
   - LEFT (RemoteClaw): AgentRuntime tool-approval routing (capture
     and surface to channels)
   - RIGHT (Agent): Tool-execution decisions and the actual invocation
     post-approval

   Plus a clarifying paragraph: routing is RemoteClaw's because the
   user is reachable only via RemoteClaw's channel adapters (the
   "requires RemoteClaw infrastructure?" test is satisfied); tool
   execution itself remains the agent CLI's responsibility.

The broader cleanup (gut 4 stranded callers + protocol declarations +
tests) is in #2618. The chat-mediated AgentRuntime tool-approval
routing implementation is in #2616 (referenced from the new
boundary-table paragraph).

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gut: eliminate callers and delete ~8 EXCLUDE-STUB files in src/gateway/

1 participant