Honour a declared pause for a live worker, and archive finished-task clutter #14
Loading…
Reference in a new issue
No description provided.
Delete branch "fm/parked-cadence-and-prune"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Two causes of the same symptom: firstmate re-notifying about work that is finished and parked.
The cadence fix. The watcher never applied the long
PAUSE_RESURFACE_SECScadence to a worker whose agent was still alive.pause_state_classconsulted liveness before the declaration, so an alive parked worker returnednoneon every pass and was re-surfaced everySTALE_ESCALATE_SECSinstead. Thirteen parked workers turned that into a continuous stream of notifications. An authoritative running pipeline still outranks the declaration, and a pane FIRST sighting still surfaces immediately, so a live external-decision gate is never hidden behind the long cadence.The retention sweep. Nothing pruned
data/<id>/folders orstate/markers after teardown: 188 folders and 1391 state files had accumulated, nearly all for tasks torn down weeks earlier, and orphaned turn-end markers kept generating wakes for tasks that no longer exist.bin/fm-prune-state.sharchives them - it never deletes, never touches a task that still has metadata, and never touches the durable home records.Both regressions were proven red. With the cadence fix removed the new test surfaces the parked pane; with the sweep neutered its test finds the report unarchived.
Verified locally: full
tests/fm-watch-triage.test.shsuite passes,tests/fm-prune-state.test.shpasses, shellcheck clean. Observed in production for two hours before this PR: 45 minutes of silence followed by correctly-labelled hourly rechecks, replacing a notification every four minutes.