fix: keep configured port after update restart#152
Closed
Wibias wants to merge 4 commits into
Closed
Conversation
…le flashes Pin post-update proxy restart to config.port, wait briefly for the listen socket to free, and avoid spawning visible PowerShell/icacls windows on the start hot path.
2 tasks
Port stickiness stays scoped to restart/port behavior; icacls ACL soft-fail lives elsewhere.
Wibias
force-pushed
the
fix/update-restart-port-stickiness
branch
from
July 19, 2026 08:18
5309ddc to
e91da08
Compare
lidge-jun
added a commit
that referenced
this pull request
Jul 19, 2026
Docs-only Phase-0 cycle: dependency-ordered phase map (010-080), immutable
source refs codex/source-pr{152,153,154,156,157,158,159}-*, attribution
contract per 260718 precedent, and Sol review verdicts folded per phase:
- PR#152 FAIL -> pid-identity guard, captured-port wait, activation tests
- PR#157 FAIL -> honest error codes, /findsid verification, deadline budget
- PR#156 GWF -> legacy identity-less migration, cross-token user_id preference
- PR#158 GWF -> matcher narrowed to local abort contract, compact activation
- PR#159 GWF -> active-key-only probe, envelope null handling, key-mode gate
- PR#153 GWF4 -> key-compat override, grant renewal repr, token redaction,
identity-required persistence, poll cadence, 401 replay,
terminal refresh codes, host fail-closed
- PR#154 FAIL -> close-origin-aware focus restore
Roadmap A-gate: 4 audit rounds vs Sol reviewer, final VERDICT PASS.
lidge-jun
added a commit
that referenced
this pull request
Jul 19, 2026
…ured pre-update port Repairs for community PR #152 absorb (source head e91da08), Sol review findings: - findLiveProxy: cheap readAlivePid stays discovery-only; a returned killable pid now requires verifyPidIdentity(candidate) === candidate (new LivenessIo verifyPidFn seam), closing the reused-PID kill target and the TOCTOU window where the pidfile changes between discovery and verification. - runGuiUpdateWorker: capture the live runtime port/hostname BEFORE the stop-first update clears pid/runtime state; restartAfterUpdate now waits on the captured port unconditionally (io seam waitForPort/spawnStart/ serviceInstalledFn) so a 751-2000ms socket drain no longer hops the proxy to an ephemeral port. - Activation tests: pidless-legacy identity-fail -> pid null; identity-echo -> pid returned; verifier mismatch -> pid null (TOCTOU regression); restart path wait+pin observed via injected io. Co-authored-by: Wibias <37517432+Wibias@users.noreply.github.com>
Owner
|
Thanks for the fix — the port-stickiness direction was right, and it's landed on
Full suite green (3,087 tests). Closing in favor of the dev-landed commits; ships with the next release. |
3 tasks
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
config.port(ocx start --port …), wait briefly for the listen socket to free, and prefer-retry the configured port on start so Windows stop→start races no longer hop to an ephemeral port.Windows ACL / Kimi
icaclssoft-fail lives in a separate PR (fix/windows-acl-soft-fail).Test plan
bun test tests/ports.test.ts tests/update-job.test.ts