Skip to content

feat(clients): adopt worker-local inference placement - #163647

Merged
RomneyDa merged 2 commits into
mainfrom
openclaw/pr-158902-clients
Oct 6, 2026
Merged

RomneyDa merged 2 commits into
mainfrom
openclaw/pr-158902-clients

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Adopts worker-local inference in the TUI and Control UI on top of merged #165960.

  • Shows worker inference as a placement capability, not as a second source of configuration truth.
  • Preserves explicit model/runtime validation and existing Gateway permission checks.
  • Uses worker-owned credentials only for the selected direct worker profile.
  • Restores and submits sessions through the existing placement/session lifecycle owners.

Stack

Rebased onto current main, including the merged troubleshooting follow-up #165960 and its prerequisite #163646. The underlying contracts, runtime, and Gateway PRs (#158902 and #163645) are also merged. Followed by #158903.

Evidence

  • TUI model-catalog and command suites: 120 passed in 37.3s
  • Control UI placement/inference suites: 23 passed in 4.4s
  • Bundled mocked-Gateway worker-inference E2E: 1 passed in 16.9s
  • Complete Control UI suite: 22,751 passed, 6 skipped; one unrelated timeout in untouched markdown-file-tooltip.browser.test.ts
  • node scripts/check-changed.mjs: passed, including production/UI typechecks, all affected test typecheck shards, lint, i18n verification, dead exports, database guards, and import cycles
  • Fresh AutoReview through P2: no actionable findings (0.86 confidence)

Visual evidence

Before: https://github.com/user-attachments/assets/a43321e3-82bf-48ea-91be-77b827194380

After: https://github.com/user-attachments/assets/c539726c-f061-4504-a184-04c0f916220a

@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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. labels Oct 2, 2026
@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 6, 2026, 1:52 PM ET / 17:52 UTC (Revision 14).

ClawSweeper review

What this changes

The TUI and Control UI recognize worker-local inference, use session-scoped model choices, and support configured-default worker sessions without Gateway provider credentials, with updated browser and queue-lifecycle coverage.

Merge readiness

✅ Ready for maintainer review

This PR remains useful: the merged prerequisites do not include its client adoption, and no blocking introduced defect was found. Member-authored work is also protected from automatic closure.

Priority: P2
Reviewed head: fda93557c0798e047782009449d4f2241a8def6b

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused client implementation with inspected visual evidence, relevant reported validation, and no blocking correctness finding.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after browser captures directly show the placement renderer adding “Direct from worker.” Reported mocked-Gateway coverage supplements creation, dispatch ordering, and follow-up submission; it does not prove provider I/O. The member-authored PR is exempt from ordinary contributor runtime proof, and no stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected before/after browser captures directly show the placement renderer adding “Direct from worker.” Reported mocked-Gateway coverage supplements creation, dispatch ordering, and follow-up submission; it does not prove provider I/O. The member-authored PR is exempt from ordinary contributor runtime proof, and no stored-data contract changes.
Evidence reviewed 12 items Pinned introduction and merge ownership: Reviewed the merge-base-to-head introduced hunks. The test merge records the exact fetched main parent followed by the exact PR head; its resulting changes match the client and test surface, without removing base-only work.
Session-scoped TUI catalogs: Catalog keys include agent and advertised session scope. Requests carry sessionKey only when the Gateway advertises support; pending-request ownership and connection teardown prevent superseded publication.
Narrow credential exception: New Session derives inference from the selected published profile and applies the credential exception only to the OpenClaw worker-turn runtime with no explicit model, runtime, or personal-account choice. Existing access, catalog, runtime, and placement readiness gates remain.
Findings None None.
Security None None.

How this fits together

The TUI and Control UI consume model catalogs and placement facts published by the Gateway. Their selections enter the existing session lifecycle, while the Gateway and worker retain authorization, credential, and execution ownership.

flowchart TD
  A[Gateway model catalog] --> C[TUI and Control UI]
  B[Worker placement facts] --> C
  C --> D[Model and placement selection]
  D --> E[Gateway session lifecycle]
  E --> F[Authorized worker execution]
  F --> G[Chat and placement updates]
  G --> C
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +97, Tests +385. Total +482 across 23 files.

View PR surface stats
Area Files Added Removed Net
Source 15 160 63 +97
Tests 8 558 173 +385
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 23 718 236 +482

Review metrics

Metric Value Why it matters
Production versus test growth production net +97 lines; tests net +385 lines Production growth implements client adoption of merged contracts; most net growth supplies focused client and browser coverage.

Technical review

Best possible solution:

Keep client model selection and placement presentation driven by canonical Gateway facts, with worker credentials confined to the existing worker runtime.

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

Not applicable as a feature-adoption PR; source comparison establishes the missing client support, and the supplied browser captures show the placement display change.

Is this the best way to solve the issue?

Yes: the patch extends existing catalog and session owners rather than creating another configuration or credential owner, while retaining explicit-selection and permission checks.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against f0984df6685f.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. Inspected before/after browser captures directly show the placement renderer adding “Direct from worker.” Reported mocked-Gateway coverage supplements creation, dispatch ordering, and follow-up submission; it does not prove provider I/O. The member-authored PR is exempt from ordinary contributor runtime proof, and no stored-data contract changes.

Label justifications:

  • P2: This is a bounded client improvement for explicitly configured worker inference, without an established urgent regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): Inspected before/after browser captures directly show the placement renderer adding “Direct from worker.” Reported mocked-Gateway coverage supplements creation, dispatch ordering, and follow-up submission; it does not prove provider I/O. The member-authored PR is exempt from ordinary contributor runtime proof, and no stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected before/after browser captures directly show the placement renderer adding “Direct from worker.” Reported mocked-Gateway coverage supplements creation, dispatch ordering, and follow-up submission; it does not prove provider I/O. The member-authored PR is exempt from ordinary contributor runtime proof, and no stored-data contract changes.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected before/after browser captures directly show the placement renderer adding “Direct from worker.” Reported mocked-Gateway coverage supplements creation, dispatch ordering, and follow-up submission; it does not prove provider I/O. The member-authored PR is exempt from ordinary contributor runtime proof, and no stored-data contract changes.

Evidence

What I checked:

  • Pinned introduction and merge ownership: Reviewed the merge-base-to-head introduced hunks. The test merge records the exact fetched main parent followed by the exact PR head; its resulting changes match the client and test surface, without removing base-only work. (f8d5781851a6)
  • Session-scoped TUI catalogs: Catalog keys include agent and advertised session scope. Requests carry sessionKey only when the Gateway advertises support; pending-request ownership and connection teardown prevent superseded publication. (src/tui/gateway-chat-models.ts:50, fda93557c079)
  • Narrow credential exception: New Session derives inference from the selected published profile and applies the credential exception only to the OpenClaw worker-turn runtime with no explicit model, runtime, or personal-account choice. Existing access, catalog, runtime, and placement readiness gates remain. (ui/src/pages/new-session/model-target.ts:278, fda93557c079)
  • Existing authorization owner: The existing models.list owner prepares session access and rechecks current authority before publishing its projection. The introduced client changes neither grant scopes nor replace final execution authorization. (src/gateway/server-methods/models.ts:110, fda93557c079)
  • Current main still needs client adoption: Fetched main retains an agent-only TUI catalog and does not pass worker placement inference into the chat credential banner. The merged protocol, runtime, dispatch, and troubleshooting prerequisites therefore do not supersede this client layer. (ui/src/pages/chat/chat-model-setup.ts:42, f0984df6685f)
  • Latest release comparison: The v2026.9.8 chat setup source likewise lacks the introduced worker-inference banner exception; this client behavior is not already supplied by the latest release. (ui/src/pages/chat/chat-model-setup.ts:42, fc23bc864e45)

Likely related people:

  • Dallin Romney: Raw commit 1ca2750 adds src/gateway/worker-environments/inference-placement.ts:19 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 1ca275087fde; files: src/gateway/worker-environments/inference-placement.ts)
  • Ayaan Zaidi: Raw commit d02f309 adds src/tui/gateway-chat-models.ts:37 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: d02f30910e91; files: src/tui/gateway-chat-models.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 (13 earlier review cycles; latest 8 shown)
  • reviewed 2026-10-04T07:50:25.894Z sha 8511e73 :: needs changes before merge. :: none
  • reviewed 2026-10-04T15:03:51.115Z sha 3ef7c6effb54ba106cd92ed6bccd96861a6b1ef2 :: needs changes before merge. :: none
  • reviewed 2026-10-04T15:29:02.471Z sha 8d6fd82e69079f33a52b0e1c53b2577851d6a3fa :: needs changes before merge. :: none
  • reviewed 2026-10-04T15:39:46.615Z sha 34b30c2 :: needs changes before merge. :: none
  • reviewed 2026-10-05T21:23:31.232Z sha 269a0d6 :: needs changes before merge. :: none
  • reviewed 2026-10-06T05:53:53.934Z sha 269a0d6 :: blocked before merge. :: none
  • reviewed 2026-10-06T06:57:27.628Z sha e51efc6 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-06T16:59:35.160Z sha 9a6b1c3c57a1f8b11a8d1a819a21469f61a69ec6 :: needs maintainer review before merge. :: none

@RomneyDa

RomneyDa commented Oct 2, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper review

Exact head: ef07d0bd40b95c13cb1cf320713b009c63378bb8.

The current checks-node-changed-4 failure is the inherited retired-config fixture repaired by #163661.

@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@RomneyDa
RomneyDa force-pushed the openclaw/pr-158902-clients branch from ef07d0b to 59f5e3b Compare October 4, 2026 07:17
@RomneyDa
RomneyDa force-pushed the openclaw/pr-158902-gateway-compat branch from 142ec43 to 005a16e Compare October 4, 2026 07:17
@RomneyDa
RomneyDa force-pushed the openclaw/pr-158902-clients branch from 59f5e3b to 8511e73 Compare October 4, 2026 07:27
@RomneyDa
RomneyDa force-pushed the openclaw/pr-158902-gateway-compat branch from 005a16e to 99cafd3 Compare October 4, 2026 07:27
@clawsweeper clawsweeper Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Oct 4, 2026
@RomneyDa
RomneyDa force-pushed the openclaw/pr-158902-gateway-compat branch from 99cafd3 to e12694c Compare October 4, 2026 14:58
@RomneyDa
RomneyDa force-pushed the openclaw/pr-158902-clients branch 2 times, most recently from 3ef7c6e to 8d6fd82 Compare October 4, 2026 15:22
@RomneyDa
RomneyDa force-pushed the openclaw/pr-158902-gateway-compat branch from e12694c to 392f89a Compare October 4, 2026 15:22
@RomneyDa
RomneyDa force-pushed the openclaw/pr-158902-clients branch from 8d6fd82 to 34b30c2 Compare October 4, 2026 15:34
@RomneyDa
RomneyDa force-pushed the openclaw/pr-158902-gateway-compat branch 2 times, most recently from 9d13e40 to 19a25e5 Compare October 5, 2026 20:41
@RomneyDa
RomneyDa force-pushed the openclaw/pr-158902-clients branch from 34b30c2 to 269a0d6 Compare October 5, 2026 20:41
@RomneyDa
RomneyDa force-pushed the openclaw/pr-158902-gateway-compat branch from 19a25e5 to 94dc5ac Compare October 6, 2026 01:00
@RomneyDa
RomneyDa force-pushed the openclaw/pr-158902-clients branch from 269a0d6 to 925a0ea Compare October 6, 2026 06:32
@RomneyDa
RomneyDa changed the base branch from main to fix/worker-inference-troubleshooting October 6, 2026 06:33
@openclaw-barnacle openclaw-barnacle Bot added size: L and removed docs Improvements or additions to documentation gateway Gateway runtime cli CLI command changes scripts Repository scripts agents Agent runtime and tooling size: XL labels Oct 6, 2026
Base automatically changed from fix/worker-inference-troubleshooting to main October 6, 2026 06:35
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime labels Oct 6, 2026
@RomneyDa
RomneyDa force-pushed the openclaw/pr-158902-clients branch from 925a0ea to e51efc6 Compare October 6, 2026 06:42
@openclaw-barnacle openclaw-barnacle Bot removed docs Improvements or additions to documentation gateway Gateway runtime labels Oct 6, 2026
@RomneyDa
RomneyDa force-pushed the openclaw/pr-158902-clients branch from e51efc6 to 9a6b1c3 Compare October 6, 2026 16:53
@RomneyDa
RomneyDa force-pushed the openclaw/pr-158902-clients branch from 9a6b1c3 to fda9355 Compare October 6, 2026 17:45
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Oct 6, 2026
@RomneyDa
RomneyDa merged commit 6c8e0b4 into main Oct 6, 2026
113 of 117 checks passed
vincentkoc added a commit that referenced this pull request Oct 6, 2026
* commit 'c39d9b0692dbaafa5b1bfe02514c9f6411ab5546': (30 commits)
  fix(ci): clear MCP audit and service-worker test blockers (#166217)
  test(gateway): wait for steering admission in FIFO fixtures
  fix(llama-cpp): managed setup crashes and loops on macOS below 13.3 (#163358)
  perf(worktrees): avoid full session parsing during GC (#166072)
  fix(update): recover stopped legacy managed services (#166232)
  perf(gateway): stream bounded link preview metadata (#166195)
  perf(diagnostics): release completed Git operation state (#166214)
  chore(deps): update fs-safe to 0.24.1 and clone plugin source captures (#166189)
  feat(clients): adopt worker-local inference placement (#163647)
  test: serialize PowerShell completion process suites (#166229)
  test: stabilize release timing boundaries (#166218)
  refactor(sessions): persist run outcomes only; liveness comes from the run registry (#165733)
  test(gateway): prove mention refresh after config retargeting
  fix(team-reports): keep the missed closed day when catch-up runs after midnight (#165780)
  test(gateway): join WebChat queue admission and drain completion
  fix(logging): reject blank diagnostic stability query fields (#145532)
  fix(agents): report unparseable serialized edit arguments (#163577)
  improve(anthropic): log Claude Code version probe failures (#157697)
  fix(agents): clarify prompt-size provider failures (#159712)
  fix(memory): re-throw non-ENOENT/ENOTDIR errors in root memory file lookup (#107921)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 7, 2026
* feat(clients): adopt worker-local inference placement

* test(gateway): follow queued input lifecycle
@RomneyDa
RomneyDa deleted the openclaw/pr-158902-clients branch October 22, 2026 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant