Repository navigation
refactor(plugins): consolidate state and transport paths - #169430
Conversation
Remove speculative cache ordering and redundant bookkeeping across X, Reef, Workboard, voice-call and Teams. Preserve security, paid usage, persisted contracts and normal shutdown settlement. Fix voicecall steer machine-output classification and repair offline corruption/debounce test fixtures.
|
🦞👀 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 changes before merge. What this changesThis PR consolidates shared internals across five plugins and reserves JSON stdout for voicecall steer. Example: Run openclaw voicecall steer --call-id call-42 --message "Ask about availability".
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep this maintainer-directed consolidation open: the earlier import-boundary finding is fixed, and no additional actionable source defect was established. Priority: P3 Before merge
FindingsNone. Agent review detailsHow this fits togetherChannel messages, voice commands, and Workboard requests enter plugin-owned lifecycle and authorization handlers, which produce network requests, media, board projections, and SQLite updates. flowchart LR
A[Channel messages and CLI commands] --> B[Plugin owners]
C[Workboard requests] --> B
B --> D[Authorization and lifecycle checks]
D --> E[Shared plugin helpers]
E --> F[Guarded network transports]
E --> G[SQLite state]
F --> H[User results]
G --> H
Technical reviewBest possible solution: Retain the consolidation and accepted tradeoffs, with the shared Workboard helper at its repaired plugin-root location. Do we have a high-confidence way to reproduce the issue? Current-main source omits steer from machine-output classification although the shipped command writes JSON; the body reports the regression failing before the fix, and no target code was executed during this review. Is this the best way to solve the issue? The changes reuse existing owners, remove replaced implementations, and preserve final authorization and durable-write contracts within the explicitly accepted tradeoffs. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9605dd68cb6d. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -511, Tests -23, Other -1. Total -535 across 38 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 11, 2026, 7:27 PM ET / 23:27 UTC (Revision 2). |
Pass the known URL through the injected X transport and place the shared Workboard projection helper at the plugin root. Regenerate the browser asset manifest without changing guard policy.
Exact-head CI disposition: inherited failuresReviewed head: All failed jobs were inspected individually. No job was rerun and no timeout, assertion, skip, suppression, or baseline was weakened. The initial head's two patch-caused failures (X stringification lint and the Workboard shared-helper import location) were repaired in the current head; both checks now pass.
The two cancelled metadata jobs ( Exact-base reproductionAll runs used isolated
Passing current-head gatesAll five changed-extension test jobs, production/extension test types, both extension-lint stripes, additional boundaries, extension package boundary, general lint, and the other selected static checks pass. Local scope proof, fresh independent review, zero runtime/Madge cycles, and the 511-line net production reduction are recorded in the PR body. This landing uses the campaign's explicitly approved inherited-red exception; it does not claim the entire repository CI is green. The core UI failures remain follow-up work for the UI owner. |
… (extracted hotfix) Original subject: refactor(plugins): consolidate state and transport paths (#169430). Extracted from #169430 (8a39ccb): took only the "steer" entry in extensions/voice-call/cli-output-mode.ts MACHINE_OUTPUT_COMMANDS and its test row. On the branch `openclaw voicecall steer` writes JSON to stdout via writeCliJson but is not declared machine output, so startup chatter can corrupt its JSON. Left out the reef, workboard, x, and voice-call state and transport consolidation refactors. Extracted-from: 8a39ccb Co-authored-by: Peter Steinberger <[email protected]>
Release provenance: 89329f6 -> #168587 Release provenance: e6a9022 -> #168905 Release provenance: 15f3f12 -> #162266 Release provenance: 20805b8 -> #169430 Release provenance: 568fec8 -> #169102 Release provenance: 39dba6d -> #160440 Release provenance: 5df28c7 -> #168393 Release provenance: 10bcd8e -> #168164 Release provenance: dc5f1f5 -> #168446 Release provenance: 9f1e441 -> #168044 Release provenance: 5a235fc -> #168651
…9430) * refactor(plugins): consolidate state and transport paths Remove speculative cache ordering and redundant bookkeeping across X, Reef, Workboard, voice-call and Teams. Preserve security, paid usage, persisted contracts and normal shutdown settlement. Fix voicecall steer machine-output classification and repair offline corruption/debounce test fixtures. * fix(plugins): satisfy shared helper lint boundaries Pass the known URL through the injected X transport and place the shared Workboard projection helper at the plugin root. Regenerate the browser asset manifest without changing guard policy.
…aw#169430) (extracted hotfix) Original subject: refactor(plugins): consolidate state and transport paths (openclaw#169430). Extracted from openclaw#169430 (8a39ccb): took only the "steer" entry in extensions/voice-call/cli-output-mode.ts MACHINE_OUTPUT_COMMANDS and its test row. On the branch `openclaw voicecall steer` writes JSON to stdout via writeCliJson but is not declared machine output, so startup chatter can corrupt its JSON. Left out the reef, workboard, x, and voice-call state and transport consolidation refactors. Extracted-from: 8a39ccb Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 20805b8) Co-authored-by: RomneyDa <[email protected]>
What Problem This Solves
The recently expanded X, Reef, Workboard, voice-call and Teams plugins repeat state, transport and validation paths and carry bookkeeping for synthetic interleavings.
User Impact
Normal features, authorization, quotas, persisted data and public interfaces remain intact.
voicecall steernow correctly reserves stdout for JSON instead of permitting startup chatter. Internal cleanup removes 511 net production lines; tests, fixtures and generated assets are excluded from that count. An existing Teams debounce fixture now joins its own asynchronous work instead of leaking a late dispatch into the next test.Why This Change Was Made
Share X/GitHub guarded transport, Reef trust-record operations and store settings, Teams account validation and Graph attachment download, Workboard sparse-record handling and icon construction, and voice-call runtime/default ownership. Remove redundant playback tombstones and synthetic cache/error-ordering fences. Keep the actual security checks, conditional writes, encrypted replay, normal restart settlement and bounded caches.
This uses the campaign's 500–999-line exception after an honest recent-addition and largest-first pass. The substantial remaining machinery protects authorization, real paid usage, ordinary restart durability, or a named released-host contract—not a reason to inflate this patch.
Best-effort tradeoffs accepted
Coverage log
Inspected recent additions and then largest owners in all five plugin trees. Kept X spend/guest quotas and effect-authority fences; Reef encrypted replay, approvals and released-host adapters; Workboard external-input validation, redaction, bounded caches and SQLite settlement; Teams acknowledged-prefix/Stop handling backed by the human #91723 report; voice-call realtime cancellation, requester authority and shipped-host compatibility. No changes to
src/audit, changelog, PR tooling, schemas, dependencies or storage retention.Candidate ledger: implemented consolidations and retained mechanisms
api.ts,github.ts: guarded transportthread.ts,send.ts: quote traversal and prepared-object layerallowlist.ts,verified-github-service.ts,monitor.tsapi.ts,events.ts,spend.ts,guest-usage.tscontrol-ui.tsx: mutable owner/reactive publicationtrust-store.legacy.ts,trust-state-operation.ts,trust-store-format.tstrust-store.legacy.ts: legacy adapterreplay-store.ts: preparation-error retry/cachedoctor-durable-state.tsicons.tsxsessions-board.tsstore-core.ts:updateCardstore-runtime.ts,sqlite-store.ts, child-row loadingconfig-schema-refinement.ts,token-config.tsattachments/graph.ts,attachments/download.tsindex.ts: slot representations and registration orderingmedia-stream.ts: playback tombstonesconfig.ts: realtime defaultsEvidence
steerregression failed before the one-line fix: 1 expected failure / 12 passed, 33.56s wrapper / 16.72s file.747a77910038e978b6e169f85d36dc40fddaef83, run 38182169973) identified two patch-caused failures: X's broadfetchinput stringification and Workboard browser's relative import into its ownsrcdirectory. The follow-up uses the already-known URL and moves the shared leaf to the plugin root; it does not weaken either lint rule. Focused X, Workboard browser, SQLite batch and suppression proof passed across five shards (535.74s); production types, both zero-cycle checks, the no-extension-src-imports guard and typed X lint pass. Fresh independent review of the repair is scoped-clean P0/P1 (0.97).