Problem
A decommissioned probe install keeps everything forever. Observed under ~/.agentworkforce/probe/:
bc637…: all 9 delivery jobs cancelled, no config.json, yet history.db is 3.8 GB + 202 MB WAL, delivery_journal holds 14.5k rows / 99 MB (retained_bytes 37% of cap), and collector.log is 307 MB.
- The live install's
collector.log is 55 MB after two days.
Nothing reclaims journal rows once no subscription exists, nothing rotates collector.log, and nothing removes an install's directory when it is decommissioned.
Fix
- When no non-cancelled job / subscription remains, compaction drops the whole journal and shadow tables (nothing can consume them).
collector.log rotates (10 MB, keep 3).
- Decommissioning an install (cloud uninstall, account switch,
installs listing an entry with no config.json) removes its directory after the collector is stopped; installs --json never lists a directory without a valid config.
Related: #53 (evidence-table retention for the history database itself — separate concern).
Acceptance
- Test: cancelling the last job leaves
delivery_journal and delivery_shadow empty after the next compaction and retained_bytes at 0.
- Test: log rotation keeps the file under the cap.
- Test: an install directory without
config.json is removed by the decommission path and absent from installs --json.
Problem
A decommissioned probe install keeps everything forever. Observed under
~/.agentworkforce/probe/:bc637…: all 9 delivery jobscancelled, noconfig.json, yethistory.dbis 3.8 GB + 202 MB WAL,delivery_journalholds 14.5k rows / 99 MB (retained_bytes37% of cap), andcollector.logis 307 MB.collector.logis 55 MB after two days.Nothing reclaims journal rows once no subscription exists, nothing rotates
collector.log, and nothing removes an install's directory when it is decommissioned.Fix
collector.logrotates (10 MB, keep 3).installslisting an entry with noconfig.json) removes its directory after the collector is stopped;installs --jsonnever lists a directory without a valid config.Related: #53 (evidence-table retention for the history database itself — separate concern).
Acceptance
delivery_journalanddelivery_shadowempty after the next compaction andretained_bytesat 0.config.jsonis removed by the decommission path and absent frominstalls --json.