Skip to content

Soak test: long-run daemon health tripwires (#101) - #103

Merged
hsliuustc0106 merged 1 commit into
mainfrom
feature/soak-test
Oct 4, 2026
Merged

hsliuustc0106 merged 1 commit into
mainfrom
feature/soak-test

Conversation

@hsliuustc0106

Copy link
Copy Markdown
Contributor

Implements #101 — the first guard for slow failure modes now that the daemon really runs for days. One offline test compresses a ~10-simulated-day daemon lifetime (3,000 RunnerDaemon.tick() calls, fake clock, real SQLite) with the full stage-2 watch kit, periodic conclusion flips and new commits, and asserts the budgets from the issue: bounded steady-state memory (<1 MB growth, <10 MB peak, tracemalloc after warmup), no per-tick latency drift (last-200 mean ≤ 3× first-200 mean), observation retention ≤ 20 after the whole run, DB < 10 MB, and functional sanity (digests ≈ days, stale + flaky fire, task stays ACTIVE).

Budgets are tripwires — widening any requires a finding, not a fix. Measured ~7s with tracing active (~3s untraced); suite now 708 passing, demo 8/8.

One compressed daemon lifetime: 3,000 scheduler ticks (~10 simulated
days) via the fake clock against real SQLite — one watch with the full
stage-2 kit (digest/stale/flaky, never completing), a conclusion flip
every 500 ticks and a new commit every 1,500 so every watch kind and the
statemachine transitions fire repeatedly.

Budgets are generous tripwires, not benchmarks; widening one requires a
finding, not a fix:

- steady-state traced-memory growth < 1 MB; traced peak < 10 MB
- last-200-tick mean latency ≤ 3x first-200 mean (+5ms) — no drift with
  accumulated history
- check-observed retention ≤ OBSERVATION_RETENTION after the whole run
- SQLite < 10 MB for the simulated fortnight
- digests ≈ simulated days; stale and flaky both fire; the watch ends
  ACTIVE and schedulable

Measured ~7s with tracemalloc active (~3s untraced); the suite grows
accordingly. 708 pass; demo 8/8.
@hsliuustc0106
hsliuustc0106 merged commit a7b3269 into main Oct 4, 2026
4 checks passed
@hsliuustc0106
hsliuustc0106 deleted the feature/soak-test branch October 4, 2026 03:20
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