Repository navigation
feat(bin): add a deterministic unchanged-pause absorption rule - #48
Merged
Merged
Conversation
added 6 commits
September 28, 2026 10:28
config/absorb-unchanged-pause (off by default) absorbs a declared-pause "stale" recheck the watcher's own comparison already found unchanged, without calling any classifier: it requires the task has no open decision and its agent is not dead, and is tried before Jev at the same recheck point, falling through to Jev then to a real surface exactly as if it were off. A per-task safety-valve marker (state/.rule-absorbed-since-<key>, bounded by the existing FM_PAUSE_REMIND_SECS default) forces one real, human-visible surface after continuous absorption, then resets. Every absorbed row shares the Jev path's durable digest, tagged source: "rule" so bin/fm-jev.sh report keeps measuring the model only on what this rule did not already take; jev-sourced rows are now tagged source: "jev" for the same reason. JEV_JQ_MASK/jev_mask moved to bin/fm-jev-lib.sh, the one owner shared by bin/fm-jev.sh and this new rule.
…-pause absorption rule
Per accepted intent's source-comment cap; the review pass's fix for this finding did not land, so applying it directly as a follow-up.
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
Add a deterministic (no-model) absorb rule on top of the just-shipped gated Jev wake absorption (PR #47, now on main): the local Jev classifier's shadow report over 1.3 days showed 0 wrongly absorbable but only 6.4% agreement, because nearly all the noise is one well-understood shape - a declared-pause 'stale' recheck on the long cadence, unchanged since the previous recheck (paused Slack gateway tasks, an MR awaiting merge, a tool install) - that the 1.7B model reads as needing attention. Add a rule path that absorbs exactly that shape WITHOUT calling the model. Absorb only when ALL hold: the wake is the watcher's declared-pause long-cadence recheck; the watcher's own structured comparison (not a regex on the reason text) already found nothing changed since the previous recheck; the task's latest status is paused: (never blocked/needs-decision/done/failed, and never a captain-held transfer); the task has no open decision; no new unread status line since the last presentation; no PR/check result, heartbeat, inbox note, Relay or procevent row. Its own config switch (config/absorb-unchanged-pause), off by default, independent of the Jev go-live gate since a fixed rule needs no calibration. Document it next to the Jev section in docs/configuration.md and the AGENTS.md config list. Same 'nothing is lost' contract as the Jev path: absorbed rows go to the durable digest, surfaced with the next real wake or heartbeat; acknowledgement never strands rows; never absorb (surface for real instead) when the digest entry cannot be built or written. Log rule absorptions distinctly (source=rule) so bin/fm-jev.sh report keeps model agreement separate and still measures the model only on what the rule did not take. Keep a safety valve: a paused task absorbed continuously for a long time still surfaces once per day (or at heartbeat), so a forgotten wait is not silent forever. Tests for each refusal (open decision, blocked, changed since last recheck, new status line, non-pause wake, dead agent, captain-held, undigestable) and for digest surfacing. Source comments max 3 lines. Never add an agent co-author trailer. This run's own follow-up: firstmate decided to fix the prior review's still-open source-comment-length finding directly since the pipeline's own fix for it did not land; that fix is already committed (68fcae9) and just needs revalidating.
What Changed
bin/fm-watch.shgets a model-free absorb path, behind its own switchconfig/absorb-unchanged-pause(off unless the first non-blank line ison, and separate from the Jev go-live gate). It runs before Jev on a due "paused, awaiting external" recheck. It absorbs only when all of these hold:pausedand is not captain-relevant;jqis available;If any check fails, the recheck goes on to Jev and then to a real surface. A per-window
.rule-absorbed-since-<key>marker is the safety valve: once the rule has absorbed a task continuously forFM_PAUSE_REMIND_SECS, it refuses so the task gets one real surface. The marker is cleared whenever the recheck surfaces or pause state is cleared.The absorption digest is shared by both paths:
JEV_JQ_MASK/jev_maskmoved frombin/fm-jev.shintobin/fm-jev-lib.shso the rule masks text with the same filter.source: "jev"orsource: "rule".bin/fm-wake-drain.shprintsvia <source>and falls back tojevwhen the field is missing, and it prints confidence only when it is a number._fm_jev_absorb_appendnow returns nonzero when the digest can't be written, so the rule surfaces the recheck instead of absorbing it.Docs and tests:
docs/configuration.mdhas a new "Deterministic unchanged-pause absorption" section, andAGENTS.mdlists the new config file and state marker.tests/fm-watch-triage.test.shcover:tests/fm-jev.test.shchecks the drain's per-source digest labels.Risk Assessment
✅ Low: The new rule is off by default. It checks the same eligibility as the Jev absorb path (status file present, not a secondmate, no open decision, last line is paused and not captain-relevant, situation unchanged, agent alive, jq present), and a digest entry that can't be built or written falls through to a real surface. The concerns still open (48h valve cadence, Jev absorbing after the valve trips, gaps in refusal tests) were all declined in earlier rounds.
Testing
68fcae9 only shortens a comment. I confirmed the comment is now 3 lines and the script still parses, then ran the two targeted test files,
tests/fm-jev.test.shandtests/fm-watch-triage.test.sh. Both pass on the target commit, including all 7 new rule tests (absorb, refusals, a digest entry that can't be built or written, the safety valve). I also ran the digest drain by hand: a rule-absorbed recheck showed up tagged "via rule" with no confidence value, next to a Jev row showing its confidence, and a second drain printed nothing. This is a CLI/bash change with no UI, so the evidence is test logs and a CLI transcript, not screenshots. The worktree was left clean.Evidence: Digest surfacing transcript (rule vs jev rows, shown once)
Source: Digest surfacing transcript (rule vs jev rows, shown once)
ABSORBED (2 wakes absorbed before reaching the queue - masked reason/status kept below): 2026-09-21T14:13:20Z stale task slack-gw via rule: choice absorbable | wake: paused 86400s, awaiting external - declared pause, ... | worker: paused: waiting on MR <url> merge 2026-09-21T14:15:00Z signal task tool-install via jev: choice absorbable (0.97) | wake: status changed | worker: working: installing (second drain: exit 0, no output)Evidence: fm-watch-triage test log (rule tests)
Source: fm-watch-triage test log (rule tests)
ok - the deterministic rule absorbs a fresh unchanged declared-pause recheck and records it in the digest as source=rule ok - the rule refuses a changed situation and a task with an open decision, surfacing both for real ok - a dead-agent pause recheck always re-surfaces, never absorbed by the rule ok - a captain-held recheck always re-surfaces, never absorbed by the rule, even when enabled ok - the rule surfaces a recheck for real when it cannot record the digest entry ok - the rule surfaces a recheck for real when it cannot write the digest entry ok - the rule's own safety valve forces one real surface after continuous absorption, then resets its markerEvidence: fm-jev test log
Source: fm-jev test 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.
git show 68fcae9: comment-only change, the doc comment onrule_absorb_unchanged_pausegoes from 5 lines to 3bash -n bin/fm-watch.sh(parses cleanly after the comment edit)bash tests/fm-jev.test.sh: all pass, including the digest tagging each entry via jev or via rule and an absorbed wake surfacing exactly oncebash tests/fm-watch-triage.test.sh: all pass, including the 7 rule tests (absorbs an unchanged recheck as source=rule; refuses a changed situation or open decision; refuses dead-agent and captain-held rechecks; surfaces for real when the digest entry can't be built or written; the safety valve forces a real surface and then resets)Manual: sourcedbin/fm-jev-lib.shand ranfm_jev_absorb_digest_surfaceon a temp state holding one source=rule row and one source=jev row, then ran it a second time to confirm no row repeats✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.