Sweep the leaked fixture rows from the live swarm.db so Loss/limit telemetry is honest (part 3 of #116) #117

Closed
opened 2026-08-30 05:08:18 +00:00 by matou-build-agent · 1 comment

This was generated by AI during triage.

Follow-up to #116, carved out because it is a different kind of work than the fix.

Ask (part 3 of #116)

Sweep the already-leaked fixture rows from the live host telemetry db ~/swarm/state/swarm.db on matou-workstation so the Loss/limit calibration (#100) is honest again:

  • events: the limit-pause | park/unpark rows whose evidence is a /tmp/tmp.* marker path and whose run_id=limit-park — named in #116: ids 3566/3571, 3554/3559, 3446/3451, plus any siblings matching the same shape (evidence LIKE /tmp/tmp.%/limit-marker).
  • runs: the fixture rows triage-x-y-1788049474-* and heal-x-y-1788049476-* (repo x/y / test fixture), and any siblings with a x/y repo or the *-x-y-* run-id shape.

Verify the exact set with a SELECT before any DELETE, and scope the DELETE to the proven fixture predicate only.

Why human

Data destruction against a live production telemetry db on a specific host (~/swarm/state/swarm.db, matou-workstation) — a one-way door under the two-way-door doctrine (ADR 0174), and it needs the host's own state, not a swarm container's. swarm-db.py currently exposes no prune/delete subcommand (only run/event/query/sweep-orphans), so the sweep is a hand-authored SQL DELETE (or a new, reviewed prune subcommand) run against the live file — outside any test's reach by construction.

Sequencing

Do this after #116 lands, otherwise fresh fixture rows keep arriving from the test suite and the sweep is immediately re-dirtied. #116 is the prevention (test isolation + a guard with teeth); this is the one-time cleanup.

> *This was generated by AI during triage.* Follow-up to #116, carved out because it is a different kind of work than the fix. ## Ask (part 3 of #116) Sweep the already-leaked fixture rows from the **live** host telemetry db `~/swarm/state/swarm.db` on matou-workstation so the Loss/limit calibration (#100) is honest again: - **`events`**: the `limit-pause | park/unpark` rows whose `evidence` is a `/tmp/tmp.*` marker path and whose `run_id=limit-park` — named in #116: ids **3566/3571**, **3554/3559**, **3446/3451**, plus any siblings matching the same shape (evidence LIKE `/tmp/tmp.%/limit-marker`). - **`runs`**: the fixture rows `triage-x-y-1788049474-*` and `heal-x-y-1788049476-*` (repo `x/y` / test fixture), and any siblings with a `x/y` repo or the `*-x-y-*` run-id shape. Verify the exact set with a `SELECT` before any `DELETE`, and scope the DELETE to the proven fixture predicate only. ## Why human Data destruction against a **live** production telemetry db on a specific host (`~/swarm/state/swarm.db`, matou-workstation) — a one-way door under the two-way-door doctrine (ADR 0174), and it needs the host's own state, not a swarm container's. `swarm-db.py` currently exposes **no** prune/delete subcommand (only run/event/query/sweep-orphans), so the sweep is a hand-authored SQL DELETE (or a new, reviewed `prune` subcommand) run against the live file — outside any test's reach by construction. ## Sequencing Do this **after** #116 lands, otherwise fresh fixture rows keep arriving from the test suite and the sweep is immediately re-dirtied. #116 is the prevention (test isolation + a guard with teeth); this is the one-time cleanup.
Author
Member

Swept via a new reviewed subcommand, swarm-db.py prune-fixtures (dry-run by default, --apply to delete), landed in 8868321 with its test and journal entry docs/journal/2026-10-21-117.md.

Applied to ~/swarm/state/swarm.db on matou-dev-server-01, which holds the ids named here (3446/3451, 3554/3559, 3566/3571). A backup was taken first: swarm.db.pre-117-20261021T222259Z.bak, integrity_check ok.

  • Deleted: 331 runs (79 x/y, 52 heal-x-y-* filed under Matou/dev-factory, 200 Acme/widget), 183 events (52 /tmp/tmp.*/limit-marker parks + 131 run children), 131 processes.
  • Totals: runs 17286 → 16955, events 47438 → 47255. integrity_check ok; a second dry-run reports 0.
  • No new leaks: no fixture-shaped row postdates #116.
  • Kept on purpose: the 10 limit-park unpark … window reset rows of 2026-09-01. Each closes a real park from that day. They are written in same-second duplicate pairs, a live bug filed as #298.

Not done: if matou-workstation (the host the body names) has its own swarm.db, run python3 swarm-db.py prune-fixtures there as a dry-run first.

Posted by AI from a Floor thread, at ben's request.

Swept via a new reviewed subcommand, `swarm-db.py prune-fixtures` (dry-run by default, `--apply` to delete), landed in `8868321` with its test and journal entry `docs/journal/2026-10-21-117.md`. Applied to `~/swarm/state/swarm.db` on **matou-dev-server-01**, which holds the ids named here (3446/3451, 3554/3559, 3566/3571). A backup was taken first: `swarm.db.pre-117-20261021T222259Z.bak`, `integrity_check ok`. - **Deleted:** 331 runs (79 `x/y`, 52 `heal-x-y-*` filed under `Matou/dev-factory`, 200 `Acme/widget`), 183 events (52 `/tmp/tmp.*/limit-marker` parks + 131 run children), 131 processes. - **Totals:** runs 17286 → 16955, events 47438 → 47255. `integrity_check ok`; a second dry-run reports 0. - **No new leaks:** no fixture-shaped row postdates #116. - **Kept on purpose:** the 10 `limit-park` `unpark … window reset` rows of 2026-09-01. Each closes a real park from that day. They are written in same-second duplicate pairs, a live bug filed as #298. Not done: if matou-workstation (the host the body names) has its own `swarm.db`, run `python3 swarm-db.py prune-fixtures` there as a dry-run first. *Posted by AI from a Floor thread, at ben's request.*
matou-build-agent 2026-10-21 22:37:59 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/dev-factory#117
No description provided.