feat(workboard): add worker dispatch CLI#88555
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed May 31, 2026, 5:29 AM ET / 09:29 UTC. Summary PR surface: Source +689, Tests +387, Docs +325. Total +1401 across 16 files. Reproducibility: yes. for the PR defects by source inspection: PR-head Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Land a narrower Workboard CLI/dispatch design that honors remote Gateway targets, keeps the existing data-only dispatch contract or gates worker starts behind an explicit reviewed surface/scope, and includes redacted live Gateway/provider proof. Do we have a high-confidence way to reproduce the issue? Yes for the PR defects by source inspection: PR-head Is this the best way to solve the issue? No. The CLI feature is useful, but the safer design is to preserve or explicitly split the existing data-only dispatch contract, route or block remote-profile local reads/writes, and add live Gateway/provider proof before merge. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 9e2bd8b2f7eb. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +689, Tests +387, Docs +325. Total +1401 across 16 files. View PR surface stats
Security concerns:
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 871715c697
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (!isGatewayUnavailableError(error) || hasExplicitGatewayTarget(options)) { | ||
| throw error; | ||
| } | ||
| const result = redactDispatchResult(await params.store.dispatch()); |
There was a problem hiding this comment.
Avoid local fallback for configured remote gateways
When openclaw workboard dispatch is run without --url/--token but the profile (or OPENCLAW_GATEWAY_URL) points at a remote Gateway, callGatewayFromCli still targets that configured URL (see src/cli/gateway-rpc.ts and src/gateway/connection-details.ts). If that connection is refused or reset, this branch treats it as an implicit local Gateway outage and runs params.store.dispatch() against local SQLite, so a remote-profile operator can mutate stale local Workboard state instead of failing without changing the remote board. Please only use the data-only fallback when the resolved target is the local loopback Gateway, or treat config/env Gateway targets as explicit.
Useful? React with 👍 / 👎.
871715c to
5ef3867
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5ef38671a5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| .option("--status <status>", "Filter by status") | ||
| .option("--json", "Print JSON", false) | ||
| .action(async (options: JsonOptions & { board?: string; status?: string }) => { | ||
| let cards = await params.store.list({ boardId: options.board }); |
There was a problem hiding this comment.
Route remote-profile Workboard CLI reads through Gateway
When an operator's profile or OPENCLAW_GATEWAY_URL points at a remote Gateway, this direct store read still opens the CLI process's local Workboard SQLite instead of the Gateway's plugin state. The same local-only path is used by create and show, while only dispatch has Gateway options, so openclaw workboard list/create/show can display or mutate a different board than the remote dashboard and Workboard RPC methods that already exist for these operations. Please send these subcommands through the resolved Gateway target, or explicitly block remote-profile use instead of silently using local state.
Useful? React with 👍 / 👎.
adcb9ec to
720a3cd
Compare
720a3cd to
b05e146
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 720a3cd8ab
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const updated = await params.store.update(card.id, { | ||
| sessionKey, | ||
| runId: run.runId, | ||
| execution: buildExecution({ | ||
| card: claimed.card, | ||
| sessionKey, | ||
| runId: run.runId, | ||
| model, | ||
| now, | ||
| }), | ||
| }); | ||
| await params.store.addWorkerLog( |
There was a problem hiding this comment.
Don't block cards after a worker has already started
If params.subagent.run succeeds but either of the following persistence writes fails (for example a transient SQLite/write error while saving runId/execution or appending the worker log), this shared catch records a start failure and calls store.block, clearing the claim even though a live worker was already launched with that token. That leaves the running worker unable to heartbeat/complete the card and lets a later dispatch start duplicate work; split the pre-run failure path from the post-run persistence/logging path once a runId exists.
Useful? React with 👍 / 👎.
Summary
openclaw workboardCLI plus/workboardslash command parity for list, show, create, and dispatch.Verification
pnpm test extensions/workboard -- --reporter=verbosenode scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.extensions.json extensions/workboard/src/card-lookup.ts extensions/workboard/src/cli.ts extensions/workboard/src/cli.test.ts extensions/workboard/src/command.ts extensions/workboard/src/command.test.ts extensions/workboard/src/dispatcher.ts extensions/workboard/src/dispatcher.test.tspnpm docs:listpnpm format:docs:checkgit diff --check.agents/skills/autoreview/scripts/autoreview --mode localenv -u OPENCLAW_TESTBOX pnpm check:changedreached extension lint after typecheck; latestorigin/mainbroad extension lint currently reports pre-existing unsafe-assertion findings outside this PR (for example qqbot/codex/line plus existing Workboard store/sqlite/tool files). Touched Workboard CLI/dispatcher files were linted directly above.Real behavior proof
Behavior addressed: Workboard dispatch can now start bounded subagent worker lanes, and operators can inspect/create/dispatch cards from CLI or slash command surfaces.
Real environment tested: Local OpenClaw source checkout on the rebased branch.
Exact steps or command run after this patch:
pnpm test extensions/workboard -- --reporter=verbose; targeted Workboardrun-oxlint; docs list/format checks; autoreview.Evidence after fix: Workboard extension suite passed 7 files / 94 tests, including dispatcher worker-start, slash write-scope, CLI claim-token redaction, explicit Gateway target fallback, and ambiguous prefix tests; autoreview reported no accepted/actionable findings.
Observed result after fix: Ready cards are claimed and receive persisted worker run metadata; claim tokens are redacted from new CLI JSON read paths; explicit remote Gateway dispatch failures do not mutate local state.
What was not tested: A live provider-backed subagent run from a real Gateway was not exercised locally; unit tests cover the subagent runtime call and Workboard state transitions.