Repository navigation
fix: reduce remote-job and supervision polling churn - #6255
Conversation
|
…ns documenting intentional subshell-local legacy and active cadence overrides in tests/fm-remote-job.test.sh. Runtime behavior is unchanged. Reproduced the lint failure before the fix; afterward ShellCheck 0.11.0 with source following, Bash syntax validation, the complete remote-job behavior suite, and git diff --check all passed
…ve documentation pointers
764f01f to
b461423
Compare
| FM_REMOTE_JOB_SUPERVISOR_MAX_BACKOFF_SECONDS=$(worker_bounded_setting "${FM_REMOTE_JOB_SUPERVISOR_MAX_BACKOFF_SECONDS:-}" 5) | ||
| FM_REMOTE_JOB_SUPERVISOR_HEALTHY_SECONDS=$(worker_bounded_setting "${FM_REMOTE_JOB_SUPERVISOR_HEALTHY_SECONDS:-}" 10) | ||
| WORKER_FAST_PASSES=20 | ||
| WORKER_FAST_PASSES=4 |
There was a problem hiding this comment.
Separate cadence changes bundled The accepted Intent makes this the independent P1 change and reserves P2–P4 for separate PRs. Reducing the dispatcher burst from 20 passes to four implements P4 here; this changeset also slows remote-reply sampling from 0.2 to 0.5 seconds and changes supervision-park sampling and its elapsed clock. These changes alter dispatch, reply, and close-observation latency outside P1, preventing the requested independent review and measurement of each part. Please move P2–P4 into their own PRs.
Context Used: If there is a VISION.md file at the root of the repo, the PR must not conflict / diverge / drift from it. If the PR description has an "Intent" section, respect that as the accepted user intent. - Do make comments if anything in the implementation ... (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
@greptileai please re-review - the Intent section was corrected: the captain directed P1-P4 as one combined PR measured together, so bundling P2-P4 here is intended. |
fix: reduce remote-job and supervision polling churn (kunchenguid#6255)
|
@kunchenguid Would you say using greptileai is a game changer for code quality purposes? |
Intent
For the Mac mini overload, no host-wide concurrency cap: fix the Firstmate poll loops per the accepted design without changing signal handling. "ship the recommended ones", narrowed to "oh actually for the overload fix i only meant 1-4".
"we should do all 4 changes in a single PR then measure the combined effect, not each individually which is hard to observe"
This one PR carries P1-P4, measured together:
Keep ordinary external sleeps and existing production signal handlers/dispositions. No new traps, FIFO/timed-read wait abstraction, broad fm-watch cadence change, persistent lanes, P5 or P6. Compare the combined change against main using matched idle measurements, the same heavy workload, total increments as well as rates, and latency/signal evidence; report limitations honestly.
What Changed
SECONDS, retaining ordinary external sleeps and existing signal handlers.Risk Assessment
✅ Low: The combined P1–P4 change is narrowly bounded, implements the authorized latency tradeoffs, and preserves existing signal handlers, cleanup, and scheduling invariants.
Testing
Targeted real-product fixtures exercised all four changes, compatibility overrides, continuity, cancellation and boundaries. An initial reply-test setup failure came from overlapping code/home directories; normal isolated temporary paths resolved it. Stock Bash boundary/stop checks and baseline/candidate signal comparisons passed. CLI/state evidence was retained; combined host-wide measurements were not independently reproduced.
Evidence: Initial targeted product validation, including setup failure
Source: Initial targeted product validation, including setup failure
Evidence: Successful reply relay with source records, mirrored records and committed cursor
Source: Successful reply relay with source records, mirrored records and committed cursor
Evidence: Stock Bash uninjected park boundary and stop cleanup
Source: Stock Bash uninjected park boundary and stop cleanup
Evidence: Baseline/candidate native macOS delta-reader signal outcomes
Source: Baseline/candidate native macOS delta-reader signal outcomes
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
git diff fd325b1 a2578fe -- bin testsand repository testing-rule inspectionTMPDIR="$PWD/.test-tmp" bin/fm-test-run.sh --jobs 1 tests/fm-remote-job.test.sh tests/fm-remote-reply.test.sh tests/fm-supervision-host.test.shFM_TEST_EVIDENCE=1 bin/fm-test-run.sh --jobs 1 tests/fm-remote-reply.test.shTMPDIR="$PWD/.test-tmp" /bin/bash tests/.poll-live-validation.sh: uninjected 12-second park boundary and PID-directed TERM/HUP cleanuppython3 .test-tmp/delta-proof/drive.py: baseline/candidate delta-reader PID/group TERM, HUP, INT and QUIT comparison under stock macOS Bash 3.2Reviewed attached measurement claims without treating them as independently verified results; removed disposable drivers and fixture directories✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.
Combined measurement provenance and validation boundary
The implementing worker collected the idle-pair and 13-test heavy-run measurements outside the validation pipeline, against main
23e5584714e6765cc223a1740d385d0e85f8ad8e. The pipeline later rebased the four existing implementation/fix commits unchanged onto mainfd325b1ba16b0caa2c19fa0992b130bacba0dca8, then added its documentation update; these measurements are not relabeled as captures against the later main head.Across three matched pairs using identical isolated idle-fleet fixtures, every candidate window mean was lower: median pidversion rate fell 9.2% (2,740.54 -> 2,489.23 increments/s) and median forks fell 8.1% (1,670.76 -> 1,535.71/s). These are host-wide counters under the matched fixture workload, not a production rollout or a deployment-wide performance guarantee. Both 13-test heavy runs passed, but their mean pidversion rate fell only 1.5% (3,813.85 -> 3,754.89/s) while total increments rose 2.5% (5,827,560 -> 5,974,037). The heavy-run data do not establish an aggregate work reduction.
Evidence is retained in the private task report
/Users/kunchen/fm-homes/fmdev-f1/data/fm-poll-churn-design-s1/report.mdand the implementing copy's/Users/kunchen/.treehouse/fmdev-f1-8bf1b0/9/fmdev-f1/data/fm-poll-churn-design-s1/combined/directory, includingidle-results.json,heavy-results.json, raw counter streams, exact procedures, latency distributions and signal outcomes. Raw process-argument captures are not published here.The pipeline's live validation covered 6 of 7 scenarios and did not independently verify these historical measurement artifacts. Reuse of the implementing worker's evidence without reloading the scarce host was explicitly approved as a Test exception; it is not a claim that all seven scenarios were independently validated. Linux signal cases were not run because no Linux host exists here. macOS Bash 3.2 and PATH Bash signal evidence, and Linux-platform overrides exercised on macOS, are not native Linux signal proof.