Skip to content

fix(dashboard): restore verified public item references - #1178

Merged
brokemac79 merged 1 commit into
mainfrom
codex/bay-card-labels
Aug 16, 2026
Merged

brokemac79 merged 1 commit into
mainfrom
codex/bay-card-labels

Conversation

@brokemac79

Copy link
Copy Markdown
Contributor

Summary

  • restore verified public GitHub issue and pull-request references on OpenClaw Bay
  • add the same bounded public-reference cards and search to the Overview page
  • preserve the privacy boundary for credentials, tokens, private repositories, opaque keys, raw failure payloads, titles, URLs, and arbitrary untrusted text

Problem

The emergency worker-status privacy containment intentionally reduced the public Bay contract to aggregates. That removed the unsafe raw metadata, but it also left every visible work card with the generic ALL label and removed the useful item finder.

Public GitHub issue and pull-request coordinates are intentionally public product data. The desired boundary is therefore narrower than aggregate-only: Bay may expose a verified public repository plus issue/PR number, while every other identifying or unbounded field remains private.

Implementation

  • add a deployment-owned PUBLIC_BAY_REPOS allowlist for verified public repositories
  • project only the fixed tuple repository, item_number, stage, and source
  • canonicalize repository names, bound item numbers and samples, deduplicate references, and fail closed on malformed shapes
  • re-project fresh, cached, durable, queue, and terminal-outcome paths before public serialization
  • generate canonical GitHub issue URLs locally from the validated tuple; source URLs are never trusted or forwarded
  • restore repository filters and search by number or owner/repo#number in OpenClaw Bay
  • add the same verified-reference cards and search to Overview
  • retain anonymous terminal outcomes when no approved public reference is available, so conservation and tide behavior remain intact
  • document that local monitoring stores only the bounded derived record and must not archive complete raw responses

Privacy and security boundary

Allowed publicly:

  • repositories explicitly listed in PUBLIC_BAY_REPOS
  • positive bounded issue or pull-request numbers for those repositories
  • closed Bay stage/source/outcome categories and existing bounded aggregates

Still excluded:

  • private or unlisted repositories
  • credentials, tokens, secrets, internal opaque keys, hashes, workflow/job identifiers, and raw failure payloads
  • workflow titles, item titles, arbitrary source URLs, query strings, people, labels, and other untrusted text

An absent, empty, oversized, or malformed allowlist produces no public references. Removing the allowlist value is the immediate containment switch; reverting this commit restores the prior aggregate-only contract.

Validation

Focused and expanded tests:

node --test test/dashboard-worker-status-privacy.test.ts test/dashboard-worker-bay-records-routes.test.ts test/dashboard-worker-dashboard-status.test.ts
# 113 passed, 0 failed

node --test test/dashboard-worker-observability.test.ts test/dashboard-worker-queue-policy.test.ts test/dashboard-worker-queue-runtime.test.ts test/dashboard-worker-telemetry-contracts.test.ts test/dashboard-public-observability.test.ts test/exact-review-read-model-equivalence.test.ts test/dashboard-worker-webhook-ingress.test.ts test/worker-state-blobs.test.ts test/dashboard-worker-publication-lifecycle.test.ts test/github-webhook-read-model.test.ts
# 305 passed, 0 failed

corepack pnpm run build:dashboard
corepack pnpm run lint:dashboard
corepack pnpm run check:dashboard-queue-boundary
corepack pnpm run check:docs
corepack pnpm exec oxfmt --check <changed files>
git diff --check

The native Windows full-format gate remains affected by the repository's known system core.autocrlf checkout noise on untouched files. Changed-file formatting is clean, and the controlled Linux proof below passed.

Real Behavior Proof

Claim: Fresh and cached public status projections retain only verified public repository/item coordinates; both Overview and OpenClaw Bay render and search those references without exposing injected private or arbitrary fields.

Exercised surface: Worker public projection and cache re-projection, Overview rendering/search, OpenClaw Bay rendering/search, anonymous terminal outcomes, malformed/private-reference rejection, docs and queue-boundary checks.

Scenario: Deterministic fixtures mixed allowlisted public coordinates with an unlisted repository and synthetic title, URL/query, failure, key, and nested fields. Assertions required the public coordinates and aggregate counts to survive while every injected untrusted field was absent.

Environment and command: Docker-backed Crabbox local-container, image mcr.microsoft.com/playwright:v1.60.0-noble, lease cbx_55bb7510ab8d, run run_db1fe6932736, exact dirty-workspace content later committed unchanged as 6d53f2ee7d30d612b357b9e0a7b268306e2e5baf. The proof ran build:all, the 113-test focused matrix, docs, dashboard lint, and dashboard queue-boundary checks.

Observed result: Exit 0; 113/113 focused tests passed; build, docs, lint, and boundary checks passed; bay_reference_proof=pass; lease stopped cleanly.

Limits: This was a deterministic local-container proof with no production calls or mutations. Hosted CI and deployment smoke remain pending on this draft.

Review closeout

  • dirty Codex review: one valid finding accepted—anonymous terminal outcomes were restored without reintroducing references or links; proof was rerun
  • committed Codex review against origin/main: clean, no actionable findings
  • local ClawSweeper committed-range review: implementation assessed as correct with no review comments; it correctly classified the change as a public-data policy decision and requested runtime proof
  • maintainer direction for this task explicitly approves the allowlisted public repository/item exception; the Crabbox proof above supplies the requested runtime evidence

Risk and rollout

The user-visible compatibility change is intentional: unauthenticated dashboard consumers can again see allowlisted public repository/item coordinates. The primary risk is allowlist ownership drift. The Worker therefore treats deployment configuration as the authority and fails closed rather than inferring public status from GitHub-shaped input.

No queue, credential, schedule, admission, capacity, or Phase 1 behavior changes. Deployment should use the ordinary dashboard workflow and verify both Overview and OpenClaw Bay after merge.

@clawsweeper

clawsweeper Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@clawsweeper clawsweeper Bot added merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 16, 2026
@clawsweeper

clawsweeper Bot commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 16, 2026, 12:53 PM ET / 16:53 UTC.

ClawSweeper review

What this changes

The PR restores allowlisted public repository and issue/PR reference cards and search in Overview and OpenClaw Bay while filtering all other metadata from public responses.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

The patch is technically coherent and has controlled current-head proof, but it intentionally changes the unauthenticated dashboard privacy contract. Keep it open for explicit maintainer confirmation from the public-data boundary owner; the contributor-authored approval claim is not that confirmation.

Priority: P2
Reviewed head: 6d53f2ee7d30d612b357b9e0a7b268306e2e5baf
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A well-scoped, tested implementation with sufficient controlled runtime evidence; only maintainer authorization of the public-data contract remains.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The PR body records an after-fix Docker-backed Crabbox run at the submitted head with exercised projection, cache, Overview, and Bay behavior plus observed passing output.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body records an after-fix Docker-backed Crabbox run at the submitted head with exercised projection, cache, Overview, and Bay behavior plus observed passing output.
Evidence reviewed 6 items Validated public projection: The PR canonicalizes repository names, bounds issue/PR numbers, requires a closed stage/source pair, and rejects non-allowlisted references before returning the public tuple.
Cache and response containment: Fresh, stale, and cached status paths re-project with the current deployment allowlist before serializing a response, so removing the setting removes references from cached output too.
Privacy regression coverage: Focused tests exercise allowlisted canonical references, private-repository rejection, injected untrusted-field removal, malformed samples, and no-allowlist re-projection.
Findings None None.
Security None None.

How this fits together

The dashboard Worker turns internal queue and workflow state into unauthenticated status APIs used by Overview and OpenClaw Bay. This PR adds a deployment-allowlisted reference projection between internal records and those public UI consumers.

flowchart LR
A[Internal queue and workflow data] --> B[Dashboard Worker]
C[Deployment public repository allowlist] --> B
B --> D[Validated reference projection]
D --> E[Public status response]
E --> F[Overview cards and search]
E --> G[OpenClaw Bay cards and search]
Loading

Decision needed

Question Recommendation
Should the unauthenticated dashboard permanently expose allowlisted repository and issue/PR coordinates through the new PUBLIC_BAY_REPOS contract? Approve bounded public references: Record the allowlisted repository/item exception as the public contract and move the draft forward with the existing fail-closed deployment control.

Why: The implementation deliberately relaxes the aggregate-only privacy boundary; source review can verify the containment mechanics but cannot authorize which public associations the product may disclose.

Before merge

  • Resolve merge risk (P1) - Adding a repository to PUBLIC_BAY_REPOS makes its active and terminal work coordinates visible to unauthenticated dashboard users, so allowlist ownership is a durable public-data contract.
  • Complete next step (P2) - A maintainer must authorize the intentional unauthenticated public-reference contract; no narrow repair is pending.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Implementation and regression coverage production +385/-53, tests +429/-24, docs/config +111/-63 The substantial public-contract change is accompanied by targeted privacy, route, and Overview coverage.

Merge-risk options

