Skip to content

refactor(dashboard): use polling-only workflow health - #1926

Merged
obviyus merged 1 commit into
mainfrom
deslop-dashboard-polling-pr
Oct 11, 2026
Merged

obviyus merged 1 commit into
mainfrom
deslop-dashboard-polling-pr

Conversation

@obviyus

@obviyus obviyus commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Dashboard workflow health should have one supported source: bounded GitHub polling, which production already selects.

User Impact

Dashboard workflow health always polls GitHub. CLAWSWEEPER_DASHBOARD_WORKFLOW_SOURCE is retired; setting it to webhook no longer selects snapshot reads, repair writes, or fallback warnings. Signed webhook ingress and the underlying read-model APIs remain available for their other consumers.

Why This Change Was Made

Removes the alternate workflow-health path, stale snapshot revalidation, and job repair publication while preserving polling bounds, caches, errors, and coalesced refreshes. No storage migration or production mutation is included. Command-bound proof and repair retirement are deliberately excluded.

Whitespace-insensitive diff: 7 files, +37 / -707, net -670 lines (git diff --stat -w origin/main...HEAD).

OpenClaw Bay Impact

No public Bay field or presentation change. Bay continues to receive the same bounded polling-derived status, and the local runtime proof retained complete public queue responses.

Documentation Impact

Updated active source-of-truth descriptions in docs/live-dashboard.md and docs/github-webhook-read-model.md, including removal of the retired revalidation procedure. Added the normal changelog fragment.

Real Behavior Proof

  • Claim / surface: the real Worker /api/status uses polling even with the retired source override set to webhook; /api/exact-review-queue still initializes its SQLite Durable Object successfully.
  • Scenario: start both origin/main and candidate under local Wrangler/workerd, with isolated SQLite stores and a loopback HTTP GitHub fixture. The fixture has no workflow runs. Both revisions receive CLAWSWEEPER_DASHBOARD_WORKFLOW_SOURCE=webhook and the same local signing secret.
  • Command / environment: node /Users/obviyus/Developer/.agents/handoffs/clawsweeper-deslop/dashboard-polling-smoke.mjs, from this checkout; Node 24.21.0, Wrangler 4.131.1, macOS arm64.
  • Observed: both /api/status responses were HTTP 200 and issued the seven bounded general run polls. Both queue responses were complete with pending=0 / leased=0. Origin/main emitted github_read_model_degraded; candidate did not.
  • Identity: candidate 8981f00422ba7949fce358708dbac5f7d49095c2; committed worktree was clean.
  • Artifacts / limits: .artifacts/dashboard-polling-retirement/{proof-summary.json,base-status.json,candidate-status.json,base-worker.log,candidate-worker.log}. This is a controlled local upstream, not production traffic evidence. An entrypoint shim exposes only the unchanged real handler/DO classes because workerd rejects numeric unit-test exports on both revisions. No live data was changed, and no schema/rollback completion is claimed.

Evidence

  • Build, static checks, formatting, and all lint targets passed.
  • All 77 focused polling/read-model tests passed.
  • Full suite was executed: 7,120 passed, 45 skipped, 1 failed. The remaining failure is the untouched test/repair/process-env.test.ts test Codex subprocess prevents pnpm deploy from installing target Git hooks: the unsafe fixture's pnpm deploy did not install the expected core.hooksPath. This PR does not change repair subprocesses, pnpm configuration, or that test. The full suite is not claimed green.
  • Fresh precommit and committed-head codex review --base origin/main: no actionable regressions (pueue tasks 3432 and 3446).

No merge/automerge or manual ClawSweeper re-review is requested.

Inspectable shipped-entry-point trace and baseline discrimination

The retained local workerd run invoked the shipped fetch route and statusJson, not the status helpers directly: HTTP GET /api/status → statusJson → refreshStatus → GitHub HTTP fixture. GET /api/exact-review-queue exercised the real SQLite Durable Object bootstrap. The shim only drops non-runtime numeric test exports; it does not replace handlers, fetches, stores, or queues.

Recorded source identity: base d14447b3cfb4e0ab8a0cb1a44278f39955032b5a; head 8981f00422ba7949fce358708dbac5f7d49095c2 with empty working diff. Both receive CLAWSWEEPER_DASHBOARD_WORKFLOW_SOURCE=webhook.

                                      base            head
GET /api/status                       200             200
GET /api/exact-review-queue            200             200
queue collection / pending / leased   complete/0/0    complete/0/0
GET actions/runs?per_page=100          observed        observed
GET actions/runs?status=completed      observed        observed
GET actions/runs?status=in_progress    observed        observed
GET actions/runs?status=queued         observed        observed
GET actions/runs?status=waiting        observed        observed
GET actions/runs?status=requested      observed        observed
GET actions/runs?status=pending        observed        observed
github_read_model_degraded in log      true            false
assert warning === false              FAIL            PASS

The last assertion is the intentional source-retirement regression: base falls back from the retired webhook selector and logs degradation; head does not select that path. Unchanged HTTP/queue/polling assertions pass on both revisions, as preservation checks should. This does not assert identical timestamps or byte-identical status bodies. Raw retained summary/response/log files and runner are named above; the decisive records are embedded here so review does not depend on access to a local path.

Merge danger: two-way door; a code/config revert restores the selector without data rollback. Blast radius: dashboard workflow-health source selection only; webhook ingress and persisted read models remain supported.

@clawsweeper

clawsweeper Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. 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 Oct 11, 2026
@clawsweeper

clawsweeper Bot commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR makes dashboard workflow health polling-only and removes its webhook-source selector, snapshot reuse, and repair publication.

Example: A deployment sets CLAWSWEEPER_DASHBOARD_WORKFLOW_SOURCE=webhook with usable workflow snapshots.

  • Before: Dashboard health can reuse webhook run and job snapshots instead of polling GitHub.
  • After: Dashboard health uses bounded GitHub polling regardless of the retired setting.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and source-consistent; runtime confidence is limited by inaccessible local artifacts and an empty-run smoke scenario.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; its body reports exact-head Worker HTTP polling and SQLite queue initialization, but the local response and log artifacts could not be inspected.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Dashboard workflow health retains an alternate source and repair machinery even though production uses polling.
Reason: The supplied MEMBER association establishes owner direction, and the focused deletion reduces competing internal paths without changing production's selected behavior.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it makes a distinct, maintainer-authorized simplification that current main has not implemented, and inspection found no actionable correctness regression.

Priority: P3
Reviewed head: 8981f00422ba7949fce358708dbac5f7d49095c2

Before merge

None.

Findings

None.

Agent review details

How this fits together

The dashboard Worker collects GitHub workflow runs and jobs, combines them with queue observations and cached state, and publishes bounded status responses for the dashboard and OpenClaw Bay.

flowchart LR
  A[Dashboard and Bay] --> B[Worker status endpoint]
  B --> C[Bounded GitHub polling]
  C --> D[Run and job health]
  E[Status and job caches] --> D
  F[Exact review queue] --> B
  D --> B
Loading

Technical review

Best possible solution:

Retain one bounded polling owner for dashboard workflow health while preserving shared webhook ingress, read-model APIs, and existing cache formats.

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

This PR addresses an authorized simplification rather than a reported bug; source inspection confirms both the current selector and its removal.

Is this the best way to solve the issue?

The change cleanly removes the alternate owner and its repair machinery while keeping the existing polling implementation, callers, error handling, and cache compatibility.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 01db57a7c1f9.

Provenance checked

  • Dashboard source selection and source-sensitive coalescing changes intended behavior with a stated reason (da1f56d: Explicit polling avoided workflow-subscription warnings while retaining webhook behavior for other selections.)
  • Workflow snapshot reuse and repair publication changes intended behavior with a stated reason (bf762f3: Fresh webhook snapshots reduced repeated GitHub reads; this PR retires their dashboard consumer because production already selects polling.)
  • Stale snapshot-run revalidation changes intended behavior with a stated reason (6494ab5: Bounded exact verification prevented phantom queued rows from degrading health or stalling refreshes; the snapshot-dependent path is removed entirely.)
  • Status lifetime and stalled-read recovery keeps the original intent (f8ec10f: Bounded collection and shared cleanup prevented stalled dependencies from permanently blocking polling.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 63a66a2 adds dashboard/worker.js:45 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 63a66a26d5c0; files: dashboard/worker.js)
  • Vincent Koc: Raw commit f8ec10f adds dashboard/worker.ts:3587 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: f8ec10f29bde; files: dashboard/worker.ts)

Review metrics

Metric Value Why it matters
Whitespace-insensitive scope Production +6/-374; tests +8/-298 The reduction removes the retired alternate path and its dedicated coverage without adding a replacement layer.

Labels

Label changes:

  • add P3: This is a maintenance simplification; production already selects polling and no urgent user-facing defect is established.
  • add merge-risk: 🚨 compatibility: Existing unset/webhook deployments intentionally lose snapshot selection; the maintainer-authored body explicitly accepts this retirement, and production's polling selection is preserved.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is a maintenance simplification; production already selects polling and no urgent user-facing defect is established.
  • merge-risk: 🚨 compatibility: Existing unset/webhook deployments intentionally lose snapshot selection; the maintainer-authored body explicitly accepts this retirement, and production's polling selection is preserved.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

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

  • Publish redacted Worker responses and request traces showing polling with a usable webhook snapshot and an active run/job.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only; repair and merge need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

Reviewed October 11, 2026, 5:44 AM ET / 09:44 UTC.

@obviyus
obviyus merged commit d803cac into main Oct 11, 2026
34 of 36 checks passed
@obviyus
obviyus deleted the deslop-dashboard-polling-pr branch October 11, 2026 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant