#4885·gastown

daemon wisp_reaper fans delete_age onto stale_issue_age, overriding the formula's 30d default — live P2 issues auto-closed every 6h

Author: SaulGarzaCreated Sep 25, 2026Updated Sep 26, 2026
Labelsstatus/needs-triage

Version: gt HEAD-649b832 (Homebrew gastown HEAD-649b832 1.1.0).

The daemon's wisp_reaper patrol config supplies delete_age, and that single value is fanned out to three distinct formula variables — including stale_issue_age, which controls issue auto-close. For two of the three that is correct; for stale_issue_age it is wrong by 4x, and the result is that live defect beads are auto-closed every 6 hours.

The conflation

mol-dog-reaper.formula.toml declares four independent age vars with deliberately different defaults:

var default meaning
max_age 24h max wisp age before reaping
purge_age 7d max closed wisp age before purging
mail_delete_age 7d max closed mail age before purging
stale_issue_age 30d max issue staleness before AUTO-CLOSE

mayor/daemon.json supplies only two:

json
"wisp_reaper": { "enabled": true, "interval": "6h", "max_age": "24h", "delete_age": "168h" }

The dispatched run received:

stale_issue_age=168h   purge_age=168h   mail_delete_age=168h   max_age=24h

purge_age and mail_delete_age both default to 7d = 168h, so for those the fan-out is harmless. stale_issue_age ships as 30d = 720h. So a knob named for wisp/mail purging silently sets the issue auto-close threshold, cutting it from 30 days to 7.

Impact

interval is 6h, so this fires four times a day. Any P2 issue untouched for 7 days is closed — and a P2 defect untouched for 8 days is the normal state of a P2 defect, so this bleeds the backlog continuously and silently. Closed beads then vanish from every subsequent bd list --status open, so the loss is invisible unless you go looking for close reasons.

One observed sweep closed 34 beads, 8 of them live defect records with triage history (one had been commented on the same day it was closed). All 8 survive at the 30d default. A later sweep took four agent-identity beads. Every casualty carries Close reason: stale:auto-closed by reaper.

The P0/P1 exclusion works as designed and protected those priorities; the override simply sweeps the band that exclusion does not cover.

Reproduce

Configure patrols.wisp_reaper with delete_age: 168h and no explicit stale_issue_age, let a cycle dispatch, then inspect the run wisp's rendered step text — it shows stale_issue_age=168h rather than the formula's 720h.

Fix

Preferred: stop mapping delete_age onto stale_issue_age. They are semantically unrelated — one purges already-closed wisps and mail, the other closes live issues.

Secondary: honour an explicit stale_issue_age key in daemon.json (it is not clear that it is currently read at all — setting it locally produced no observable change I could attribute, and there is no config-validate subcommand to check against). Failing both, the only workaround is enabled: false, which also stops legitimate wisp reaping.