Skip to content

fix(dashboard): avoid webhook warnings in polling mode - #1486

Merged
vincentkoc merged 1 commit into
mainfrom
fix-dashboard-polling-mode-20260908
Sep 8, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix-dashboard-polling-mode-20260908

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

Resolves a problem where dashboard workflow health emits missing-subscription
warnings and performs workflow read-model repair even when the deployment
intentionally uses GitHub polling without workflow webhook subscriptions.

Why This Change Was Made

The dashboard inferred its workflow source from a signing secret that also
serves unrelated ingress and queue operations. A dashboard-owned source
selector now governs workflow snapshot reads, fallback warnings, run repair,
job repair, and in-flight refresh identity.

This deployment selects CLAWSWEEPER_DASHBOARD_WORKFLOW_SOURCE=poll. Unset or
webhook preserves existing behavior, including separate secret checks.
No new webhook, subscription, permission, timeout, concurrency, queue, schema,
or public response field is introduced. Persisted cache keys and TTLs are unchanged;
switching sources takes effect through normal cache expiry, not a flush.

Production TypeScript: +19 net lines; deployment configuration: +1;
tests: +204 net lines. The added runtime surface owns the explicit source
decision without changing the existing polling or read-model implementations.

User Impact

Dashboard workflow health uses bounded GitHub run/job polling without warnings
or repair work for workflow subscriptions it does not consume. Real acquisition
errors remain visible. Other installations keep webhook-first behavior unless
they explicitly select poll.

This does not diagnose or claim to repair the two separately observed generic
status errors. No production recovery claim is made.

OpenClaw Bay Impact

Bay's public data contract, queue projection, lifecycle records, and consumers
are unchanged. Poll mode still exercises unrelated Durable Object reads; the
focused suite includes existing dashboard/Bay projection and freshness tests.
The separate queue-projection changes are outside this branch.

Documentation Impact

Updated active documentation: docs/github-webhook-read-model.md and
docs/live-dashboard.md. The dashboard workflow-source owner is
dashboard/worker.ts; dashboard/wrangler.toml is this deployment's source
of truth. The sections cover the reviewed branch behavior and must change if
source selection, default behavior, or cache lifecycle changes.

No CHANGELOG.md entry: this repository reserves it for releases. The
operational release context is recorded here and in the commit message.

Evidence

  • Focused tests: 92/92 passed across dashboard status, webhook read model,
    GitHub API/ETag handling, and operational health.
  • Added coverage: secret-present polling ignores usable and unusable phantom
    snapshots; active/completed runs and jobs; freshness and job-cache reuse;
    versioned complete/incomplete job censuses; errors; same-source coalescing
    and distinct-source separation.
  • Existing default webhook, pagination, malformed/incomplete input, stale
    revalidation, signed ingress, and unrelated durable consumer tests passed.
  • git diff --check, targeted formatting, and documentation checks passed.
  • Local build:repair did not pass: the existing shared dependency install
    lacks yauzl from the base branch. No installation or unrelated fix was
    attempted. Matching-source emitted modules supported the focused tests;
    this does not make the failed build successful.
  • Full pnpm run check must complete in exact-head hosted CI before landing.
  • Fresh precommit and committed-against-base Codex reviews: clean.
  • Local disk subsequently fell below the 3 GiB stop floor. No further local
    build or test work is planned; exact-head native proof had already completed.

Real Behavior Proof

Claim: explicit polling skips workflow read-model-only work while
preserving actual workflow health, cache/freshness behavior, unrelated durable
traffic, and genuine upstream errors.

Surface and environment: actual dashboard/worker.ts served through
Wrangler 4.107.0/workerd 1.20260701.1 with native SQLite Durable Objects and
HTTP /api/status; Node 26.7.0. The task-owned controller runs
node .artifacts/dashboard-polling-mode/run-proof.mjs committed-2a64a166 with
PROOF_WRANGLER_BIN pointing to an existing cached Wrangler binary. It uses
loopback GitHub HTTP fixtures, an ephemeral synthetic App key, and signed
workflow deliveries. The Worker transport guard rejects non-loopback requests.

Observed result: seven scenarios passed. Polling ignored both cold and
usable phantom workflow stores, returned one real active run/job and one
recent successful attempt, and left workflow rows/watermarks unchanged.
Default fallback still warned and repaired; unset and explicit webhook
reused the usable snapshot. Refresh saw a new run and fetched its job.
A fixture HTTP 503 produced health unknown and one diagnostic error.

Scenario Run-list requests Job requests Workflow reads Workflow repairs Health
Poll, cold workflow store 7 2 0 0 healthy
Default, unusable workflow store 7 0 1 1 healthy
Poll, usable phantom store 7 0 0 0 healthy
Default, usable phantom store 0 0 1 0 degraded
Explicit webhook, usable phantom store 0 0 1 0 degraded
Poll, new run after refresh 7 1 0 0 healthy
Poll, genuine upstream 503 7 0 0 0 unknown

Trace: 68 loopback GitHub requests, including two synthetic authentication
requests, zero GitHub mutations. ETag 304 revalidation occurred. Other Durable
Object traffic remained active in all polling cases. The owned Worker child
and process group exited, with no forced termination. Native receipt:
committed-2a64a166/result.json, observed September 8, 2026 at 01:59:02 UTC
on exact head 2a64a166993df868a30c1da3e70b7063a218c4e1.
Worker blob 575ced5823f28c6e9210a7fec31b836d6240f455; deployment config blob
43f3a2610eede9f9430b3fc51af7b55d35f73aff.

Limits: this is a local real-Worker proof with controlled GitHub transport,
not live production or live GitHub acquisition. It does not prove a deployment,
subscription change, or recovery of unrelated status errors. No production
credentials or production deployment, queue, or settings changes were used;
no cache flush occurred.
Earlier harness failures are retained separately; they are not reported as passes.

Select bounded GitHub polling for this deployment without workflow read-model reads, repairs, or missing-subscription warnings. Preserve webhook-first defaults, shared secret checks, caches, freshness, and genuine acquisition errors.

Add focused source-selection and cache/coalescing coverage. Operational release context remains here and in the PR body under the release-only changelog policy.
@clawsweeper

clawsweeper Bot commented Sep 8, 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.

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 8, 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 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. labels Sep 8, 2026
@clawsweeper

clawsweeper Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 7, 2026, 10:05 PM ET / September 8, 2026, 02:05 UTC.

ClawSweeper review

What this changes

Adds an explicit dashboard polling setting that skips workflow webhook snapshot reads, repairs, and subscription warnings while preserving existing health reporting and caches.

Merge readiness

✅ Ready for maintainer review

The change remains useful on the pinned main revision, and no actionable defect was found. The supplied real-Worker proof supports the intended behavior; this member-authored PR is not eligible for cleanup closure.

Priority: P2
Reviewed head: 2a64a166993df868a30c1da3e70b7063a218c4e1

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused implementation with convincing bounded runtime proof and compatibility coverage; no actionable correctness or security finding remains.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The captured exact-head transcript exercises dashboard/worker.ts through HTTP /api/status under Wrangler/workerd with native Durable Objects and real HTTP fixture transport, showing polling skips workflow reads/repairs while preserving default behavior, refresh, caches, and upstream-error reporting; it does not claim live deployment recovery.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The captured exact-head transcript exercises dashboard/worker.ts through HTTP /api/status under Wrangler/workerd with native Durable Objects and real HTTP fixture transport, showing polling skips workflow reads/repairs while preserving default behavior, refresh, caches, and upstream-error reporting; it does not claim live deployment recovery.
Evidence reviewed 7 items Applicable repository policy: Read the full root AGENTS.md. No nested AGENTS.md or maintainer-note files were found under the affected directories. Applied the read-only, proof, Bay-impact, and member-authored closure rules.
Introduced production behavior: The complete pinned diff gates workflow reads, fallback warnings, run repair, and job repair on the resolved source; it also separates in-flight refresh identity. Existing polling, secret checks, storage formats, and public projection remain intact.
Still necessary on pinned main: Main still selects workflow snapshot acquisition from the shared signing secret. Searching main's dashboard and docs found no workflow-source selector, so the branch supplies a distinct configuration capability.
Findings None None.
Security None None.

How this fits together

The dashboard Worker collects GitHub workflow runs and jobs to report automation health. It can reuse webhook-backed snapshots or poll GitHub, then publishes a cached, observer-only status projection for the dashboard and Bay.

flowchart TD
  A[Deployment setting] --> B{Workflow source}
  B -->|Poll| C[Bounded GitHub reads]
  B -->|Webhook| D[Workflow snapshots]
  D -->|Unavailable| C
  C --> E[Health and job summaries]
  D --> E
  E --> F[Cached dashboard and Bay status]
Loading

Before merge

None.

Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Net implementation growth Production TypeScript +19; deployment config +1; tests +204 The small production increase centralizes source selection, with most growth devoted to compatibility and cache coverage.

Technical review

Best possible solution:

Keep workflow acquisition explicitly configurable at the dashboard boundary while retaining webhook defaults, bounded polling, existing cache expiry, and the unchanged Bay contract.

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

Not applicable as a strict existing-behavior bug: this adds an explicit acquisition mode. Main's secret-based selection is source-confirmed, and the supplied Worker transcript demonstrates the new mode.

Is this the best way to solve the issue?

Yes. A dashboard-owned selector reuses the established acquisition paths and preserves unset behavior, avoiding changes to shared signing credentials or unrelated consumers.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This is a bounded dashboard configuration improvement that removes misleading subscription warnings and unnecessary repair traffic.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The captured exact-head transcript exercises dashboard/worker.ts through HTTP /api/status under Wrangler/workerd with native Durable Objects and real HTTP fixture transport, showing polling skips workflow reads/repairs while preserving default behavior, refresh, caches, and upstream-error reporting; it does not claim live deployment recovery.
  • proof: sufficient: Contributor real behavior proof is sufficient. The captured exact-head transcript exercises dashboard/worker.ts through HTTP /api/status under Wrangler/workerd with native Durable Objects and real HTTP fixture transport, showing polling skips workflow reads/repairs while preserving default behavior, refresh, caches, and upstream-error reporting; it does not claim live deployment recovery.

Evidence

What I checked:

  • Applicable repository policy: Read the full root AGENTS.md. No nested AGENTS.md or maintainer-note files were found under the affected directories. Applied the read-only, proof, Bay-impact, and member-authored closure rules. (AGENTS.md:1, 2a64a166993d)
  • Introduced production behavior: The complete pinned diff gates workflow reads, fallback warnings, run repair, and job repair on the resolved source; it also separates in-flight refresh identity. Existing polling, secret checks, storage formats, and public projection remain intact. (dashboard/worker.ts:4348, 2a64a166993d)
  • Still necessary on pinned main: Main still selects workflow snapshot acquisition from the shared signing secret. Searching main's dashboard and docs found no workflow-source selector, so the branch supplies a distinct configuration capability. (dashboard/worker.ts:7641, b6297c4b6272)
  • Regression coverage and compatibility: Read the complete test diff: polling ignores usable and unusable workflow snapshots, retains unrelated durable reads and job caches, preserves incomplete censuses and errors, and separates different-source refreshes. Documentation explicitly preserves unset/webhook behavior and normal cache expiry. Tests were not executed during this read-only review. (test/dashboard-worker-dashboard-status.test.ts:291, 2a64a166993d)
  • Real behavior proof and review continuity: The captured body at source revision f7134367f8267ea7e42ad95d07b55574c0c38a735237bbf3997366e990385ab9 reports seven scenarios through the actual Worker HTTP entrypoint using Wrangler/workerd, native SQLite Durable Objects, and loopback GitHub HTTP fixtures. It records 68 requests, polling with zero workflow reads/repairs, retained default behavior, refresh discovery, ETag revalidation, and an upstream 503 producing unknown health. The stated head and Worker/config blobs match this review. The previous completed review covered the same head with no findings; no rank-up moves were published. Source: fix(dashboard): avoid webhook warnings in polling mode #1486. (2a64a166993d)
  • Historical routing and inspection limits: Available main history identifies Vincent Koc's dashboard cache work and Peter Steinberger's workflow-health revalidation work. Raw commit records confirm those author names and recorded parents. Deeper pickaxe/blame and release-source inspection encountered missing local blobs; the attempted remote retrieval failed because github.com could not resolve. No line-introduction or shipped-release attribution is claimed. (dashboard/worker.ts, b6297c4b6272)

Likely related people:

  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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-09-08T02:02:40.686Z sha 2a64a16 :: needs maintainer review before merge. :: none

@vincentkoc
vincentkoc marked this pull request as ready for review September 8, 2026 02:14
@clawsweeper

clawsweeper Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: fix(dashboard): avoid webhook warnings in polling mode This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@vincentkoc
vincentkoc merged commit da1f56d into main Sep 8, 2026
26 checks passed
@vincentkoc
vincentkoc deleted the fix-dashboard-polling-mode-20260908 branch September 8, 2026 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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