Skip to content

refactor(gateway): remove dead RPC surfaces - #121387

Merged
steipete merged 1 commit into
mainfrom
steipete/dead-gateway-rpc-cleanup-fbd88e
Aug 10, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/dead-gateway-rpc-cleanup-fbd88e

Conversation

@steipete

@steipete steipete commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The Gateway still advertised, validated, documented, and generated client bindings for RPC methods that had no production callers or were exercised only by tests. That stale surface made the canonical server and protocol contract larger than the product behavior it actually served.

Why This Change Was Made

This removes the confirmed dead/test-only RPCs end to end: doctor.memory.remHarness, gateway.restart.preflight, sessions.unsubscribe, terminal.text, talk.session.join, talk.session.startTurn, talk.session.endTurn, talk.session.cancelTurn, sessions.compaction.get, and voicewake.routing.set. Their handlers, method descriptors/scopes, schemas, validators, generated Swift/Kotlin bindings, docs, tests, and connected orphan internals are removed so the Gateway has one canonical server/protocol surface.

The generated Plugin SDK API fingerprint refresh is intentional. There is no protocol version bump and no SQLite schema-version change. This follows the existing convention and the historical precedent in ce5ab8adb8f for removing dead RPC surface without a protocol version bump.

AI-assisted: yes. The complete diff and owner boundaries were reviewed before publication.

User Impact

There is no change to live production flows: the removed methods had no production callers or only test callers. They disappear from advertised methods, protocol validation/export surfaces, generated native clients, and documentation.

skills.upload.begin, skills.upload.chunk, and skills.upload.commit are deliberately retained. skills.install({ source: "upload" }) still calls installUploadedSkillArchive, and PR #74430 shipped that contract.

skills.proposals.create, skills.proposals.update, skills.proposals.revise, skills.proposals.quarantine, and skills.proposals.events.list are also deliberately retained unchanged. Any deletion of those proposal mutation/event methods needs separate maintainer/product confirmation.

Repair Doctrine measurement: non-test/production-like files are +115/-1431 (net -1316); tests are +106/-1144 (net -1038). The overall change is +221/-2575 (net -2354), a strongly net-negative cleanup that removes duplicate/dead contract and implementation surface rather than adding another compatibility path.

Evidence

  • Focused Gateway/protocol suites: 427 passed.
  • Talk cleanup suites: 84 passed.
  • Dead-export owner cleanup suites: 290 passed.
  • Protocol generators, registry, and since checks passed; regenerated protocol output was byte-identical after verification.
  • Plugin SDK API fingerprint check passed.
  • git diff --check and pnpm docs:list passed.
  • Three fresh Codex autoreviews completed cleanly; latest confidence was 0.99.
  • Unrelated red-main lint repair: the stale applySessionHints import in src/auto-reply/reply/get-reply-run.media-only.test.ts was confirmed unused; targeted format/lint, all 110 focused tests, git diff --check, and a fresh 0.99-confidence autoreview passed. Current main then gained the identical one-line repair, so the rebased PR correctly carries no duplicate test delta. CI evidence: https://github.com/openclaw/openclaw/actions/runs/31370467142/job/93398275506
  • Blacksmith Testbox changed gate passed with lease tbx_01kzmv13r0p26szc8kp3j93dhf, exit 0: https://github.com/openclaw/openclaw/actions/runs/31352376281
  • After rebasing onto current origin/main, git diff --check, the protocol registry check, and the regenerated Plugin SDK API baseline check passed on exact head f51ac77bb74f4772cfb6bda17dd1558d5bf438a8.

@clawsweeper

clawsweeper Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: android App: android app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling size: XL maintainer Maintainer-authored PR labels Aug 10, 2026
@steipete steipete self-assigned this Aug 10, 2026
@steipete
steipete marked this pull request as ready for review August 10, 2026 03:55
@steipete
steipete force-pushed the steipete/dead-gateway-rpc-cleanup-fbd88e branch 2 times, most recently from 309ede5 to 5b16cf0 Compare August 10, 2026 04:25
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 10, 2026
@clawsweeper

clawsweeper Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed August 10, 2026, 4:50 AM ET / 08:50 UTC.

ClawSweeper review

What this changes

The PR removes ten Gateway RPC methods and their handlers, schemas, generated Android/iOS bindings, documentation, and tests.

Merge readiness

⛔ Blocked by patch quality or review findings - 7 items remain

Keep open: removing the lifecycle RPCs leaves the still-supported managed-room Talk mode able to create a room but unable to join or run it.

