Skip to content

fix(dashboard): keep Bay pressure trend current - #569

Merged
vincentkoc merged 5 commits into
mainfrom
fix/bay-handoff-pressure-current
Jul 14, 2026
Merged

vincentkoc merged 5 commits into
mainfrom
fix/bay-handoff-pressure-current

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Jul 14, 2026 •

Copy link
Copy Markdown
Member

Depends on #555

Carries the contributor implementation from #567 because that branch is not maintainer-editable and exact ClawSweeper review found required correctness fixes. The original brokemac79 commit and authorship remain intact in this branch.

What Problem This Solves

Fixes two misleading pressure states in OpenClaw Bay: stale persisted history could disagree with the live queue count after a best-effort write failure, and a fresh one-point series could be described as steady even though no trend existed.

Why This Change Was Made

The bounded Durable Object history and Bay chart from PR 567 are preserved. The queue /stats response overlays the current queue point onto stored history before returning it, so every consumer sees a series whose final point matches live pending, dispatching, and leased counts even when persistence failed. Bay keeps zero- and one-point series in the collecting state while still displaying the live pending count; trend language starts only after two observations. This branch is stacked on PR 555 so current pressure state and historical pressure remain one coherent status contract.

User Impact

Bay operators get the contributor-built three-hour queue trend without contradictory live counts or invented one-sample trends. Queue admission, claims, completion, polling, and GitHub API behavior are unchanged.

Evidence

  • Node v26.5.0
  • tsc -p tsconfig.dashboard.json
  • tsc -p tsconfig.json
  • Focused dashboard, smoke, and pressure tests: 113/113 passed
  • Type-aware dashboard and focused test lint passed
  • Configured format checks passed
  • git diff --check
  • Regression: one persisted history point, a failed next write, and a /stats final point matching the live count
  • Regression: one valid pressure observation preserves collecting state, live count 7, and no rendered trend line
  • Existing deterministic Chromium/Crabbox Bay proof from PR 567 remains in the preserved contributor commit; its multi-point visible output is unchanged

Exact local ClawSweeper review is clean on commit 93b7121abb; patch, proof, and overall tiers are A with no findings.

@brokemac79 brokemac79 self-assigned this Jul 14, 2026
Base automatically changed from feat/scheduler-pressure-telemetry to main July 14, 2026 14:36
@vincentkoc
vincentkoc force-pushed the fix/bay-handoff-pressure-current branch from ca76609 to 5949242 Compare July 14, 2026 15:04
@vincentkoc
vincentkoc marked this pull request as ready for review July 14, 2026 15:18
@vincentkoc
vincentkoc merged commit d4a4539 into main Jul 14, 2026
7 checks passed
@vincentkoc
vincentkoc deleted the fix/bay-handoff-pressure-current branch July 14, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants