Repository navigation
feat(task-lanes): operator-configured lane boards over read-only taskLanes.list - #135890
TheArchitectit wants to merge 27 commits into
Conversation
|
🦞👀 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. |
|
Post-rebase re-verification (head Green: task-lanes 30/30 · gateway-client protocol 648/648 · gateway-server descriptors+context ✓ · ui-cron 308/308 · Flagged lanes, all diagnosed as not-from-this-stack (verbose re-runs, twice-deterministic):
Exact-head fork CI is the arbiter for the flagged lanes; will fold results in when CI reports. Stack map: PR-1 #135889 (single-pane, 9 commits) → PR-2 #135890 (task-lanes, 9 commits). Draft until the live battery groups B/C/F5/G close (restart-gated on the operator's box). |
|
Codex review: needs real behavior proof before merge. What this changesAdds operator-configured JSON task boards, a read-only Gateway RPC, and an Automations panel. Example: Provider demo-board reads lanes/board.json containing an Ingest queue with three items.
Review scores
ProductKind: Feature · Worth it: Needs a maintainer decision · Fix scope: Partial Merge readiness⛔ Blocked before merge - 9 items remain Keep open: this PR contains distinct work paired with open submissions, but four previously reported defects remain and its core-versus-plugin direction is unresolved. Priority: P2 Decision needed
Before merge
Findings
Provenance
Tests
Agent review detailsHow this fits togetherGateway startup registers configured file providers; taskLanes.list reads bounded board snapshots and returns lanes, paging information, and diagnostics to the Control UI. flowchart LR
A[Operator configuration] --> B[Gateway lane service]
C[JSON board files] --> D[Bounded file provider]
B --> D
D --> E[Snapshot registry]
E --> F[Read-only Gateway RPC]
F --> G[Automations panel]
Technical reviewBest possible solution: Prefer a Workboard-owned provider extension, keeping cron authoritative for run facts and removing companion-only presentation from this branch. Do we have a high-confidence way to reproduce the issue? Source inspection establishes the type-contract failures, missing translation fallbacks, and response-order race; no target code was executed. Is this the best way to solve the issue? The bounded read-only provider is coherent, but a parallel core board owner needs product approval and the restored cron presentation lacks its producer contracts. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 19d311e00246. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +1617, Tests +1471, Generated 0, Other 0. Total +3088 across 53 files. Added test files: 8. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel 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 (40 earlier review cycles; latest 8 shown)
Reviewed October 18, 2026, 7:00 AM ET / 11:00 UTC (Revision 41). |
4b70b92 to
fffe8a1
Compare
debd373 to
3a538a7
Compare
|
Post-review push + live Control-UI proof on the current head ( Review-fix commits (each failing-repro-first, details in the PR body):
Live proof on this head: isolated dev gateway (own @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
3a538a7 to
4e82e38
Compare
|
Rebased onto the updated PR-1 stack (which itself rebased onto current @clawsweeper re-review |
Add the taskLaneProviders contract list to the plugin manifest surface, mirroring workerProviders exactly: contract type declaration, contract-list key union, manifest normalization (trim + drop malformed entries), catalog/manifest merge, and reviewed capability-summary families so plugins declaring task-lane providers surface them in capability inventory. Contract-only: no runtime registration this PR. Validate: manifest-registry 115/115 (2 new tests: accept + malformed-entry rejection), capability-summary 8/8, tsgo:core exit 0.
Read-only Task lanes section in the Automations activity tab, fed by the taskLanes.list gateway RPC: - lanes sorted by id, items newest-first (startedAtMs desc), collapsible per-lane rows revealing outcome and artifact link (href rendered as-is; the provider sanitizes upstream so only http(s) survives) - per-provider diagnostic chips (lane/item counts, provider errors) - empty state, load-failure alert, and defensive response-shape handling - 150ms debounced reload after cron mutations (create, run, toggle, remove); initial load rides ensureInitialData - i18n keys under cron.lanes.*; styles follow the cron-upcoming precedent; no new ui dependencies Validate: view-task-lanes 7/7, completion-cause 7/7, view/view-run-history/ view-runs.accessibility/cron-page all green (70 tests), tsgo:ui exit 0, pnpm --dir ui run build exit 0.
Adds the taskLanes config surface for operator-configured JSON-file lane providers: schema section (pattern-validated ids, required rootDir/filePath, strict entries, duplicate-id rejection), help/label/tier metadata, and startup registration into the gateway task-lane service. Configured lanes are visible in taskLanes.list snapshots; an unreadable lane file degrades to a provider diagnostic instead of a startup failure.
…equest-context fixture, honor UI cursor policy CR-7 sweep follow-up: taskLanes root section added to SECTIONS_WITHOUT_DOCS per schema.hints policy; server-request-context.test.ts Pick fixtures now include the required taskLanes live-state property; the task-lanes summary rule in cron.css uses var(--cursor-action) like every other non-anchor control, satisfying ui/src/styles/cursor-policy.node.test.ts. Tests: schema.hints 1/1, server-request-context 1/1, cursor-policy 1/1 green on dell-u2.
…n, docs-URL registry entry, widened request-context and manifest fixtures, typed tokenBudget test params
…file content Registry diagnostics are RPC-visible. Raw fs failures (ENOENT realpath, EISDIR read) and the escapes-root message embedded absolute resolved paths, and the JSON-parse message could echo file content — observed live when a missing provider file leaked /home/user001/... onto the taskLanes.list wire. Errors now report node errno codes only; regression tests assert absence of tmpdir paths and content sentinels.
The unsupported-schemaVersion message interpolated the untrusted schemaVersion straight from the lane file, and the registry projects Error.message into RPC-visible diagnostics. Report the expected version with a fixed message instead.
Config help documents rootDir as "absolute or relative to the state directory", but relative values resolved against the gateway process cwd, so lane files silently failed to load whenever cwd differed from the state dir. Anchor relative roots at registration via the resolved state dir threaded from gateway lifecycle. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Lane ids are unique only within a provider. Snapshot assembly matched items to lanes by lane id alone, so two providers using the same lane id cross-assigned each other's items in the RPC snapshot. Track the owning provider on assembled lanes and flat items, and match on both. Co-Authored-By: Claude Opus 4.6 <[email protected]>
The taskLaneProviders manifest contract was contract-only: plugins could declare it, but no SDK hook or runtime consumed the declaration, and the plugin-owned task-lane registry seam (registerPluginTaskLaneProvider / rebuildFromPlugins) had no production caller. A declared capability with no registration route is a dark-shipped surface — plugins would see silent no-ops. Omit it until the complete route (registration hook, gateway wiring, docs) lands as one whole change. Co-Authored-By: Claude Opus 4.6 <[email protected]>
…r, unexport internal helpers, oxlint cleanups
…otlin gateway models Bumps the schema-modules owner-count ratchet 60 -> 61 for the new task-lanes schema module and regenerates the Kotlin GatewayProtocol enum so the generated-tree guard matches. Co-Authored-By: Claude Opus 4.6 <[email protected]>
…t duplicate lane ids - cron.status now carries taskLanesConfigured; the Automations page gates the taskLanes.list request and panel on it, so an unconfigured install never polls lane data or renders an empty panel. - The JSON provider reads board files through a stat-then-bounded read: oversized files are refused before allocation instead of after a full fs.readFile. - Duplicate lane ids within one provider document are rejected during normalization instead of merging two lanes' items under one key.
… schema hints Extract shared cron-page test fixtures into cron-page.test-support.ts so cron-page.test.ts drops under the max-lines budget, move the task-lanes gate describe into its own spec, fix the promise-executor lint, and list taskLanes in the test-local SECTIONS_WITHOUT_DOCS now that the policy list lives in the test file. Also simplify the cron.status taskLanesConfigured expression for the boolean-compare lint. Co-Authored-By: Claude Opus 4.6 <[email protected]>
…d lanes on refresh Provider JSON is untrusted: startedAtMs/heartbeatAtMs values that are not non-negative integers are dropped at the boundary so the taskLanes.list snapshot always satisfies its declared schema. The operator's Refresh action now also re-reads the lane snapshot (still capability-gated and debounced) so externally edited boards do not go stale, with a test covering a changed board appearing after refresh. Co-Authored-By: Claude Opus 4.6 <[email protected]>
…absent capability Lane ids are unique only within a provider, so snapshots keep each lane's providerId and the UI labels lanes as "provider · lane". cron-page also stops sending taskLanes.list unless cron.status explicitly reports taskLanesConfigured: true — an absent signal is no longer read as permission, including while a refresh races a slow status response.
The intentional new config surface is taskLanes.providers (+6 keys: section, providers list, and per-provider id/rootDir/filePath/schemaVersion fields). Regenerated via pnpm config:docs:gen; justified in the PR body.
The registry sliced the flat item list at the default page limit but returned every lane with no total or continuation indicator, so a lane whose items fell outside the slice rendered as an empty queue — indistinguishable from a genuinely empty lane. Operators could not tell omission from emptiness, and the panel offered no way to follow the truncation. Snapshot assembly now records each lane's unpaged item total and the omitted count for the current page, plus a snapshot-level paging block (offset, limit, totalItems, returnedItems). The wire schema exposes them as optional fields so older snapshots stay valid. The Control UI renders "shown of total" counts on lanes that are partially off-page, a panel-level truncation notice when the page omits items, and requests the bounded maximum page (200, the schema cap) so the snapshot is as complete as the registry will serve; the totals signal covers anything beyond. Regression tests assert the signal: an off-page lane reports totalItems/omittedItems (registry) and the panel renders "0 of 1" rather than a bare "0" (view), with a later page clearing the omission. Co-Authored-By: Claude Opus 4.6 <[email protected]>
…ount caps
The json-file provider caps at 20 lanes and 200 items per lane, but the
load result only carried the retained slices. The registry then reported
totalItems=200, omittedItems=0 for a 205-item lane, and the UI showed
no truncation notice — a silently-cropped snapshot masqueraded as
complete. The same gap existed for the 20-lane cap.
Count input lanes and raw item count before each cap fires in
loadJsonFileProviderLanes, and return omittedLanes/omittedItems
alongside the retained lanes. The registry propagates the counts into
the ok-variant TaskLaneProviderDiagnostic (omitted when zero so older
providers stay valid). The gateway-protocol schema carries the same
optional fields, and the UI renders a distinct warn-styled chip
("...dropped N lanes, M items at provider cap") instead of the bare ok
chip so a capped set cannot pretend to be the full picture.
Failing-first coverage: each cap test now asserts both the retained
length and the omission count, a combined test exercises both caps
simultaneously, the registry test asserts the diagnostic carries the
omission fields, the schema test accepts the optional fields and
rejects negative counts, and the UI test asserts the warn chip.
Verified: 48/48 task-lanes + UI + schema tests; 695/695 gateway-protocol
tests; tsc core zero errors in touched files; oxfmt + oxlint clean.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
…nd manifest contracts The rebase onto main required adapting to the refactored gateway module loading (core-handlers.ts) and manifest contract key system (manifest-contract-keys.ts), which replaced the inline registration that the original branch used. Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Remove extra closing brace from cron status loader (P1) - Add missing PR-1 dependency modules (job-kind, upcoming-jobs, completion-cause) that were referenced but absent (P1) - Remove token-budget control/form field that has no data path in this PR (belongs in PR-1) (P1) - Remove Kind and Token Budget table columns to match CSS grid track count (P2) - Remove unreachable taskLaneProviders manifest contract key and type field (P1) Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
Post-rebase + ClawSweeper CR-8 fix push — head Branch rebased onto latest Five review findings addressed:
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
This pull request has been automatically marked as stale due to inactivity. |
|
Closing due to inactivity. |
PR-2 — feat(task-lanes): operator-configured lane boards over
taskLanes.listWhat Problem This Solves
Cron already runs the work, but there is no read-side surface that groups runs/runs-outputs into operator-defined boards: "the board this team watches", "the lanes this gateway is responsible for". Operators configure such boards out-of-band today (spreadsheets, chats) with no typed, containable way to surface them next to the Automations UI they already live in.
Why This Change Was Made
Adds task lanes: named boards of work items from pluggable providers, read over a new read-only gateway RPC
taskLanes.list, rendered as a read-only panel in the Control UI.Framing: read-side observability over existing cron, deliberately. Lanes observe runs; nothing here schedules, multiplexes, or steers concurrent execution. Concurrent-run groundwork (state-lease multiplexing, GPU cap coordination, mid-run steering) was evaluated 2026-09-02 and deferred as cost > benefit — recorded in the spec so it is not re-litigated here.
Registration route (updated after review): the shipped route is operator config — a
taskLanes.providersblock inopenclaw.jsonregisters json-file providers at gateway start (1d681de65cd). The earliertaskLaneProvidersmanifest-capability route was evaluated and omitted (4e82e38f14e): with config-driven registration in place, no plugin could ever populate the capability, so declaring it was an unreachable contract that implied a registration path that does not exist. A provider-registration handler for third-party plugins remains the offered follow-up; if/when that lands it can declare the manifest capability for real. This is a product-surface call — maintainer confirmation on the omission (vs. holding the contract slot open) is welcome before merge.User Impact
Operators who configure a
taskLanesblock get their lane boards in the gateways they already run, visible in the Control UI. Zero cost with no config: absent the block, the RPC behaves as if the subsystem doesn't exist (B1/G1 battery probes). Everyone else: nothing changes.Evidence
Live Control-UI proof on the current head (2026-09-02, isolated dev gateway — own
OPENCLAW_STATE_DIR, own port): with a config block whose providerrootDiris deliberately relative ("rootDir": "lanes"), the gateway resolves it against the state directory (f764a4c6624) andtaskLanes.listreturns the two configured lanes with items and ok diagnostics; the Automations run-history tab renders the TASK LANES panel from that RPC (screenshot). Sanitized RPC output (paths redacted):{"lanes":[{"id":"ingest","label":"Ingest","items":[…3 items with titles/states]},{"id":"review","label":"Review","items":[…1 item]}],"diagnostics":[{"providerId":"demo-board","ok":true,"laneCount":2,"itemCount":4}]}The battery found a real bug, fixed inside this PR stack. Battery D3 caught the missing-provider diagnostic echoing an absolute resolved path (and parse errors able to echo file content) onto the wire.
25a48ae4d0enarrows all provider diagnostics to node errno codes only, with regression tests asserting absence of path/content sentinels. This PR is stronger because the battery ran before merge — the evidence trail accompanies it.Review-fix commits (this round), each failing-repro-first:
7d090cb22f4— a malformed board'sschemaVersiondiagnostic no longer echoes the file's attacker-controlled value; a fixed sentinel is emitted instead, with a regression test pinning the sentinel.f764a4c6624— relative providerrootDirs resolve against the state directory, not the process cwd; cwd-dependent lane registration was a silent-miss failure class. Regression test: same config +stateDirtmp root, lane visible only with state-dir anchoring. Proven live with a relative rootDir (above).234a6886cf0— lane identity is scoped per provider: two providers may both expose a lane with the same id; snapshot assembly previously merged them into one lane, cross-assigning items. Regression test: alpha/beta providers both lane "work" → two lanes, one item each.4e82e38f14e— omit the unreachabletaskLaneProvidersmanifest contract (see framing).Land-time suites (per commit, openspec §2.2):
f8005b0fca2590ccb3540128a8facc058dab544d6ec84e82e38f14e)f483be911381d681de65cdafe132dc328/f338303a9d825a48ae4d0e7d090cb22f4f764a4c6624234a6886cf04e82e38f14eScreenshot (isolated dev gateway, current head):
Safety posture (asserted by the battery, not aspirational):
Containment is real: the json-file provider
realpaths rootDir and every filePath; unit tests stubresolveRealpath, so battery group C exercises the unstubbed real-fs path (traversal, symlink-to-/etc/hostname, oversize).Hostile producers can't take the gateway down: bounded reads (256 KiB), bounded counts (20 lanes / 200 items), per-provider diagnostics instead of thrown errors.
UI never renders unsafe text:
artifactUrldropped (not sanitized) unless http(s) without traversal/control chars; titles/outcomes truncated.Tree: this leg 94 files, +4154/−20 over merge-base; rebased onto current
main2026-09-02 (final head507266661c6), tsgo core+ui green, task-lanes 33/33. pnpm-lock: clean; zero trailers; audits as PR-1.Test plan
Round-6 update (2026-09-04, rebased onto PR-1 head
7daa73aa1e8/ upstream8e23a5324f5, head180b741e1d1):Round-6 review fixes: (1) lane identity stays provider-scoped — lanes are unique only within a provider, so snapshot assembly now keeps each lane's
providerIdin the registry result, the wire schema (TaskLaneSchema.providerId), and the UI (sort order provider-then-id; lane headers renderprovider · label); (2) fail-closed capability gate — cron-page sendstaskLanes.listonly whencron.statusexplicitly reportstaskLanesConfigured: true; an absent signal (unconfigured install or legacy/unresolved status) is no longer read as permission, including while an operator refresh races a slowcron.status(new gate test holdscron.statuspending past the 150 ms debounce and asserts zero lane requests).Verification at the new head: tsgo core + UI clean, all 5 core lint stripes +
core:uipass, task-lanes suites 42/42, cron-page gate tests green, protocol registry check passed, Kotlin + Swift protocol models regenerate unchanged.Real-Gateway proof re-run at the exact new head (
180b741e1d1) — isolated gateway (loopback, throwaway token, own state dir), realtaskLanes.listRPCs and real headless-Chromium Control UI: configured install returns provider-scoped lanes (providerIdon every lane, ENOENT diagnostic without path echo, timestamp contract enforced); unconfigured install returnstaskLanesConfigured: false+ empty lanes; the UI renders the provider-scoped panel (demo-board · Ingest queue) and no panel at all when unconfigured.Config-surface ratchet: the
taskLanessection adds +6 config keys (taskLanes,providers[], per-providerid/rootDir/filePath/schemaVersion) — intentional new config surface; baseline regenerated withpnpm config:docs:genand committed (ab48c5c68fe). All other config surface is untouched.Round-7 update (2026-09-04, head
c04137faf5d): addressed the CR-7 task-lane truncation finding. The registry sliced the flat item list at the default page limit but returned every lane with no total or continuation indicator, so a lane whose items fell outside the slice rendered as an empty queue — indistinguishable from a genuinely empty lane. Snapshot assembly now records each lane's unpaged item total + omitted count and a snapshot-levelpagingblock ({offset, limit, totalItems, returnedItems}), exposed as optional wire-schema fields (TaskLaneSchema.totalItems/omittedItems,TaskLaneSnapshotSchema.paging) so older snapshots stay valid. The Control UI renders "shown of total" on partially-off-page lanes, a panel-level truncation notice when the page omits items, and requests the bounded maximum page (200, the schema cap) so the snapshot is as complete as the registry will serve. Failing-first regressions:registry.test.ts"reports per-lane totals so an off-page lane is distinguishable from an empty lane" (red → green) andview-task-lanes.test.ts"marks an off-page lane as omitted instead of reading as an empty queue" (red → green). Verification atc04137faf5d:tsc --noEmitcore+UI exit 0, oxlint clean on touched files, repo-wideoxfmt --checkclean, task-lanes registry 7/7 + view 7/7 + cron-page gate 5/5 green, protocol registry check passed, Kotlin/Swift models regenerate unchanged. (Toolchain note:tsgo:uiand the type-awaretsgolintshard segfault on this box — environmental, reproduces in a sibling worktree on untouched files;tsc --noEmitis the authoritative UI typecheck here.)Round-8 update (2026-09-05, head
e5ec3a231d5): addressed the P2 count-cap omission finding from the 02:57 UTC review. The json-file provider capped at 20 lanes and 200 items per lane but only returned the retained slices; the registry then reportedtotalItems=200, omittedItems=0for a 205-item lane, and the UI showed no truncation notice — a silently-cropped snapshot masqueraded as complete. Count input lanes and raw item count before each cap fires inloadJsonFileProviderLanes; returnomittedLanes/omittedItemsalongside the retained lanes. The registry propagates the counts into theok-variantTaskLaneProviderDiagnostic(optional, omitted when zero so older providers stay valid). The gateway-protocol schema carries the same optional fields (omittedLanes,omittedItems) in the closedTaskLaneProviderDiagnosticSchema. The Control UI renders a distinct warn-styled chip (cron-task-lanes__chip--warn:"big: 20 lanes · 219 items (dropped 1 lanes, 5 items at provider cap)") instead of the bare ok chip when omissions exist. Failing-first coverage: each cap test now asserts both the retained length and the omission count, a combined test exercises both caps simultaneously (21-lane source: lane 0 has 205 items, lane cap drops lane 20 →omittedLanes=1, per-lane cap drops 5 from lane 0 →omittedItems=5), the registry test asserts the diagnostic carries the omission fields, the schema test accepts the optional fields and rejects negative counts, and the UI test asserts the warn chip renders with the dropped counts. Verification ate5ec3a231d5:tsc --noEmit -p tsconfig.core.jsonzero errors in touched files, 48/48 task-lanes + UI + schema tests, 695/695 gateway-protocol tests, 159/159 cron page tests; oxfmt + oxlint clean. Live proof (proof-pr2-cap.mts, fork release pr-proof-2026-09-05-tasklanes-cap):loadJsonFileProviderLanes→omittedLanes=1, omittedItems=5; registry snapshot →diagnostic.omittedLanes=1, omittedItems=5;TaskLaneSnapshotSchemavalidates the diagnostic →true.Inline proof trace (taskLanes.list, redacted — inlined because the review sandbox cannot fetch release assets; full evidence at the release links above):
Out of scope: generic lane writes (read-only this PR), provider auth/signing (in-process providers), cross-plugin lane composition, provider-registration handler for third-party plugins (offered follow-up; manifest capability deliberately omitted until it exists), concurrent-run scheduling machinery (see framing).
Fixes #135876 (part 2 of 2).