fix(bin): read FM_HOUSEKEEPING_TICK for the daemon idle sleep - #2895
Open
harmeet-1337 wants to merge 2 commits into
Open
fix(bin): read FM_HOUSEKEEPING_TICK for the daemon idle sleep#2895harmeet-1337 wants to merge 2 commits into
harmeet-1337 wants to merge 2 commits into
Conversation
The away-mode daemon's non-wake idle sleep read an unprefixed HOUSEKEEPING_TICK, so the documented FM_HOUSEKEEPING_TICK knob (used by the housekeeping-age gate and file header) never governed the idle-loop cadence; it silently fell back to the 15s default. Read the prefixed name so the one documented knob controls both paths. Add a behavioral case that drives the daemon through its non-wake idle branch and asserts the idle sleep honors FM_HOUSEKEEPING_TICK.
Confidence Score: 5/5The PR appears safe to merge with no actionable changed-code defects identified. The runtime change consistently applies the already documented housekeeping setting to the idle branch, and the added regression test exercises that corrected path without introducing a concrete supported-environment failure. Reviews (1): Last reviewed commit: "no-mistakes(document): document FM_HOUSE..." | Re-trigger Greptile |
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
Implements accepted fleet-wide simplification audit finding F-S08-2-incidental (P0).
The away-mode supervise daemon's non-wake idle sleep read an unprefixed
${HOUSEKEEPING_TICK}, while the housekeeping-age gate and the file header both use the documentedFM_HOUSEKEEPING_TICK. The documented knob therefore never governed the idle-loop cadence; it silently fell back to the 15s default.Changes
bin/fm-supervise-daemon.sh: the non-wake idle sleep now readsFM_HOUSEKEEPING_TICK, so one documented knob controls both the idle sleep and the housekeeping-age gate. No unprefixed${HOUSEKEEPING_TICKreads remain.tests/fm-daemon.test.sh: added a behavioral regression test that drives the real daemon binary through its non-wake idle branch (stub watcher exiting on a singleton-collision line, plus a PATH sleep recorder) and asserts the idle sleep honorsFM_HOUSEKEEPING_TICK(=3) and never the 15s default. Verified it fails pre-fix and passes post-fix.docs/configuration.mdand the script header/comment: documented thatFM_HOUSEKEEPING_TICKalso paces the idle sleep.Validation
tests/fm-daemon.test.shsuite passes (104/104).bin/fm-lint.shclean locally (ShellCheck 0.11.0, actionlint 1.7.12).Minimal diff scoped to the finding; all existing messages, output, and exit codes preserved.