Skip to content

release: v0.13.7 — stop the execution progress event storm - #69

Merged
mai1015 merged 1 commit into
mainfrom
release/v0.13.7
Sep 27, 2026
Merged

mai1015 merged 1 commit into
mainfrom
release/v0.13.7

Conversation

@mai1015

@mai1015 mai1015 commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Problem

A running Task flooded the server: every CLI agent log line appended an execution.progressed domain event (plus a receipt row per consumer, an Attention resolve, and an SSE frame). Measured on the host: ~300 events/min, 392k receipt rows (~165 MB), 57% iowait, 512 slow-statement warnings in a day (PK updates taking 7 s). Browsers refetched Project lists/analytics per frame (~600 req/min). POST /tasks/{id}/recover took 15–18 s because its write transaction queued behind this; normal latency is ~0.5 s.

Changes

  • record_progress only updates last_progress_at; it appends execution.progressed only when progress ends a warned stall epoch (that event resolves the Attention item).
  • CLI runner and daemon log paths write progress at most once per second (same interval as the native path).
  • Migration V146 deletes stored per-line execution.progressed events not referenced by other durable rows.
  • domain_event.committed SSE frames add domain_event_type / domain_entity_id; the web client refreshes only the owning Task for liveness events.
  • Project-scoped frames invalidate exact Project summary/list keys, don't cancel in-flight refreshes, and coalesce to one refresh per 500 ms (unshipped 9/25 fix, see docs/diagnostics/).
  • Version 0.13.7, CHANGELOG, docs/api.md, docs/architecture.md.

Verification

Focused: db lease/migration tests, services liveness + attention + daemon throttle tests, api event_publication_audit, web sse.test.ts (30), typecheck, eslint, clippy -D warnings, fmt. V146 SQL checked against a copy of a dev DB.

🤖 Generated with Claude Code

Every line of CLI agent output appended an execution.progressed domain
event, a receipt per consumer, an Attention resolve and an SSE frame, and
every open browser refetched Project lists and analytics for each frame.
On a busy host this saturated IO and the SQLite write lock, which also made
POST /tasks/{id}/recover take 15-18s.

- last_progress_at advances at most once per second for CLI and daemon
  executions; execution.progressed is stored only when progress clears a
  stall warning. V146 deletes the stored per-line events.
- domain_event.committed frames carry domain_event_type/domain_entity_id;
  the web client refreshes only the affected Task for liveness events.
- Project-scoped frames refresh the exact Project summary/list, don't
  cancel in-flight refreshes, and coalesce bursts to one per 500ms.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@mai1015
mai1015 merged commit bcdd402 into main Sep 27, 2026
10 checks passed
@mai1015
mai1015 deleted the release/v0.13.7 branch September 27, 2026 21:06
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.

1 participant