Maintainer options:

  1. Approve and record the public-data exception (recommended)
    A responsible maintainer should explicitly accept the allowlisted repository/item disclosure and its deployment ownership before this draft is made merge-ready.
  2. Retain aggregate-only Bay
    Pause or close the PR if public repository-to-item associations should remain unavailable to unauthenticated users.

Technical review

Best possible solution:

Retain the fail-closed allowlist design, land it only after the public-data exception is explicitly recorded by the responsible maintainer, and treat future allowlist edits as privacy-boundary changes.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this PR introduces a dashboard capability rather than repairing a reported failing behavior; its current-head controlled proof exercises the intended projection and UI paths.

Is this the best way to solve the issue?

Yes technically: a deployment-owned allowlist plus repeated response projection is the narrowest maintainable way to expose only canonical public coordinates, pending the required policy decision.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 7162f1bb431c.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P2: This is a bounded public-dashboard capability and privacy-contract change rather than an urgent runtime failure.
  • merge-risk: 🚨 security-boundary: Merging intentionally exposes allowlisted repository and item coordinates in unauthenticated responses.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body records an after-fix Docker-backed Crabbox run at the submitted head with exercised projection, cache, Overview, and Bay behavior plus observed passing output.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body records an after-fix Docker-backed Crabbox run at the submitted head with exercised projection, cache, Overview, and Bay behavior plus observed passing output.

Evidence

What I checked:

  • Validated public projection: The PR canonicalizes repository names, bounds issue/PR numbers, requires a closed stage/source pair, and rejects non-allowlisted references before returning the public tuple. (dashboard/worker.ts:1836, 6d53f2ee7d30)
  • Cache and response containment: Fresh, stale, and cached status paths re-project with the current deployment allowlist before serializing a response, so removing the setting removes references from cached output too. (dashboard/worker.ts:2461, 6d53f2ee7d30)
  • Privacy regression coverage: Focused tests exercise allowlisted canonical references, private-repository rejection, injected untrusted-field removal, malformed samples, and no-allowlist re-projection. (test/dashboard-worker-status-privacy.test.ts:420, 6d53f2ee7d30)
  • Feature-history provenance: Current main’s aggregate-only containment and compatibility work was most recently maintained by Martin Cleary; the same dashboard paths are the direct base for this proposed exception. (dashboard/worker.ts:1692, 43799a11fc26)
  • Current-main and release check: The PR head is not on current main; git branch --contains identifies main only for 7162f1b, while git tag --contains returned no release tag for that current-main SHA. The proposed public-reference behavior is therefore neither implemented on main nor released. (dashboard/worker.ts:1759, 7162f1bb431c)
  • Current-head real behavior proof: The PR body records a Docker-backed Crabbox local-container run at the submitted head, with focused status/UI checks and bay_reference_proof=pass; it also states the no-production-mutation limit. (6d53f2ee7d30)

Likely related people:

  • Martin Cleary: Recent main commits established the public-status containment and aggregate compatibility behavior this PR deliberately narrows. (role: recent public-status boundary contributor; confidence: high; commits: 43799a11fc26, 7162f1bb431c; files: dashboard/worker.ts, dashboard/bay-page.ts, dashboard/dashboard-pages.ts)
  • Peter Steinberger: History shows substantial work on the Worker and queue read-model paths that supply the Bay projection. (role: dashboard read-model contributor; confidence: medium; commits: bf762f3f6f9e, 6bf7f483fb03; files: dashboard/worker.ts, dashboard/exact-review-read-model.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Record the responsible maintainer’s explicit public-data boundary decision, then move the draft to merge-ready if approved.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-16T16:38:07.127Z sha 6d53f2e :: needs maintainer review before merge. :: none

@brokemac79

Copy link
Copy Markdown
Contributor Author

Maintainer decision: approved for merge.

The unauthenticated dashboard may expose only the deployment-allowlisted public repository name and positive bounded issue or pull-request number needed by Overview and OpenClaw Bay.

Credentials, tokens, secrets, private or unlisted repositories, internal opaque keys, workflow/job identifiers, raw failure payloads, titles, arbitrary URLs/query strings, and other untrusted text remain excluded. The deployment-owned allowlist and fail-closed behavior are accepted as the durable boundary.

@brokemac79

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 16, 2026
@brokemac79
brokemac79 marked this pull request as ready for review August 16, 2026 16:55
@brokemac79
brokemac79 merged commit 41d8852 into main Aug 16, 2026
24 checks passed
@brokemac79
brokemac79 deleted the codex/bay-card-labels branch August 16, 2026 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant