fix(rpc): record connection edges before Windows named-pipe idle exit - #1662
Open
code-yeongyu wants to merge 11 commits into
Open
code-yeongyu wants to merge 11 commits into
code-yeongyu wants to merge 11 commits into
Conversation
code-yeongyu
force-pushed
the
fix/windows-rpc-named-pipe-lifecycle
branch
from
September 13, 2026 11:32
0a23a9d to
4b7ba6b
Compare
Owner
Author
|
Handoff caveat: main advanced again to 5d8c339 (PR #1665) after the requested rebase onto 7924335 and the three successful CI executions on head 4b7ba6b. GitHub now reports this PR CONFLICTING / DIRTY. All recorded acceptance results apply to 4b7ba6b against 7924335; they do not claim compatibility with the subsequently advanced main. No merge was performed. |
Authenticated readiness probes can open and close between supervisor ticks. Record attachment and first detachment immediately so the idle window measures continuous inactivity rather than sampled connection counts. Extract the proxy for deterministic real-socket coverage of reconnect, exact expiry, and rejected authentication. Verification: forced-ordering RED and mutation reproduce connect ENOENT; macOS lifecycle 33/33 on three runs; related RPC suites 40/40; static checks, build, RPC CLI QA and tool-loop QA pass. Broader mock-loop text-recovery QA has the same nine failures on base. Ultraworked with [omo](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com> Plan: .omo/plans/omo-dependency-diet.md
code-yeongyu
force-pushed
the
fix/windows-rpc-named-pipe-lifecycle
branch
4 times, most recently
from
September 14, 2026 04:00
813696a to
50ef3f0
Compare
Force post-readiness ensure work past the host idle window so the lifecycle contract fails deterministically before the production fix.\n\nPlan: .omo/plans/omo-dependency-diet.md
Keep the successful authenticated readiness connection attached until ensureHost is ready to return, so post-probe filesystem work cannot consume the transient host's idle window before the real client attaches.\n\nPlan: .omo/plans/omo-dependency-diet.md
Preserve the current Unreleased changelog entry while integrating the latest mainline release and webfetch changes.\n\nPlan: .omo/plans/omo-dependency-diet.md
Drive the real ownership-safe lock release and record readiness ownership on both sides, while retaining the existing premature inner teardown as the deterministic RED.\n\nPlan: .omo/plans/omo-dependency-diet.md
Transfer the successful readiness lease to ensureHost so it survives the ownership lock COMMIT and close, then release it in failure-safe final cleanup at the actual return boundary.\n\nPlan: .omo/plans/omo-dependency-diet.md
Preserve the RPC readiness handoff note while integrating the latest native grep and CI changes.\n\nPlan: .omo/plans/omo-dependency-diet.md
Preserve the RPC readiness handoff note while synchronizing the final verification head.\n\nPlan: .omo/plans/omo-dependency-diet.md
Preserve the RPC readiness handoff while keeping #1690's bundled-worker supervisor-entry guard. Plan: .omo/plans/omo-dependency-diet.md
JsonlPeer.waitFor defaulted to 15s and scanned before arming. The turn-active lifecycle case already declared a 60s test timeout, so the nested clock was timing luck on a loaded Windows runner (CI run 34823696518 attempt 3). Arm the waiter first, mark sibling timeouts handled, and use the test budget for open/prompt/agent_start. Plan: .omo/plans/omo-dependency-diet.md
Keep this PR's readiness/idle-clock and turn-active waiter changes together with main's subsequent RPC and bundle work. Plan: .omo/plans/omo-dependency-diet.md # Conflicts: # packages/coding-agent/CHANGELOG.md
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
Windows named-pipe RPC hosts no longer drop the public endpoint between
ensureHost()readiness and the first real client, and the remaining turn-active lifecycle waiter no longer uses a nested 15s clock inside a 60s test.Root causes (product)
ensureHost()returned (connect ENOENT). The authenticated readiness connection now stays attached through the endpoint lock's commit and close.Residual CI failure (test waiter, not ENOENT)
On head
3fbd2e673, run 34823696518 attempts 1–2 passed. Attempt 3 (job 103917291025) failed:does not exit while a turn is active even with no connections; exits after the turn settles→Timed out waiting for RPC recordatJsonlPeer.waitFor(default 15s). 30 passed / 1 failed / 3 skipped.That stack is the record waiter, not
connect ENOENT. The test never reached the no-connection idle assertion. Same SHA passed on attempts 1, 2, and 4, so this is a nested 15s budget vs loaded-runner session/prompt/agent_startlatency, not a third product idle-race.Fix (test-only): arm
JsonlPeer.waitForbefore scanning buffered records; mark sibling waiter timeouts handled; include seen{type,id,command}on timeout; bind open/prompt/agent_startwaits to the case's existing 60s test budget; restore the mock API key for the held-model turn. No product idle-window change, no retries, no skips.Head
231546b4aonorigin/main5fb5d638d(includes the waiter fixf04ecdc1a).Proof still required on this head
RPC named pipes (Windows)executions on231546b4a(earlier-head streaks do not count).Refs #1656
Plan: .omo/plans/omo-dependency-diet.md