fix(pi): close routine stale wake acknowledgment gap - #98
Merged
Merged
Conversation
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
Fix the Pi supervision branch so routine identical stale wake offers are never accepted and forgotten: preserve bounded coalescing, defer one normal durable-queue recheck after the active eligible-row snapshot settles, acknowledge any remaining branch-owned row, leave already-consumed rows as an empty no-op, and cover both boundaries without changing wake-drain, wake-grant, parent stall detection, or fm_branch_report.
What Changed
stale:offers received while a branch turn’s eligible-row snapshot is in flight, then perform one normal durable-queue recheck after the turn settles, with generation and shutdown cleanup.Risk Assessment
✅ Low: The patch is narrowly scoped to serialized stale-wake bookkeeping and covers both pre- and post-snapshot boundaries without changing the owned drain, grant, watcher, or report paths.
Testing
The target passes bounded coalescing, post-snapshot durable recheck, branch acknowledgement, consumed-row no-op, wake-drain, wake-grant, parent-stall, fm_branch_report, and real-Pi-SDK checks. The worktree is clean and reviewer-visible CLI evidence is captured.
Evidence: Pi branch routine stale-wake evidence
Source: Pi branch routine stale-wake evidence
Target boundary passed; base reproduced timeout at deferred acknowledgement; real Pi SDK 0.84.2 passed; preserved contract files unchanged.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-pi-branch-extension.test.shbash tests/fm-wake-queue.test.shFM_PI_BRANCH_LIVE_E2E=1 bash tests/fm-pi-branch-live-e2e.test.shbash tests/fm-branch-supervision.test.shFocusedtest_branch_coalesces_repeat_wakes_and_bypasses_for_urgent_workagainst target and base extension implementations✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.