Repository navigation
feat(bin): add a single-owner absorption veto and an opt-in already-presented stale absorption rule - #51
Merged
Conversation
…resented stale absorption rule absorb_vetoed (bin/fm-classify-lib.sh) is now asked first by Jev absorb-try, the unchanged-pause rule, and the new config/absorb-presented-stale rule: terminal status prefixes, open decisions, unread notes, and check/heartbeat/ merge reasons are never absorbed. The new rule absorbs a stale re-surface of a worker parked on a terminal status already surfaced with nothing appended since, bounded by FM_PAUSE_REMIND_SECS, off by default. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Firstmate repo (shared tracked material; firstmate-coding-guidelines applies). Implement recommendations 2 and 3 of the Jev miss analysis (data/jev-miss-analysis/report.md). Rule 2: a deterministic, explicit, single-owner, unit-tested veto that runs ahead of any model (Jev absorption) and any existing absorb path (absorb-try, config/absorb-unchanged-pause): never absorb a wake whose latest status line starts with done:, needs-decision:, blocked:, failed:, or resolved:, or whose reason carries the other markers the report lists (merged, heartbeat, check, inactive terminal outcome, open decisions, unread status). Implemented as absorb_vetoed in bin/fm-classify-lib.sh, called by cmd_absorb_try and rule_absorb_unchanged_pause. Rule 3: a new model-free opt-in gate config/absorb-presented-stale (off by default, in the style of config/absorb-unchanged-pause) that absorbs a stale re-surface of a worker parked on an already-presented terminal status (done/failed, or still-open needs-decision/blocked awaiting the captain), when nothing changed since that presentation: proof is the .hb-surfaced- line plus a new .sig companion (status log size:mtime) written by mark_surfaced, so any appended line, even a repeat, defeats it; safety valve re-surfaces once per FM_PAUSE_REMIND_SECS; never absorb when the status log gained any new line. Rule 3 is the only absorber allowed to relax the veto status/open-decision checks (presented mode), and only because it proves them. Document concisely in docs/configuration.md and the AGENTS.md config list, tests colocated (tests/fm-watch-triage.test.sh, tests/fm-jev.test.sh). Keep rule 3 off by default. Do not change Jev model behaviour. Known: tests/fm-watch-triage.test.sh test 'authoritative working state did not start wedge tracking' is a load-only flake (3s budget), unrelated.
What Changed
absorb_vetoedtobin/fm-classify-lib.sh. It is now the only place that decides a wake must never be absorbed. It vetoes any wake whose latest status line isdone:,needs-decision:,blocked:,failed:orresolved:. It also vetoes merge, check and heartbeat reasons, inactive terminal outcomes, open decisions and unread notes.cmd_absorb_tryinbin/fm-jev.shchecks it before any other rule and before any model call. The existingconfig/absorb-unchanged-pauserule checks it too.config/absorb-presented-stale, inbin/fm-watch.sh. It is off by default. It absorbs a stale re-surface of a worker parked on a terminal or still-open status that the captain has already been shown, as long as nothing changed since then. To prove that,mark_surfacednow also writes a.sigfile next to.hb-surfaced-<task>holding the status log's size:mtime. Any appended line changes that signature and defeats the rule, even a repeated line. The wake still re-surfaces once everyFM_PAUSE_REMIND_SECS. This is the only absorber allowed to relax the veto's status and open-decision checks.docs/configuration.md, theAGENTS.mdconfig list and the absorption-digest comment inbin/fm-wake-drain.sh. Added tests intests/fm-watch-triage.test.shandtests/fm-jev.test.sh.🤖 Generated with Claude Code
Risk Assessment
✅ Low: The veto only adds refusals ahead of existing absorbers, and rule 3 is off by default with strict proof checks (the recorded line and a size:mtime signature must both match, plus a FM_PAUSE_REMIND_SECS valve), so a wrong answer can only over-surface a wake, never under-surface one.
Testing
I ran the two colocated test suites (fm-watch-triage and fm-jev) in full. Both exited 0 with no failures, including the known load flake. The new tests check the veto against the terminal-status prefixes and the other listed markers, including open decisions and unread notes. They also check that the unchanged-pause and Jev paths are gated behind the veto, and that the presented-stale rule absorbs only when nothing was appended. That rule stays off by default and keeps surfacing when there are unread notes. This is CLI-only logic, so there is no UI evidence; the TAP logs are recorded as artifacts.
Evidence: fm-watch-triage TAP log
Source: fm-watch-triage TAP log
Evidence: fm-jev TAP log
Source: fm-jev TAP log
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
bash tests/fm-watch-triage.test.sh: covers the absorb_vetoed prefixes and markers, the presented-mode relaxation, the unchanged-pause rule behind the veto, presented-stale absorption with source=rule, off by default, and an unread note keeping the stale surfacingbash tests/fm-jev.test.sh: the deterministic veto refuses terminal statuses, check, heartbeat and merge reasons, and unread notes before any model call✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.