Priority: P1
Reviewed head: a86cded3ef97e0fba18326a4947d3e319efb3df5
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The cleanup is broadly coherent, but the retained managed-room entry point makes the patch not quality-ready.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-owned protocol cleanup does not require external-contributor proof; the blocking concern is source-proven contract inconsistency.
Patch quality 🧂 unranked krab (1/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-owned protocol cleanup does not require external-contributor proof; the blocking concern is source-proven contract inconsistency.
Evidence reviewed 6 items Managed-room creation remains live at the PR head: The retained create handler accepts managed-room, creates a handoff, stores a managed-room session, and returns its token and room URL.
The remaining handlers cannot activate the room: At the PR head, appendAudio rejects managed-room sessions and steer requires an active managed-room client, but the PR removes the join operation that establishes one.
Public selection surface remains advertised: The PR head still lists managed-room in the Talk catalog and accepts it in the Talk configuration schema.
Findings 1 actionable finding [P1] Remove the orphaned managed-room creation path
Security None None.

How this fits together

The Gateway advertises Talk transports, validates session requests, and dispatches them to session handlers. Native and web clients use the catalog and protocol bindings to create and control those sessions.

flowchart LR
  Client[Gateway client] --> Catalog[Talk catalog and config]
  Catalog --> Create[Create managed-room session]
  Create --> Room[Room token and session record]
  Room --> Lifecycle[Join and turn lifecycle]
  Lifecycle --> Events[Talk events and agent control]
  Lifecycle --> Close[Session close]
Loading

Decision needed

Question Recommendation
Should managed-room Talk remain a supported Gateway transport, or be retired end-to-end with a migration for existing Talk configuration? Keep the managed-room lifecycle: Restore the join and turn lifecycle so the existing catalog, configuration, and successful create response continue to describe a usable room.

Why: The recorded decision approves deleting the RPCs, but the retained public transport, configuration value, and create path require a separate choice about the supported product contract.

Before merge

  • Remove the orphaned managed-room creation path (P1) - The patch deletes the only join and turn lifecycle RPCs, but this retained branch still creates and returns a managed-room token. appendAudio rejects that session type and steer requires the active client that only the deleted join path established, so a client can successfully create a room that it cannot use. Retire managed-room comprehensively or retain its lifecycle.
  • Resolve merge risk (P1) - Merging as-is makes the public managed-room option a successful create followed by an unusable session lifecycle.
  • Resolve merge risk (P1) - The owner-approved removal still intentionally breaks tagged-beta clients that invoke any removed RPC without a protocol-version change.
  • Complete next step (P2) - A protected maintainer-owned PR needs the product-contract choice resolved before a mechanical repair can be selected.
  • Improve patch quality - Resolve the managed-room contract as one complete supported or retired flow.
  • Improve patch quality - Add focused Gateway boundary coverage for the selected managed-room behavior.

Findings

  • [P1] Remove the orphaned managed-room creation path — src/gateway/server-methods/talk-session.ts:141-208
Agent review details

Security

None.

PR surface

Source -1072, Tests -1039, Docs -8, Generated 0, Other -236. Total -2355 across 54 files.

View PR surface stats
Area Files Added Removed Net
Source 26 15 1087 -1072
Tests 20 106 1145 -1039
Docs 5 21 29 -8
Config 0 0 0 0
Generated 1 79 79 0
Other 2 0 236 -236
Total 54 221 2576 -2355

Review metrics

Metric Value Why it matters
Production versus test LOC production +115/-1,431 (net -1,316); tests +106/-1,145 (net -1,039) The PR is substantially net-negative, but its retained managed-room creation path must match the deleted lifecycle surface.

Stored data model

Persistent data-model change detected: migration/backfill/repair: apps/android/app/src/main/java/ai/openclaw/app/gateway/GatewayProtocol.kt, migration/backfill/repair: src/gateway/methods/core-descriptors.ts, migration/backfill/repair: src/gateway/server-methods/doctor.test.ts, migration/backfill/repair: src/gateway/server-methods/doctor.ts, serialized state: packages/gateway-protocol/src/schema/sessions.ts, serialized state: src/gateway/server-methods/sessions-compaction-queries.ts, and 8 more. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Keep the lifecycle coherent (recommended)
    Restore the managed-room join and turn operations before merge so existing catalog and configuration selections remain usable.
  2. Retire the transport coherently
    If the intended direction is removal, delete managed-room as a full public contract and migrate existing configuration instead of leaving room creation operational.

Technical review

Best possible solution:

Choose one coherent managed-room contract: retain its full lifecycle, or retire its catalog, schema, config, creation, handoff state, docs, and existing settings through a Doctor migration in one change.

Do we have a high-confidence way to reproduce the issue?

Yes, source-reproducible with high confidence: create an stt-tts managed-room session, then attempt to join or start its turn on the PR head; the required lifecycle RPCs are removed while creation remains accepted.

Is this the best way to solve the issue?

No: the deletion is not the best complete solution while managed-room remains advertised, configurable, and creatable; its lifecycle must either remain intact or be retired coherently.

Full review comments:

  • [P1] Remove the orphaned managed-room creation path — src/gateway/server-methods/talk-session.ts:141-208
    The patch deletes the only join and turn lifecycle RPCs, but this retained branch still creates and returns a managed-room token. appendAudio rejects that session type and steer requires the active client that only the deleted join path established, so a client can successfully create a room that it cannot use. Retire managed-room comprehensively or retain its lifecycle.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 560d172ae7e3.

Labels

Label changes:

  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🌊 off-meta tidepool and patch quality is 🧂 unranked krab.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This maintainer-owned protocol cleanup does not require external-contributor proof; the blocking concern is source-proven contract inconsistency.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🧂 unranked krab, so this older rating label is no longer current.
  • remove status: 👀 ready for maintainer look: Current PR status label is status: ⏳ waiting on author.

Label justifications:

  • P1: The patch leaves a documented, configurable Gateway Talk transport unable to complete its advertised session flow.
  • merge-risk: 🚨 compatibility: The PR removes tagged Gateway RPCs and also changes the usability of the retained managed-room client contract.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🌊 off-meta tidepool and patch quality is 🧂 unranked krab.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This maintainer-owned protocol cleanup does not require external-contributor proof; the blocking concern is source-proven contract inconsistency.

Evidence

What I checked:

Likely related people:

  • steipete: Authored the cleanup and recorded the compatibility decision; recent current-main history also attributes Gateway descriptor work to Peter Steinberger. (role: protocol decision author and recent Gateway contributor; confidence: high; commits: d542674c66ad, eb9cac065fb5; files: src/gateway/server-methods/talk-session.ts, src/gateway/methods/core-descriptors.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (4 earlier review cycles)
  • reviewed 2026-08-10T04:49:36.146Z sha 5b16cf02a5648e45dc735bc0c7daf27e95f9d7bf :: found issues before merge. :: [P1] Keep the documented Talk cancellation RPC | [P1] Retain the supported voice-routing write path
  • reviewed 2026-08-10T05:51:30.175Z sha 4258de40a8c431446d0ae77494436082eb5570b1 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-10T06:53:38.273Z sha 64d89cc44f83648221e624bcffc5f1a4713001a9 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-10T07:58:31.724Z sha d7d6507 :: needs maintainer review before merge. :: none

@steipete
steipete force-pushed the steipete/dead-gateway-rpc-cleanup-fbd88e branch from 5b16cf0 to bde46c6 Compare August 10, 2026 04:55
@steipete

Copy link
Copy Markdown
Contributor Author

ClawSweeper rank-up move disposition:

  • Protocol-owner decision: approved as written. This PR is authored and assigned by @steipete, and the maintainer decision is to remove the ten confirmed dead/test-only RPC surfaces without a protocol version bump.
  • Talk cancellation finding: intentionally not restored. talk.session.cancelTurn had no production caller; the stale migration/docs path is removed here, and transcription clients use the retained close lifecycle while realtime output cancellation remains talk.session.cancelOutput.
  • Voice-routing write finding: intentionally not restored. voicewake.routing.set had no production caller; the handler, validation/persistence-only internals, generated bindings, and stale write documentation are removed together. The read path remains supported.
  • Compatibility/versioning finding: acknowledged. The methods are reachable from the v2026.7.2-beta.7 lineage, so this is an explicit owner-approved removal of tagged beta surface, not an unshipped-surface claim. The decision is still no version bump, consistent with the repository's prior dead-RPC removal shape in ce5ab8adb8f.
  • Catalog-order finding: accepted as part of the same owner decision. The catalog is string-based discovery; no numeric method-index wire contract is retained, and the historical removal above likewise deleted the descriptor entry rather than adding a tombstone or alias.
  • Upgrade proof request: no compatibility alias or deprecation path will be added. The complete server/protocol/generated-client/docs cleanup, focused suites, three clean autoreviews, and Blacksmith Testbox changed gate are recorded in the PR body; exact-head hosted CI is running on the current rebased head.

These are justified skips under the explicit maintainer/product decision for this cleanup; there are no unaddressed implementation findings to apply.

@steipete
steipete force-pushed the steipete/dead-gateway-rpc-cleanup-fbd88e branch 2 times, most recently from 44d44b5 to 4258de4 Compare August 10, 2026 05:45
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 10, 2026
@steipete
steipete force-pushed the steipete/dead-gateway-rpc-cleanup-fbd88e branch 3 times, most recently from cb62689 to d7d6507 Compare August 10, 2026 07:30
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 10, 2026
@steipete
steipete force-pushed the steipete/dead-gateway-rpc-cleanup-fbd88e branch from d7d6507 to d542674 Compare August 10, 2026 08:31
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 10, 2026
@steipete
steipete force-pushed the steipete/dead-gateway-rpc-cleanup-fbd88e branch from a86cded to f51ac77 Compare August 10, 2026 09:24
@steipete
steipete merged commit bab4546 into main Aug 10, 2026
133 checks passed
@steipete
steipete deleted the steipete/dead-gateway-rpc-cleanup-fbd88e branch August 10, 2026 09:42
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: android App: android app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant