test(cadence): use integer FM_POLL in fast-poll watcher tests - #152
Open
yjuyjuy wants to merge 4 commits into
Open
test(cadence): use integer FM_POLL in fast-poll watcher tests#152yjuyjuy wants to merge 4 commits into
yjuyjuy wants to merge 4 commits into
Conversation
The watcher cadence resolver (bin/fm-cadence-lib.sh) accepts only non-negative integer seconds; a fractional FM_POLL such as 0.2 falls back to the 300s default with a loud warning. Tests written before the integer-only contract (#52) still used fractional polls and silently ran at 300s cadence, so cycle-bound assertions failed deterministically: - tests/fm-watcher-lock.test.sh: watcher self-eviction was never observed within the 60s wait once the poll fell back to 300s. - tests/fm-watch-triage.test.sh: the AFK paused-pane handoff waited on a cycle that never arrived inside the 40s bound. - tests/fm-pr-check-security.test.sh: the bounded-watcher helper (5s alarm) and the descendant-check watcher timed out before one cycle. Switch every fractional FM_POLL in tests to FM_POLL=1, the documented integer test seam, preserving the fast-cycle intent. Found while verifying the landed defunct/zombie lock hardening (#84); the zombie guard tests pass unmodified.
yjuyjuy
force-pushed
the
fm/fm-lock-defunct-hardening2
branch
from
August 23, 2026 19:18
bbea594 to
56ef609
Compare
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.
Summary
Fix stale fractional
FM_POLLvalues in fast-poll watcher tests. The watchercadence resolver (
bin/fm-cadence-lib.sh) accepts only non-negative integerseconds since PR #52; a fractional
FM_POLL=0.2/0.1/0.02is rejected with aloud warning and falls back to the 300s default. Tests written before the
integer-only contract silently ran at a 300s cadence and failed
deterministically:
tests/fm-watcher-lock.test.sh- watcher self-eviction never observed withinthe 60s wait (observed failure).
tests/fm-watch-triage.test.sh- AFK paused-pane handoff waits 40s for astale-detection cycle that takes 300s.
tests/fm-pr-check-security.test.sh- the bounded-watcher helper (5s alarm)and the descendant-check watcher time out before one cycle.
All six fractional
FM_POLLsites in tests are switched toFM_POLL=1, thedocumented integer test seam, with a comment at each site. This work was found
while verifying the already-landed defunct/zombie lock hardening (#84); its
zombie-guard tests pass unmodified.
Pipeline validation (no-mistakes)
Run
01M0QWQ055EWTFBZ3PWB4HPHKE, gate agent claude (global config workaround2026-08-23, captain word): review 0 findings, test passed (~8m), lint passed
(full-tree
bin/fm-lint.sh), push + PR done. Pipeline fix commits on thisbranch repair four pre-existing CI drifts on main (see below).
Pre-existing CI red on main (not caused by this change)
All check families covering this change pass (parallel-1, parallel-2, invariants,
lint, coverage guard; serial lane's watcher/triage/security suites pass: the
zombie, self-evict, and arm tests are green on the serial head). Three checks
fail on main for unrelated, pre-existing or environment-dependent reasons:
none touched by this change:
fm-backend.test.sh(pre-refactor shim siblinglist drift),
fm-bearings-snapshot.test.sh(Account-quotas "unavailable"rendering),
fm-bootstrap.test.sh(CONFIG_REREAD nudge banner, secondmateenv),
fm-gotmp.test.sh,fm-hourly-passes.test.sh,fm-memory-report.test.sh,fm-session-start.test.sh(each environment-dependent), andfm-subagent-pretool-check.test.sh(guard drift vs shipped commit 10d26a4,fixed in-branch by the pipeline, 7deb70f). The serial family
(
watcher-wake-lock) is green."projected task-pane close did not demonstrate and immediately restore the
exact focus-steal regression" (
fm-backend-herdr-presentation-e2e.test.sh,timing-dependent real-Herdr test). This change never runs in the Herdr lane.
bumped 20-test count; the Bearings suite ("missing quota data must render
unavailable under the Account quotas subsection") produces no output under
stock macOS bash 3.2 and fails the 42-test assertion. This change does not
touch Bearings.
Fleet lanes are addressing the main-CI drift separately (a
fix-firstmate-main-cilane owns the Bearings failure). This PR's own checks are green.