fix: contain public worker status metadata - #1171
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 15, 2026, 5:55 PM ET / 21:55 UTC. ClawSweeper reviewWhat this changesThe PR replaces identity-bearing public Worker status, queue, telemetry, cache, and Bay output with bounded aggregate projections and privacy-focused tests. Merge readinessKeep open for maintainer review: current main still exposes detailed queue/status data, while this PR has sufficient real-behavior proof for its aggregate-only containment approach; the remaining choice is acceptance of the intentional unauthenticated API compatibility break. Priority: P1 Review scores
Verification
How this fits togetherThe dashboard Worker collects private queue and workflow state, persists operational snapshots, and serves unauthenticated status and Bay observer routes. This PR inserts fail-closed aggregate projections before those public responses and reusable snapshots. flowchart LR
A[Private workflow and queue state] --> B[Dashboard Worker]
B --> C[Fail-closed public projection]
C --> D[Public status APIs]
C --> E[Cached and durable snapshots]
D --> F[OpenClaw Bay]
E --> F
Decision needed
Why: The code and proof support containment, but the acceptable long-term public observability contract is a security and compatibility policy choice. Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Adopt aggregate-only unauthenticated observability, document the intentional compatibility break, and perform a post-deployment public-route verification; design any needed item-level diagnostics as a separately authenticated surface. Do we have a high-confidence way to reproduce the issue? Yes — source-reproducible: current main directly exposes queue-backed public routes and builds public status snapshots containing detailed worker and source data; live production probing was not needed to establish the path. Is this the best way to solve the issue? Yes, conditionally: a shared fail-closed projection at response and reuse boundaries is the narrowest durable containment, provided maintainers accept aggregate-only public observability. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d389e6addf4d. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Emergency privacy containment status
This PR contains a narrow emergency fix for the public worker-status privacy boundary. The exact head and body are published and aligned, but the change remains unmerged and undeployed; the public boundary must still be treated as exposed until deployment and live verification. Ready transition is governed by the marker-backed exact-head/current-body ClawSweeper verdict described below.
d389e6addf4d5db8a39695f19c4a5264895343defb0e3d73520cfbce8f02ea47eb24dfaa611fa18d8c5ff4ca4ddf7f3aabb6e7c768d3ea01c84cf9c8What Problem This Solves
Fixes an issue where a public worker-status observation could include unbounded workflow/job metadata when a worker failed. One bounded incident sample contained 33 affected worker entries in one identifying metadata category; a second unbounded metadata category was absent in that sample. The local Phase 0.6 observer also persisted one raw response.
The confirmed exposure sinks are the public status projection and that single local observer artifact. Before this fix, the same response shape could also flow through fresh/stale cache bodies, the status-store snapshot, worker-health cache records, and the public Bay/status path; those reachable paths are treated as part of the containment boundary even where a separate historical copy was not confirmed. The independently sampled 15-minute aggregate egress surface remained privacy-clean.
No credential or secret has been confirmed. PR #1156 enabled detection of the pre-existing boundary defect; it did not cause the missing projection.
Root Cause And Scope
The product lacked a fail-closed projection between private workflow/job state and public/cache serialization. The local observer had a separate defect: it persisted the complete public response instead of a bounded derived observation. Both boundaries required containment.
Private binding-only workflow and queue state remains available to the Worker for operational decisions. Public responses and ordinary persisted state that can later feed a public response are restricted to closed categories, capped counts, booleans, and bounded timestamps. Unexpected, malformed, nested, or legacy shapes are dropped rather than transformed into reversible or high-cardinality pseudonyms.
Why This Change Was Made
The narrowest durable fix is a shared fail-closed projection at every boundary that can serialize or later replay public status, paired with a bounded local observer. This preserves service and private operational state without allowing public correlation data.
Implementation Boundaries
The patch applies defense in depth at both response and persistence boundaries:
No queue, DLQ, capacity, schedule, admission, credential, workflow-dispatch, deployment, or other production-control behavior is changed.
User Impact
Public dashboard and Bay observers continue to receive operational health and aggregate activity, but can no longer receive per-item workflow/job identity through status, cache, or ordinary durable reuse paths. The intentional compatibility change is that Bay presents aggregate lane activity instead of item-level cards sourced from public status.
OpenClaw Bay Impact
Bay is directly affected and is now aggregate-only. Closed lane, stage, outcome, status, and count data remain available; raw item rows, public correlation keys, and unbounded metadata do not. Deterministic tests and the isolated real-Worker proof cover populated, empty, incomplete, legacy, malformed, cache, persistence, and restart behavior.
Bay remains observer-only. This change neither adds nor exercises queue, workflow, recovery, deploy, or rollback actions.
Collector And Local Containment
241c21fcbcc121d88ce25d15898f6957b06af4a562e0f33f444a6968f0112c1b.9/9self-tests.bde54c5cf87cf7b79c293a3dfee40b004d94fdd96635d2a76bc921484aa28ffd.Documentation Lifecycle
The changed dashboard and API documents are active contract documentation. Their source of truth is the Worker/Bay implementation at the exact head above; the owning roles are dashboard Worker and Bay maintainers. Refresh is required whenever public status fields, cache/store reuse, queue telemetry categories, or Bay consumption changes. No changelog or release-owned document is changed.
Evidence
Focused validation
Completed focused validation at the exact head:
pnpm run build:dashboardpnpm run check:dashboard-queue-boundarypnpm run check:docspnpm run lint:dashboardpnpm exec oxfmt --checkover the exact changed-file setgit diff --checknode --test test/dashboard-worker-bay-records-routes.test.tspassed45/45, including the new uppercase variant.428/428assertions across 14 test files:Broad Linux gate
CI=1 corepack pnpm run check03529; passed:3521; failed:0; cancelled:0; skipped:8; todo:0121a2c60db96a84390013adc9d4e03aa4948d3caeaaf04a8ab5aba8f56dfaa7a640011bytes,6398linesCommitted reviews
codex review --base origin/main: exit0; no actionable finding. Its optional focused run encountered a sandbox temporary-directory limitation, which does not affect the review verdict and is superseded by the exact-tree direct-Docker proof and broad gate.0; patch correct at0.72confidence; review findings0; security cleared with concerns0.25edad123b225db338e974ea61441e96d4ea87221c2b13f9c663f18b3560b5f4.Hosted automatic gates
MERGEABLE/CLEAN.pnpm check:SUCCESS.SUCCESS.SUCCESS.SUCCESS.SUCCESS.SUCCESS.SUCCESS.The marker-backed durable ClawSweeper review comment is authoritative. Before ready transition, it must show no findings, proof sufficient, and status ready for maintainer look on this exact head and the current body. The single allowed command has been consumed; its automatic exact-head review supplies the terminal verdict. No additional review command or manual workflow dispatch is authorized.
Real Behavior Proof
Claim
At the exact committed tree, the real Worker status boundary, Bay projection, fresh/stale cache paths, legacy-body rewrite, SQLite Durable Objects, durable reuse, and restart paths emit only bounded aggregate telemetry. Unexpected identifying metadata is removed before ordinary persistence and public output.
Exercised surface and scenario
The proof imported the committed production Worker handler and real
StatusStoreandExactReviewQueueclasses. A loopback-only canned upstream drove a genuine fresh status miss. The scenario exercised real SQLite-backed status and queue state, populated and incomplete aggregate Bay activity, unsafe synthetic legacy cache input, malformed nested input, sanitizing durable rewrite, cache removal, Worker process stop/start, and reuse of the same durable state after restart.Command and environment
The authoritative isolation proof was a user-authorized canonical Git-tree direct-Docker run. Two earlier local-container Crabbox attempts failed before execution at the Windows rsync transport boundary; a later supported no-sync/no-hydrate Crabbox run succeeded as a supplemental wrapper receipt. Both paths preserved exact-tree identity and the unchanged assertion contract.
mcr.microsoft.com/playwright@sha256:9bd26ad900bb5e0f4dee75839e957a89ae89c2b7ab1e76050e559790e946b948sha256:08f5cd852f20ec8e6742ae5e161dca562fe00a40217bd12a64bef2c34033d52fedc51388246fb24064dbb8f60ca7724452f4156c8e7bd293322226a8e0cab057none; observed non-loopback interfaces:0/work/exact-appDependencies and required proof tools were hydrated from the frozen lockfile in a disposable networked setup container. That container was removed before the isolated run, and no production request was made.
Source and artifact integrity
99c3dcf571b072daf58c0b7d1f04a51ce7bf29ba8922b927d18970f66dd75074(24176640bytes)07e883fffa07b17d7ac7f7a1023e687d91223a5d5fd5a7c37c5f830e92598d0b1207/1207; blob mismatches:0; mode mismatches:0; missing entries:0df77ce67f83a655ac42ddf3f97d91db4b0a135f78ee552d7ec209bd84f70391703abcd9cdffb024e1805415c9e7992167481b48c544208d0aa96c23a43ca8f67(49321113bytes)truetruef192cfa68a028dc83603f7d1b720f913541cb249081dad948bb6f0941718c994The archive was written as a byte-safe on-disk file with Git line-ending conversion disabled, then checked against a tracked-entry blob/mode manifest. The canonical repository was materialized from the verified Git bundle; no Windows working-copy bind or PowerShell byte pipeline was used.
Observed result
First Worker process:
107/1070000Restarted Worker process using the same durable state after cache removal:
89/89000016Supplemental Crabbox receipt
The same exact committed tree and unchanged behavior harness also passed through the supported Crabbox wrapper:
local-containercbx_9a795472448drun_03e675dcf829fb0e3d73520cfbce8f02ea47eb24dfaa611fa18d8c5ff4ca4ddf7f3aabb6e7c768d3ea01c84cf9c8sha256:08f5cd852f20ec8e6742ae5e161dca562fe00a40217bd12a64bef2c34033d52f12387532400dfce0d03f0d0d1ecb8d8055a68d78333e950083adfceb4a0f1d2b4212a7865ceb6a6f45a15d9165f39daf5b4f9195916fa0f1f1a4a7b00935b34a(493bytes); stderr bytes:01207/1207; blob mismatches:0; mode mismatches:0; missing entries:0107/107; restarted process assertions:89/8901; SQLite files observed:60Crabbox used Docker bridge networking for its SSH transport. The deterministic upstream remained loopback-only, and the run used no production credential or production call. The separate authoritative direct-Docker isolation run remained
--network nonewith zero observed non-loopback interfaces.Limits
Review Finding Dispositions
45/45, the affected-surface matrix passed428/428, and the dirty Codex review was clean.1207/1207canonical tracked-entry verification; full broad Linux gate; committed Codex review; and local ClawSweeper exact-range review jointly compensate for the partial-clone checkout boundary.0unresolved and0requested-change reviews.Risk, Rollout, And Rollback
The main risk is compatibility from intentionally contracting a public data contract. Defense-in-depth projections and aggregate Bay tests reduce that risk while retaining bounded operator value. Private binding-only operational state is not broadly deleted; only public and ordinary reusable projections are reduced.
Do not roll back PR #1156 based on timing. It enabled detection and did not introduce this defect. Once this containment is deployed, reverting it without an equivalent fail-closed replacement would reopen the public privacy boundary. Rollback should therefore be considered only for a demonstrated product regression and paired with equivalent containment.
This PR is not authorization to merge or deploy. Any ready transition remains governed by the authoritative current-body ClawSweeper verdict and ordinary maintainer gates.
Phase 1
Phase 1 remains blocked and inactive. Retry/DLQ and other operational blockers remain separate from this privacy containment.