Skip to content

fix(fm-watch): guard staleness auto-close reap with live pane focus - #114

Merged
trillium merged 8 commits into
mainfrom
fm/fm-hfg-6e
Aug 11, 2026
Merged

trillium merged 8 commits into
mainfrom
fm/fm-hfg-6e

Conversation

@trillium

@trillium trillium commented Aug 11, 2026 •

Copy link
Copy Markdown
Owner

Intent

Guard the firstmate watcher's idle>2h staleness auto-close reap with live pane-focus so a pane a human is actively or recently viewing in its herdr pane is not reclaimed mid-review; plus follow-up review fixes: validate the FM_STALENESS_FOCUS_GRACE_SECS override at load time (non-numeric/empty reverts to the 300s default) and fix the AGENTS.md reap-doc sentence grammar.

What Changed

  • Added a human-conversation guard to the watcher's idle>2h staleness auto-close reclaim: on a herdr backend, staleness_focus_stamp touches state/.focus-<key> on every idle poll the pane is observed focused, and staleness_focus_guard_blocks_reap blocks the reclaim while the pane is focused now or was focused within FM_STALENESS_FOCUS_GRACE_SECS (default 300s); an unreadable focus errs toward not reaping, bounded by FM_STALENESS_AUTOCLOSE_MAX_RETRIES consecutive unknown polls, while na/unsupported backends skip the guard so a focus-less backend can never wedge the reap. Blocked skips are logged and never consume the retry budget; the focus markers are cleared on hash change and successful reclaim.
  • Added fm_backend_herdr_pane_focus_state (reading .result.pane.focused via the herdr socket API, distinguishing focused/unfocused/unsupported/unknown) and its fm_backend_pane_focus_state dispatch wrapper as read-only focus queries.
  • Validated the FM_STALENESS_FOCUS_GRACE_SECS override at load time (non-numeric or empty reverts to the 300s default), documented the new tunable in docs/configuration.md/docs/architecture.md and the .focus-* state files in AGENTS.md (also fixing the reap-doc sentence grammar), and added tests/fm-watch-triage.test.sh coverage for the focus guard.

Risk Assessment

✅ Low: The change is a well-bounded, backend-gated guard with a load-time input sanitize and a doc/grammar fix, all three intent requirements are satisfied, control flow and marker lifecycle are correct, and it is covered by behavior-based tests.

Testing

Exercised the focus-guard behavior directly against the real watcher/backend functions rather than source text: 14 new behavioral tests pass and the full fm-watch-triage suite passes 70/0 with the pre-existing non-herdr no-op reap tests intact (no regression). An end-to-end captain-review lifecycle demonstrates a focused or recently-focused herdr pane blocks the idle>2h reclaim (with captain-visible triage-log lines) while a truly-idle pane past the grace window reaps as before, and a 10-input sweep confirms non-numeric/empty FM_STALENESS_FOCUS_GRACE_SECS reverts to 300 at load time while valid digits pass through. The AGENTS.md grammar fix is prose-only and was verified by inspection. This is a CLI/watcher-internal change with no rendered UI surface, so evidence is CLI transcripts rather than screenshots.

Evidence: End-to-end captain-review lifecycle (focused->blocked, glance-away within grace->blocked, grace elapsed->reap allowed) with watcher triage-log output

=== Scenario: an idle>2h working: ship pane the captain is actively reviewing in its herdr pane === poll -> live focus reads: focused ; recency marker present: yes RESULT: reclaim BLOCKED (captain keeps the pane mid-review) === Scenario: captain glances away; pane now unfocused but was focused <5min ago === poll -> live focus reads: unfocused ; recency marker still fresh (age 0s < 300s) RESULT: reclaim BLOCKED (grace window forgives the glance-away) === Scenario: grace window elapses (last focus older than 300s), pane truly idle === poll -> live focus reads: unfocused ; recency marker age 3600s >= 300s RESULT: reclaim ALLOWED (nobody watching -> auto-close proceeds as before) === Captain-visible triage log the watcher wrote during the above === [..] staleness auto-close skipped for sess:shipwin:p7 (task task-ship-42): pane is focused by a human [..] staleness auto-close skipped for sess:shipwin:p7 (task task-ship-42): pane focused within 300s


=== Scenario: an idle>2h working: ship pane the captain is actively reviewing in its herdr pane ===
poll -> live focus reads: focused ; recency marker present: yes
RESULT: reclaim BLOCKED  (captain keeps the pane mid-review)

=== Scenario: captain glances away; pane now unfocused but was focused <5min ago ===
poll -> live focus reads: unfocused ; recency marker still fresh (age 0s < 300s)
RESULT: reclaim BLOCKED  (grace window forgives the glance-away)

=== Scenario: grace window elapses (last focus older than 300s), pane truly idle ===
poll -> live focus reads: unfocused ; recency marker age 3600s >= 300s
RESULT: reclaim ALLOWED  (nobody watching -> auto-close proceeds as before)

=== Captain-visible triage log the watcher wrote during the above ===
    [2026-08-11T11:45:49-0700] staleness auto-close skipped for sess:shipwin:p7 (task task-ship-42): pane is focused by a human
    [2026-08-11T11:45:49-0700] staleness auto-close skipped for sess:shipwin:p7 (task task-ship-42): pane focused within 300s
Evidence: FM_STALENESS_FOCUS_GRACE_SECS load-time validation across 10 override inputs

OVERRIDE -> EFFECTIVE (unset) -> 300 '' -> 300 '900' -> 900 'not-a-number' -> 300 '300abc' -> 300 '12x3' -> 300 '-5' -> 300 '0' -> 0 ' ' -> 300 '600' -> 600

FM_STALENESS_FOCUS_GRACE_SECS load-time validation (shipped default = 300s)
The watcher sanitizes the override with: case ... in ''|*[!0-9]*) =300 ;; esac

OVERRIDE         -> EFFECTIVE
(unset)          -> 300
''               -> 300
'900'            -> 900
'not-a-number'   -> 300
'300abc'         -> 300
'12x3'           -> 300
'-5'             -> 300
'0'              -> 0
'  '             -> 300
'600'            -> 600
Evidence: Focus-guard targeted subset (14 behavioral tests, all ok)

ok - herdr focus read classifies the four outcomes: focused/unfocused, unsupported on absent key, unknown on failures ok - a currently-focused pane blocks the idle>2h auto-close and records its focus recency ok - a pane focused within STALENESS_FOCUS_GRACE_SECS still blocks the auto-close reclaim ok - an unfocused pane whose last focus is older than the grace window is allowed to reclaim ok - a malformed grace override reverts to 300 and the guard still protects a within-grace pane ok - a focus-unaware backend is a no-op that allows the reclaim exactly as before ok - capability gate: focus-capable herdr blocks the reap; a focus-less herdr build no-ops and allows it ok - an unreadable/timed-out focus query blocks the reclaim, never erroneously reaping ok - consecutive unreadable-focus polls are bounded; a dead pane falls through to reap after the bound ok - a readable focused poll resets the unknown-focus bound so a transient blip stays protective ok - a readable not-focused poll resets the unknown-focus bound and the reap proceeds ok - the unknown fall-through keeps blocking at the bound while the within-grace focus marker is fresh ok - the unknown fall-through reaps at the bound once the focus marker has aged past the grace window ok - the focus stamp records recency only on a real observed focus

