Skip to content

chore(cli): drop dead classifiers and single-use wrappers left by fallback removal#112191

Merged
steipete merged 1 commit into
mainfrom
claude/gateway-fallback-residue-cleanup
Jul 21, 2026
Merged

chore(cli): drop dead classifiers and single-use wrappers left by fallback removal#112191
steipete merged 1 commit into
mainfrom
claude/gateway-fallback-residue-cleanup

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

#112074 removed the automatic gateway→embedded fallback but left one-hop residue: a legacy string-match timeout classifier, duplicated validation in a private single-caller function, two single-use wrapper indirections, and a cross-os release-check guard for a stderr marker (EMBEDDED FALLBACK:) that no build can emit anymore.

Why This Change Was Made

Each deletion is evidence-backed, not speculative:

  • isGatewayAgentTimeoutError's string branch matched "gateway request timeout for agent", which in prod is thrown only by src/gateway/server-in-process-dispatch.ts (server/plugin internal callers) and the low-level gateway client. The CLI path always goes through callGateway, whose typed wrapper timer is armed at call setup — before the inner client timer can start (post connect+hello) — so this classifier only ever sees typed GatewayTransportErrors. A comment records the invariant.
  • agentViaGatewayCommand is private with one caller (agentCliCommand), which already runs protectJsonStdout and blank-message validation via resolveAgentMessageOpts; the repeats were dead.
  • getGatewayDispatchConfig collapsed to a bare wrapper over the synchronous readGatewayDispatchConfig after its skipShellEnvFallback option lost its only user; deleted, with the credential retry calling readGatewayDispatchConfigWithShellEnvFallback() directly.
  • agentTurnUsedEmbeddedFallback in the cross-os release checks guarded the validated artifact against a marker string removed in refactor(cli)!: remove automatic gateway→embedded fallback from openclaw agent #112074; the guard, its two throw sites, its retry-matcher phrase, and its tests are dead negative proof.

User Impact

None at runtime — pure internal cleanup. Net +13 / −88. Release validation loses only a guaranteed-pass check.

Evidence

  • Blacksmith Testbox tbx_01ky1qjty6e7rfsd08yhjtqz79: pnpm test src/commands/agent-via-gateway.test.ts (71/71), test/scripts/openclaw-cross-os-release-checks.test.ts (108/108), pnpm check:changed exit 0.
  • AutoReview (Codex gpt-5.6-sol, xhigh): clean, "patch is correct (0.95)".
  • Repo-wide grep: no references remain to isGatewayAgentTimeoutError, agentTurnUsedEmbeddedFallback, loadEmbeddedAgentCommand, or the removed marker phrase.

…lback removal

Follow-up to c5254f1 (#112074): delete the legacy string-match timeout
classifier (the CLI path only sees typed GatewayTransportError from
callGateway's wrapper timer), the duplicate JSON/blank-message validation
in the private gateway command, the now-pointless getGatewayDispatchConfig
wrapper, the single-use embedded-loader alias, and the cross-os release
guard for the EMBEDDED FALLBACK marker no build can emit anymore.
@steipete
steipete marked this pull request as ready for review July 21, 2026 07:13
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts commands Command implementations size: S maintainer Maintainer-authored PR labels Jul 21, 2026
@clawsweeper

clawsweeper Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: chore(cli): drop dead classifiers and single-use wrappers left by fallback removal This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@steipete
steipete merged commit e1ff65f into main Jul 21, 2026
191 of 203 checks passed
@steipete
steipete deleted the claude/gateway-fallback-residue-cleanup branch July 21, 2026 07:21
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Jul 21, 2026
* origin/main: (24 commits)
  fix(agents): keep compaction on live session model (#95713)
  fix(plugin-sdk): guard provider catalog live URL parsing against malformed responses (#109986)
  chore(cli): drop dead classifiers and single-use wrappers left by fallback removal (#112191)
  feat(ui): expand the lobster pet's random universe (#112073)
  chore(ci): audit dependency fingerprint exports (#112190)
  fix(ui): preserve graphemes in provider icons (#109509)
  fix(ui): align settings search with navigation rows (#112172)
  fix(agents): allow configless gateway rebind to activate standalone owner (#111841)
  fix(secrets): register secret targets for installed-origin plugins (#104347)
  improve(ui): show real machine identity in the place picker (#112162)
  fix: webChat scrollback history is too limited — older assistant replies and tool outputs disappear when scrolling… (#104250)
  test(ui): run DOM-free suites in Node (#112031)
  feat(nodes): make computer.act eligibility capability-based for desktop nodes (#112107)
  fix(apps): harden mobile gateway and watch state
  fix(ci): restore Z.AI API Platform validation (#112171)
  fix(ui): prevent Logs controls from overlapping (#112170)
  fix #95291: message tool fails to deliver files/images on Feishu (400 volc-dcdn / write ECONNRESET) while same Lark SDK upload succeeds standalone (#95514)
  refactor(cli)!: remove automatic gateway→embedded fallback from openclaw agent (#112074)
  refactor: move provider transports into packages/ai behind a typed host port (#111669)
  fix(anthropic): complete transcript reverse-scan windows across short reads (#109431)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 22, 2026
…lback removal (openclaw#112191)

Follow-up to 2357629 (openclaw#112074): delete the legacy string-match timeout
classifier (the CLI path only sees typed GatewayTransportError from
callGateway's wrapper timer), the duplicate JSON/blank-message validation
in the private gateway command, the now-pointless getGatewayDispatchConfig
wrapper, the single-use embedded-loader alias, and the cross-os release
guard for the EMBEDDED FALLBACK marker no build can emit anymore.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations maintainer Maintainer-authored PR scripts Repository scripts size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant