Repository navigation
Description
Client or integration
Other
Area
Platform (Windows / macOS / Linux)
Summary
tests/cli/cli-start-journal-order.test.ts > "start and ensure journal ownership (#1230) > a healthy proxy owner preserves the journal for both start and ensure" fails intermittently on hosted Windows shards. The failure shows a product-path ordering problem, not only a slow test:
handleStartcallsfindProxyOwnerBeforeJournalRecovery()(src/cli/index.ts,findLiveProxy(START_OWNERSHIP_LIVENESS), 3 attempts). This first probe returns no live owner although the fixture's owner proxy is running and was healthy moments earlier.- Because the probe saw no owner,
recoverStartStateUnderOwnershipLeaserunsreconcileStartupJournal()and restores the Codex config from the journal ("Previous session (PID 999999) did not shut down cleanly. Codex state restored from journal."). - The lease-held bind fence then calls
findLiveProxy(START_OWNERSHIP_LIVENESS)again. This second probe does find the owner and refuses with "Proxy appeared before bind (PID unknown, port N)".
The test expects "Proxy already running" and an untouched journal and config. The run instead rewrote the Codex config under a live owner. The pre-recovery liveness answer is a single negative observation, and it authorizes a destructive journal recovery that the later fence contradicts.
Expected: a live owner that the bind fence can see must never have its journal and config recovered by the same start. Recovery should not proceed on a negative probe that a recheck under the ownership lease would contradict.
Reproduction
Intermittent on hosted windows-latest under shard load; not reproduced locally yet.
- dev
lane=allrun 40434080650 (head1de2b71b), a Windows shard:(fail) ... a healthy proxy owner preserves the journal for both start and ensure [21025.89ms]. - PR fix(windows): preserve bounded ACL failure diagnostics #7773
lane=allrun 40513796719 (heada32f7a11), jobwindows 9/9: same case, stderrPrevious session (PID 999999) did not shut down cleanly. Codex state restored from journal.thenProxy appeared before bind (PID unknown, port 60775). Use 'ocx stop' first.
Version
dev 2.94.0 line (1de2b71b, a32f7a11)
Operating system
Windows (hosted windows-latest)
Provider and model
Not applicable (test fixture).
Logs or error output
error: expect(received).toContain(expected)
Expected to contain: "Proxy already running"
Received: "⚠️ Previous session (PID 999999) did not shut down cleanly. Codex state restored from journal.\n⚠️ Proxy appeared before bind (PID unknown, port 60775). Use 'ocx stop' first.\n"
(fail) start and ensure journal ownership (#1230) > a healthy proxy owner preserves the journal for both start and ensure [18862.50ms]Screenshots and supporting files
No response
Redacted configuration
n/aChecks
- I searched existing issues and documentation.
- I removed secrets, tokens, account details, request credentials, and personal data.
Activity
lidge-jun commentedon Oct 28, 2026
Fixed on
devby #7851 (squash merge 7a1565b).startnow rechecks proxy ownership under the ownership lease immediately before journal recovery, and recovers only when that recheck proves the owner absent; a live owner is adopted, and an unverifiable answer refuses startup while preserving the PID record and journal. A negative early probe no longer authorizes recovery. Closing manually because pull requests intodevdo not auto-close issues.