ok - herdr focus read classifies the four outcomes: focused/unfocused, unsupported on absent key, unknown on failures
ok - a currently-focused pane blocks the idle>2h auto-close and records its focus recency
ok - a pane focused within STALENESS_FOCUS_GRACE_SECS still blocks the auto-close reclaim
ok - an unfocused pane whose last focus is older than the grace window is allowed to reclaim
ok - a malformed grace override reverts to 300 and the guard still protects a within-grace pane
ok - a focus-unaware backend is a no-op that allows the reclaim exactly as before
ok - capability gate: focus-capable herdr blocks the reap; a focus-less herdr build no-ops and allows it
ok - an unreadable/timed-out focus query blocks the reclaim, never erroneously reaping
ok - consecutive unreadable-focus polls are bounded; a dead pane falls through to reap after the bound
ok - a readable focused poll resets the unknown-focus bound so a transient blip stays protective
ok - a readable not-focused poll resets the unknown-focus bound and the reap proceeds
ok - the unknown fall-through keeps blocking at the bound while the within-grace focus marker is fresh
ok - the unknown fall-through reaps at the bound once the focus marker has aged past the grace window
ok - the focus stamp records recency only on a real observed focus
Evidence: Full fm-watch-triage suite log (70 ok, 0 failures)
ok - signal_reason_is_actionable: benign absorbed, captain verbs and coalesced batches surfaced
ok - stale_is_terminal: terminal status surfaces, non-terminal and no-status are benign
ok - scan_captain_relevant_statuses lists only captain-relevant statuses
ok - classifier primitives: keyed decisions and activity phases, captain relevance, window-to-task, and overrides
ok - crew_is_provably_working: only working+run-step/pane is provable; idle/finished/parked/failed/unknown surface
ok - status_is_paused: only the leading paused verb matches, and paused is not captain-relevant
ok - crew_absorb_class: working/paused/none from one read; crew_is_paused and crew_is_provably_working agree
ok - signal_crew_provably_working: benign only when every referenced crew is provably working
ok - a no-verb signal whose crew is provably working is absorbed (no exit, no queue, suppressor advanced, beacon present)
ok - a bare turn-end whose crew is provably working (busy pane) is absorbed
ok - a bare turn-end whose crew is not provably working is surfaced (the swallowed-finish fix)
ok - a no-verb working: note whose crew is idle with no running pipeline is surfaced
ok - captain-relevant signal is surfaced (queue + exit) and marked surfaced
ok - a stale pane sitting on a terminal status is surfaced (queue + exit)
ok - a stale terminal-looking status is overridden and absorbed while a run is actively working, then wedge-escalated
ok - provably-working non-terminal stale is absorbed on first sight, then wedge-escalated past the threshold
ok - consecutive wedge escalations on the same pane accumulate and demand deep inspection at the threshold
ok - a pane becoming active again resets the consecutive wedge-escalation counter
ok - a busy worker below the turn-age bound remains working with no escalation
ok - a busy worker with a stable pane hash still escalates once its completed-turn age reaches the bound
ok - a busy worker whose pane hash changes every poll still escalates once its completed-turn age reaches the bound
ok - touching a busy worker's completed-turn marker resets the age and prevents an old-age escalation
ok - repeated busy turn-age escalations reuse the existing escalation counter and demand deep inspection at the threshold
ok - the production default busy-turn-age bound is 3600s (5min under does not wedge, 66min over does)
ok - a not-provably-working non-terminal stale is surfaced immediately (never left to wait out the timer)
ok - a declared pause is absorbed on first sight, then re-surfaced as a recheck past the threshold, never wedge-escalated
ok - exited declared-pause and captain-held panes use bounded pause cadence while a live decision gate still surfaces once
ok - a declared paused secondmate re-surfaces on the bounded normal-mode cadence
ok - a non-paused secondmate retains normal stale suppression
ok - a resumed secondmate clears pause and stale tracking before stale exemption
ok - unchanged stale hashes reclassify when a crew enters or leaves pause
ok - a declared pause is periodically rechecked against authoritative active-run state
ok - a paused status overridden by authoritative working preserves its wedge timer and escalates
ok - matching non-terminal stale suppressors repair missing or corrupt stale-since timers
/Users/trilliumsmith/.no-mistakes/worktrees/afb8487de4ac/01KZS1TT2KT3K5MYC60JN2CZWS/bin/fm-watch.sh: line 938: [: : integer expected
ok - triage log capping handles wc byte counts with leading spaces
ok - a captured process-event result wakes a healthy watcher proactively, with no manual drain
ok - a process-event wake is delivered once: no duplicate wake while queued, and none once handled
ok - complete process-event queue keys map to distinct seen markers
ok - queue revalidation, proactive output, and marker commit serialize with drain
/Users/trilliumsmith/.no-mistakes/worktrees/afb8487de4ac/01KZS1TT2KT3K5MYC60JN2CZWS/bin/fm-push-transition-lib.sh: line 92: echo: write error: Broken pipe
tests/wake-helpers.sh: line 258: 66109 Killed: 9                  PATH="$dir/fakebin:$PATH" FM_HOME="$dir" FM_PROCEVENT_CLAIM_ROOT="$dir/claims" FM_CREW_STATE_BIN="$dir/fakebin/fm-crew-state.sh" FM_POLL=0.2 FM_SIGNAL_GRACE=1 FM_CHECK_INTERVAL=999999 FM_HEARTBEAT=999999 "$WATCH" > "$out"
tests/wake-helpers.sh: line 258: 67374 Killed: 9                  PATH="$dir/fakebin:$PATH" FM_HOME="$dir" FM_PROCEVENT_CLAIM_ROOT="$dir/claims" FM_CREW_STATE_BIN="$dir/fakebin/fm-crew-state.sh" FM_POLL=0.2 FM_SIGNAL_GRACE=1 FM_CHECK_INTERVAL=999999 FM_HEARTBEAT=999999 "$WATCH" > "$out"
ok - surfacing failures replay before marker commit and suppress only after delivered output
ok - marker failure exits through the shared wake owner, releases its lock, and replays later
ok - a heartbeat with no captain-relevant change is absorbed and backs off the cadence
ok - heartbeat backstop fail-safe surfaces a captain-relevant status the per-wake path missed
ok - the liveness beacon stays fresh while the watcher absorbs benign wakes (fm-guard never false-alarms)
ok - with .afk present the watcher reverts to one-shot so the daemon owns triage (no double-triage)
ok - AFK changed paused panes hand off plain stale identities for daemon-owned pause triage
ok - a ship task idle past the auto-close threshold is reclaimed via bin/fm-teardown.sh --staleness-autoclose
ok - a ship task idle below the auto-close threshold is left to ordinary stale classification
ok - a ship task past the auto-close threshold but provably working (e.g. mid no-mistakes validation) is spared
ok - a ship task past the auto-close threshold but parked at a needs-decision gate is spared and surfaced
ok - the idle>2h auto-close backstop also reclaims during afk and logs durable evidence for the returning captain
ok - a persistently-failing reclaim retries a bounded number of times, then falls through to ordinary stale surfacing
ok - herdr focus read classifies the four outcomes: focused/unfocused, unsupported on absent key, unknown on failures
ok - a currently-focused pane blocks the idle>2h auto-close and records its focus recency
ok - a pane focused within STALENESS_FOCUS_GRACE_SECS still blocks the auto-close reclaim
ok - an unfocused pane whose last focus is older than the grace window is allowed to reclaim
ok - a malformed grace override reverts to 300 and the guard still protects a within-grace pane
ok - a focus-unaware backend is a no-op that allows the reclaim exactly as before
ok - capability gate: focus-capable herdr blocks the reap; a focus-less herdr build no-ops and allows it
ok - an unreadable/timed-out focus query blocks the reclaim, never erroneously reaping
ok - consecutive unreadable-focus polls are bounded; a dead pane falls through to reap after the bound
ok - a readable focused poll resets the unknown-focus bound so a transient blip stays protective
ok - a readable not-focused poll resets the unknown-focus bound and the reap proceeds
ok - the unknown fall-through keeps blocking at the bound while the within-grace focus marker is fresh
ok - the unknown fall-through reaps at the bound once the focus marker has aged past the grace window
ok - the focus stamp records recency only on a real observed focus
ok - the dead-window sweep delegates to teardown --staleness-file-dead for a confidently dead ship task
ok - the dead-window sweep leaves a live ship window untouched
ok - the dead-window sweep preserves an ambiguous or unreadable endpoint (files only for a confident dead)
ok - the dead-window sweep only files for kind=ship, never a secondmate

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 — full suite: 70 ok, 0 failures, exit 0 (includes pre-existing non-herdr no-op reap integration tests, confirming no regression)
  • Focus-guard targeted subset (14 tests) via a temp copy of the test file: test_herdr_pane_focus_state_classifies_boolean, test_focus_guard_blocks_focused_pane, test_focus_guard_blocks_recently_focused_pane, test_focus_guard_allows_stale_unfocused_pane, test_focus_guard_malformed_grace_falls_back_to_default, test_focus_guard_allows_non_herdr_backend, test_focus_guard_capability_gated_pair, test_focus_guard_blocks_on_unreadable_focus, test_focus_guard_bounds_persistent_unknown, test_focus_guard_unknown_reset_by_focused, test_focus_guard_unknown_reset_by_unfocused, test_focus_guard_unknown_within_grace_stays_blocked, test_focus_guard_unknown_aged_marker_reaps_at_bound, test_focus_stamp_only_records_real_focus — all ok, exit 0
  • End-to-end captain-review lifecycle driven through the real sourced fm-watch.sh functions (herdr backend + controllable focus signal): focused->BLOCKED, unfocused-but-within-grace->BLOCKED, marker aged 3600s->ALLOWED; captured the watcher's triage-log output
  • FM_STALENESS_FOCUS_GRACE_SECS load-time sanitization across 10 override inputs (unset/''/900/not-a-number/300abc/12x3/-5/0/' '/600) by sourcing bin/fm-watch.sh and reading the effective STALENESS_FOCUS_GRACE_SECS
  • Verified AGENTS.md reap-doc grammar fix by inspecting the diff (prose change; no behavioral test applicable)
  • Confirmed [: : integer expected stderr originates in unchanged fleet auto-discovery code present on base commit f2fbaca (git show f2fbaca:bin/fm-watch.sh), unrelated to this change
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Trillium Smith added 7 commits August 11, 2026 09:00
A ship pane the captain is reading/typing at (a done: pane in live
review) shows the same zero content-churn as a finished crew, so the
idle>2h staleness auto-close reclaim would tear it down mid-discussion.

Add a human-conversation guard: on a herdr backend the watcher stamps
state/.focus-<key> every idle poll it sees the pane focused, and
staleness_focus_guard_blocks_reap blocks the reclaim while the pane is
focused now or was focused within FM_STALENESS_FOCUS_GRACE_SECS
(default 300s/5min). herdr exposes no queryable focus history, only the
current boolean, so recency is reconstructed from the poll already run
for each idle candidate - no new loop. An unreadable focus query also
blocks (errs toward not reaping); a non-herdr backend is a no-op that
leaves the reclaim unchanged; the focus skip never consumes the reclaim
retry budget. Manual/--force/--staleness-file-dead teardown paths are
untouched - the guard gates only the automatic --staleness-autoclose reap.

New read-only backend seam fm_backend_pane_focus_state ->
fm_backend_herdr_pane_focus_state reads .result.pane.focused via the
socket API using parse_target (never starts a server). Reads the raw
boolean, not '.focused // empty', because jq's // treats a literal false
as empty and would misclassify an unfocused pane as unknown.

Tests: focused->blocked, recently-focused->blocked, stale-unfocused->
reaped, non-herdr->reaped(na), unreadable-focus->blocked, stamp-only-on-
real-focus, and a herdr boolean-classification parse test.

Docs: AGENTS.md reclaim-exceptions sentence + watcher-internals inventory
(.focus-*); docs/architecture.md auto-close backstop paragraph.
…d from unreadable focus so reap never wedges
@coderabbitai

coderabbitai Bot commented Aug 11, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@trillium, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 11 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 64a4cc50-6653-4b8c-8bba-442e6f92667d

📥 Commits

Reviewing files that changed from the base of the PR and between c96bf89 and c9eaa7b.

📒 Files selected for processing (3)
  • AGENTS.md
  • bin/fm-watch.sh
  • tests/fm-watch-triage.test.sh
📝 Walkthrough

Walkthrough

The watcher now queries Herdr pane focus and protects focused or recently viewed panes from staleness auto-close. It tracks unreadable focus results with bounded retries, adds configurable grace-period behavior, updates documentation, and adds comprehensive tests.

Changes

Focus-aware staleness reclamation

Layer / File(s) Summary
Pane focus detection
bin/backends/herdr.sh, bin/fm-backend.sh
Herdr focus queries return focused, unfocused, unsupported, or unknown. The backend dispatcher delegates Herdr queries and returns unknown for unsupported or failed reads.
Staleness focus guard
bin/fm-watch.sh, AGENTS.md, docs/architecture.md, docs/configuration.md
The watcher records focus history, applies the configurable grace period, handles repeated unreadable results, cleans focus markers, and checks the guard before reclaiming idle ships.
Focus guard validation
tests/fm-watch-triage.test.sh
Tests cover focus classification, recency protection, retry handling, backend gating, marker resets, and reclaim behavior.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

Suggested reviewers: kunchenguid, karotkriss

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: preventing staleness auto-close from reclaiming panes with live focus.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fm/fm-hfg-6e

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@AGENTS.md`:
- Line 386: Update the watcher sentence in AGENTS.md so all three exclusion
conditions have grammatically compatible subjects: retain the crew conditions
for working and being parked at a captain-relevant gate, and restate the final
condition as the pane being actively or recently viewed by the captain.

In `@bin/fm-watch.sh`:
- Around line 170-179: Validate FM_STALENESS_FOCUS_GRACE_SECS before it is used
by the staleness focus guard, accepting only a numeric value and reverting
malformed or empty overrides to the shipped default of 300 seconds. Ensure
staleness_focus_guard_blocks_reap receives the sanitized value so its integer
comparison continues protecting recently focused panes.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: daef6f3f-b2f5-4930-842c-e70d78da3229

📥 Commits

Reviewing files that changed from the base of the PR and between f2fbaca and c96bf89.

📒 Files selected for processing (7)
  • AGENTS.md
  • bin/backends/herdr.sh
  • bin/fm-backend.sh
  • bin/fm-watch.sh
  • docs/architecture.md
  • docs/configuration.md
  • tests/fm-watch-triage.test.sh

Comment thread AGENTS.md Resolved
Comment thread bin/fm-watch.sh Resolved
…c grammar

Address CodeRabbit review on PR #114:

- Validate the FM_STALENESS_FOCUS_GRACE_SECS override at load time so a
  non-numeric or empty value reverts to the shipped 300s default instead of
  breaking the focus guard's integer age comparison and silently dropping the
  reclaim protection - reusing the file's existing ''|*[!0-9]* sanitize idiom.
- Reword the AGENTS.md staleness-reap sentence so all three exclusion
  conditions have grammatically compatible subjects (wording only, behavior
  unchanged).
- Add a test: a malformed grace override reverts to 300 and the guard still
  protects a within-grace pane.
@trillium
trillium merged commit 8621c6d into main Aug 11, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant