Repository navigation
fix(workboard): make Sessions boards work on multi-agent Gateways - #163761
Conversation
…lti-agent Gateways Use the existing per-agent utility completion owner, with the board's explicit assignee as an override. Bound each agent group to eight sessions per pass and retain the board-wide 30-second interval, fair overflow queue, and partial-failure warnings without blocking healthy groups. Show a non-blocking classifying state on the initial empty board, publish empty completion epochs, and make empty rosters and owner swaps visible in logs. Regenerate the plugin UI manifest and document the ownership and loading state.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed October 2, 2026, 4:38 PM ET / 20:38 UTC (Revision 2). ClawSweeper reviewWhat this changesWorkboard classifies sessions in bounded groups using each session’s agent, preserves progress when a group fails, and shows a loading status on initially empty Sessions boards. Merge readiness✅ Ready for maintainer review This repair remains necessary: current main still selects an implicit default agent for classification. The pinned patch has no actionable introduced defect, consistent with the prior review. Priority: P2 Review scores
Verification
How this fits togetherWorkboard’s Sessions boards consume Gateway session facts and place conversations into columns using state rules and utility-model judgment. The Control UI reads the resulting placement cache through the caller’s session visibility filters. flowchart TD
A[Gateway session facts] --> B[Workboard classifier]
B --> C[State rules]
B --> D[Groups by session agent]
D --> E[Agent utility model]
C --> F[Placement cache]
E --> F
F --> G[Caller visibility filter]
G --> H[Sessions board and loading status]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +64, Tests +273, Docs +5. Total +342 across 9 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep classification in the existing Workboard service, using explicit session ownership while preserving board overrides, cached placements, and visible partial failures. Do we have a high-confidence way to reproduce the issue? Yes, from source: a multi-agent configuration without an explicit board assignee reaches current main’s implicit default-agent resolver during utility classification. The captured body also supplies a failing-before regression; this review did not execute it. Is this the best way to solve the issue? Yes. Selecting each session’s existing agent at the classifier caller reuses the established per-agent completion owner and fixes the ownership mismatch without adding configuration or another implementation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 90b2e284597f. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Landed with a pinned-head squash merge past an inherited red, per the standing rule for failures that also fail on current On head 9acd455 (run 37061408628) every lane the diff touches passed. The only real failure was The other |
* commit '79be075e5aa46be9e42dbd53ed6e30e81469210a': (33 commits) fix(ui): keep selected-text comment input readable while scrolling (#163772) test(memory): open corpus database explicitly fix: bound Doctor migration capture to plugin data (#163780) fix(ui): gate system information at the shared reader (#160982) chore(db): reclassify worker inventory sites with caller evidence (#163754) refactor(channels): deslop Slack and Matrix (#163740) fix(agents): reject empty sessions_search queries in the tool schema (#129120) perf(nodes): load only what a worker turn needs (#160442) test(cli): assert concise Gateway failure copy in CLI process tests (#163649) refactor(discord): deslop discord (#163728) fix(workboard): make Sessions boards work on multi-agent Gateways (#163761) test(gateway): add sustained heap retention diagnostics (#163764) test(ui): disambiguate session filter controls refactor(plugins): deslop imessage, mattermost, and voice-call (#163767) fix(qa): run Telegram plugin source in --source-gateway userbot runs (#163718) feat(macos): add a --no-activate launch flag for background automation (#163758) fix(agents): preserve host authority across module reloads (#163725) perf(gateway): serve the listener before multi-gigabyte store validation and honor clean-close receipts at startup (#163690) fix: keep video widgets scrollable and preload initial frames (#163762) feat(memory): add a provider-neutral memory provider runtime (#162175) ...
…enclaw#163761) Group sessions needing utility-model judgment by their own agent and run one bounded completion per group, with orchestration.defaultAssignee as an override, so multi-agent Gateways no longer fail classification with AgentSelectionRequiredError. A failed group keeps its prior placements without blocking other agents. Expose classifying on the read contract and show a Classifying sessions status before the first pass completes; announce a change epoch for empty passes. Warn once per streak on empty default-scope rosters and log owner swaps that abort classification.
* commit '1fda703fb4d3630e4633461967b2a2186e8f15fd': (33 commits) fix(ui): keep selected-text comment input readable while scrolling (openclaw#163772) test(memory): open corpus database explicitly fix: bound Doctor migration capture to plugin data (openclaw#163780) fix(ui): gate system information at the shared reader (openclaw#160982) chore(db): reclassify worker inventory sites with caller evidence (openclaw#163754) refactor(channels): deslop Slack and Matrix (openclaw#163740) fix(agents): reject empty sessions_search queries in the tool schema (openclaw#129120) perf(nodes): load only what a worker turn needs (openclaw#160442) test(cli): assert concise Gateway failure copy in CLI process tests (openclaw#163649) refactor(discord): deslop discord (openclaw#163728) fix(workboard): make Sessions boards work on multi-agent Gateways (openclaw#163761) test(gateway): add sustained heap retention diagnostics (openclaw#163764) test(ui): disambiguate session filter controls refactor(plugins): deslop imessage, mattermost, and voice-call (openclaw#163767) fix(qa): run Telegram plugin source in --source-gateway userbot runs (openclaw#163718) feat(macos): add a --no-activate launch flag for background automation (openclaw#163758) fix(agents): preserve host authority across module reloads (openclaw#163725) perf(gateway): serve the listener before multi-gigabyte store validation and honor clean-close receipts at startup (openclaw#163690) fix: keep video widgets scrollable and preload initial frames (openclaw#163762) feat(memory): add a provider-neutral memory provider runtime (openclaw#162175) ...
What Problem This Solves
Sessions boards without an explicit board assignee cannot finish utility-model classification on multi-agent Gateways. Fresh boards also look empty while their first classification is still loading.
Team's journal reported
AgentSelectionRequiredError: Multiple agents are configured, but this operation has no explicit owner.After classification was triggered, state rules wrote 715 placements (520 done, 89 in-review, 91 merged, 12 working, and 3 stuck). A subsequent board read returned 709 sessions with the utility-model warning; sessions requiring model judgment remained unresolved.Solution
Group sessions needing model judgment by their own agent, then run one bounded completion per group sequentially in each board pass. Each request contains at most eight sessions and retains the existing 600-token cap. The 30-second floor belongs to the board pass, and each group's overflow stays queued. An explicit
orchestration.defaultAssigneeoverrides the model owner for every group. A utility-model failure in one group retains its prior placements and does not block other groups; the warning logs once until recovery.Expose
classifying: truewhile an initial empty result is still being prepared. The page shows “Classifying sessions…” without blocking controls or hiding warnings, and rereads through the existing Workboard change epoch. Even a completed empty pass now publishes the epoch needed to clear that status. Add a once-per-streak warning for empty default-scope rosters and an info message when an owner swap aborts classification. Document the model owner and regenerate the plugin UI manifest.User Impact
Multi-agent Gateways classify sessions using the correct utility model without requiring a Gateway default agent. Operators can distinguish a board that is still classifying from a completed empty board, and partial model failures remain visible while other agents' sessions continue to progress. Foreground reads retain each caller's session visibility; background reads retain the Gateway system actor.
Why This Change Was Made
The classifier called
resolveDefaultAgentIddespite already having an explicit owner on every session. That resolver correctly refuses to choose an implicit owner on a multi-agent Gateway. Passing each session agent to the existing per-agent completion cache fixes ownership at the caller and preserves the shared completion, authorization, and persistence contracts.Evidence
Failing-before regression, against the original classifier:
node scripts/run-vitest.mjs extensions/workboard/src/sessions-board.test.ts --maxWorkers=1 -t 'classifies a multi-agent board'The override case also exposed the old single mixed-agent completion. After the fix, both cases pass, along with per-agent overflow/board-throttle coverage, partial failures and recovery, first-read/empty completion status, UI epoch rereading, and the retained trusted session-facts regressions.
Final result: 63 tests passed across four files in 155.64 seconds on the rebased head. The Gateway shard took 75.47 s, the page shard 3.42 s, and the two-file Workboard database shard 64.61 s; wrapper preparation and cleanup account for the remainder. These wall times include compiled worker preparation. A standalone
pnpm test extensions/workboard/src/sessions-board.test.ts --maxWorkers=1run passed all 27 tests in 56.52 s (49.71 s Vitest duration). The suite uses the real SQLite placement owner to exercise persisted partial results, pin preservation, and cancellation, with fake clocks and model responses. Hosted CI timing is pending.Passed:
pnpm tsgo:core, the fullpnpm tsgo:core:test,pnpm tsgo:extensions,pnpm tsgo:extensions:test, touched-fileoxfmt --check, andpnpm check:deprecated-api-usage. Generated assets match the committed bytes,git merge-tree --write-tree origin/main HEADis clean, and Codex autoreview returnedscoped-cleanat P0/P1 with exit 0. The full core typecheck lanes passed before the mechanical conflict rebase; the focused suite, extension typechecks, lint, asset/deprecation/SDK checks, and browser capture were repeated afterward. The rebase retained main's equivalentWorkboardSessionPlacementWritetype and regenerated the UI manifest; reviewed runtime behavior did not change. The pinned installation was restored withpnpm install --frozen-lockfile; no dependency manifest or lockfile changed. Public SDK surface check: 151 entrypoints / 3,631 exports / 2,107 callable exports (all entrypoints: 366 / 7,283 / 4,382).Synthetic before/after browser proof below demonstrates the first-classification status. The same browser scenario verified warning coexistence and removal of the status after an epoch-triggered reread.