← Back to Pull requests

docs: align gateway shell executor claims with client-executed shell #401

Closed
unknown closed this pull request without merging on Oct 01, 2026 03:41 UTC
View on GitHub
unknown unknown commented on Sep 30, 2026 10:01 UTC
Author

Summary

Aligns ARCHITECTURE.md with the implemented, client-executed shell tool (#353).

  • ARCHITECTURE.md described shell-executor interfaces that do not exist: an application-provided ShellExecutor slot, a GatewayExecutorRegistration::Shell execution grant, an opt-in gateway-executed shell history projection, and a ShellHandler::model_input entry point. Shell is client-executed only: ShellHandler deliberately does not implement GatewayExecutor (PR #264 removed the optional executor to keep execution on the client), and RFC #352 tracks the proposed gateway-executed shell backend as future work.

  • Rewrites the two shell passages (the translate/ section and the tool/ registry section) to describe the implemented flow: declarations normalize to canonical function tools, calls restore to shell_call and command SSE events, the client executes each call and submits shell_call_output with the same call_id, and shell history stays public in storage, lowering into function history through the standard output-to-input conversion plus typed input conversions.

  • Refreshes the GatewayExecutors slot list: MCP servers are the only lazily connected slot (configured clients and discovered handlers are cached by server_label across requests; request-declared servers connect afresh per request, their discovered handlers reused only within that request), alongside the shared WebSearchHandler and the opt-in Eryx-backed CodeInterpreterExecutor added in #368 (disabled by default). Adds shell to the client-owned tool list.
  • Fixes #353

    Test Plan

  • Documentation-only change; no code paths affected.

  • Verified every claim against the implementation: GatewayExecutorRegistration variants (tool/executors.rs), ShellHandler not implementing GatewayExecutor (tool/shell.rs), MCP client caching by server_label with fresh request-declared connections (tool/executors.rs), and shell history lowering (types/io/input.rs, docs/design/shell-tool.md).

  • rg 'ShellExecutor|GatewayExecutorRegistration::Shell|ShellHandler::model_input|opt-in gateway executor' ARCHITECTURE.md returns no matches.

  • git diff --check is clean and the diff touches only ARCHITECTURE.md.

  • Locally, pre-commit run --files ARCHITECTURE.md passes all hooks.
  • Diff: 286 lines (+214 / -72) across 3 files Reviewer: franciscojavierarceo Review duration: 1060m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 286 lines diff across 3 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.339
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #401"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 39.8% (MEDIUM) · Higher = larger blast radius
    39.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.7% · Safe to merge
    15.7%