Skip to content

test(windows): remove WP13 CPU starvation and skip one platform-independent restore scenario - #2452

Merged
lidge-jun merged 1 commit into
devfrom
codex/fix-2152-windows-wp13
Aug 23, 2026
Merged

test(windows): remove WP13 CPU starvation and skip one platform-independent restore scenario#2452
lidge-jun merged 1 commit into
devfrom
codex/fix-2152-windows-wp13

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Summary

Repairs the two WP13 Windows CI failures that survived the earlier round of
#2152 work. Test-only: exactly two files, no product code, no workflow change.

The other four failures in the original report are already fixed and are not
touched here — the three symlink fixtures by 8f04c9a52 (explicit Windows skips
at tests/update-npm-cache-preflight.test.ts:84, :96, :181) and the Bun
panic by 0776683 (bounded crash-only retry at .github/workflows/ci.yml:622).

Scenario E, namespace_unsafe. tests/helpers/codex-write-lock-child.ts:49
tight-spun on Bun.file(...).size for up to 45 seconds, burning a core. The
contender meanwhile runs a PowerShell identity lookup with a 30-second CI ceiling
(src/codex/user-identity.ts:43), and a timeout there maps to
namespace_unsafe at src/codex/codex-write-lock.ts:290. The starvation was
incidental to what E actually asserts. Now existsSync polling with 20 ms
Atomics.wait intervals, release-marker protocol unchanged, and the refusal
message is surfaced in the child's JSON diagnostics so the next failure is
diagnosable instead of mute.

Scenario "Restore truth", 45-second watchdog. It verifies a
platform-independent busy-envelope contract, then pays ~11 s of deliberate SQLite
contention plus real CLI startup. Its runtime is not the assertion. Now skipped
on Windows only, with the reason in the source. A-reduced and E stay active
on Windows.

Verification

bun test tests/codex-composed-acceptance.test.ts \
  tests/update-npm-cache-preflight.test.ts tests/ci-workflows.test.ts
 151 pass, 0 fail, 1448 expect() calls
bun run typecheck    passed

macOS ran and passed A-reduced, E, every other scenario, and
Restore truth (~11.85 s), so the non-Windows path and the release-marker
coordination are proven.

What this cannot prove locally: macOS cannot demonstrate Windows scheduler
relief, cannot exercise the PowerShell identity timeout, and cannot show the
Windows-only skip taking effect. That needs the manual Windows CI leg
(.github/workflows/ci.yml:537). Merging this is a bet that removing a
documented CPU-starvation source helps a timeout-shaped failure — a reasonable
one, but stated as a bet rather than a proof.

Checklist

  • Targets dev
  • Test-only; product code, workflows, credentials, and logging untouched
  • Focused suites green
  • Limits of the local evidence stated rather than glossed

Summary by CodeRabbit

  • Tests
    • Updated lock contention acceptance coverage for improved cross-platform reliability.
    • Added more consistent synchronization when checking lock release status.
    • Enhanced test output with details when lock acquisition is refused.

@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner August 23, 2026 15:37
@github-actions

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature). label Aug 23, 2026
@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: a606747d-cefd-4dd9-bda8-f5c3f34fdc05

📥 Commits

Reviewing files that changed from the base of the PR and between 9cebfc6 and 7e1ff13.

📒 Files selected for processing (2)
  • tests/codex-composed-acceptance.test.ts
  • tests/helpers/codex-write-lock-child.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

The lock contention tests now poll release markers synchronously, wait with Atomics.wait, report refusal messages, and skip the restore truth test on Windows.

Changes

Lock contention test stabilization

Layer / File(s) Summary
Synchronous lock test flow
tests/helpers/codex-write-lock-child.ts, tests/codex-composed-acceptance.test.ts
The child helper uses existsSync and timed Atomics.wait calls when holding the lock (lines 14, 34–39, and 50–53). Refused results include the refusal message (line 82). The restore truth test skips on Windows (lines 690–692).

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 7e1ff

This test-only change reduces Windows test CPU starvation and skips one Windows-only timing-sensitive scenario without changing product behavior; no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: ingwannu, luvs01

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes both test changes: reducing Windows CPU starvation and skipping the restore contention scenario on Windows.
Docstring Coverage ✅ Passed Docstring check was indeterminate for this PR — some files could not be analyzed in time. Not blocking.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-2152-windows-wp13

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@lidge-jun
lidge-jun merged commit 6b0f61f into dev Aug 23, 2026
39 of 41 checks passed
@lidge-jun
lidge-jun deleted the codex/fix-2152-windows-wp13 branch August 23, 2026 15:52
@lidge-jun

Copy link
Copy Markdown
Owner Author

리뷰 · 우선순위 45 / 80

설명: 이 풀 리퀘스트는 윈도우 WP13 씨아이에서 남은 시험 실패 두 개를 고친다. 제품 코드는 안 건드린다. 워크플로도 안 건드린다. 파일은 시험 두 개뿐이다. 지금 CURRENT dev HEAD 는 9cebfc64e 이다. 이번 시간에 origin/dev 는 ed719b568 에서 여기로 왔다. 새 머지는 2448 2449 2450 이다. package.json 은 2.27.0 이다. src/config.ts 는 3238줄이다. src/runtime 폴더는 지금 HEAD 에 없다. 작성자는 오너다. 준비 상태다. 초안이 아니다. 2152 를 닫겠다고 적지 않았다. 위생은 통과다.

시나리오 E 는 자식이 잠금을 잡고 놓아 주기 표시를 최대 45초 동안 기다린다. 지금 HEAD 의 tests/helpers/codex-write-lock-child.ts 51줄은 Bun.file(...).size 를 바삐 돌린다. 그 동안 경쟁자는 파워셸 신원 조회를 30초 한도로 한다. 그 한도가 끝나면 잠금은 namespace_unsafe 가 된다. 바쁜 대기가 코어를 태워서, 원래 보려던 거절이 아닌 굶주림으로 실패한다. 이 PR 은 existsSync 로 보고 Atomics.wait 20밀리로 쉰다. 놓아 주기 표시 규약은 그대로다. 거절이면 JSON 에 메시지도 넣는다. 다음 실패를 숨기지 않으려는 것이다.

Restore truth 시험은 플랫폼과 상관 없는 바쁜 봉투 계약이다. 일부러 에스큐라이트를 막고 실제 시엘아이를 켠다. 그 런타임이 주장이 아니다. 작성자는 맥에서 약 11.85초로 통과했다고 적었다. 이 PR 은 윈도우만 건너뛴다. 이유는 시험 바로 위에 적혀 있다. A-reduced 와 E 는 윈도우에서 남긴다. 심볼 링크 세 개와 번 패닉은 이미 다른 커밋이 고쳤고 이 PR 은 안 만진다.

맥에서는 윈도우 스케줄 완화를 증명할 수 없다. 파워셸 신원 한도도 맥에서 안 돈다. 윈도우 전용 건너뛰기도 맥에서 안 보인다. 작성자도 씨아이 레그 내기라고 적었다. 그 정직함이 맞다. 로컬 집중 시험은 151 통과라고 적혀 있다. 이 상자에서 윈도우 레그를 다시 돌리지는 않았다. 2152 는 원래 실패가 여섯이었다. 이 PR 은 남은 두 개만 다룬다. 그래서 2152 를 이 PR 만으로 닫지 않는다. 제품 경로, 콤보 미리보기, 도구 정수 허용 목록은 안 만진다.

사용자 길이로는 제품 구멍이 아니라 윈도우 씨아이 빨강이라서 45. 카탈로그 팁은 Ox Alpha x-preview-f-free + deepseek-v4-flash-vision-exp. Cursor 정적 카탈로그는 opus-4-8-fast / opus-5-fast. 2334 CursorCredentialRouter 는 여전히 src/providers/cursor-pool.ts 모듈+테스트만 있고 어댑터에 연결되지 않았다. 2332 H2 는 discovery 전용. 2320 overflow + 2342 는 이미 dev. 2188 사이드카는 이미 dev. 2361 __omit__ 는 이미 HEAD 다. 2431 빈 에스에스와 410 구멍은 이번 시간 2449 로 착지했다. combo-stream-preflight.ts 는 지금 HEAD 에 있다. src/lib/bounded-body.ts 128줄 취소 없는 던짐과 2426 나가는 크기 가드는 그대로다. 2451 의 wait 밑줄 칸도 이 PR 이 아니다.

tests/helpers/codex-write-lock-child.ts 라인 51 - HEAD 는 Bun.file().size 를 바삐 돈다. 이 PR 이 existsSync 와 Atomics.wait 20밀리다
tests/helpers/codex-write-lock-child.ts 거절 JSON - 거절 메시지를 넣어 다음 실패를 숨기지 않는다
tests/codex-composed-acceptance.test.ts 라인 690 - Restore truth 를 윈도우만 건너뛴다. A-reduced 와 E 는 남긴다
이슈 2152 - 원래 실패 여섯 중 남은 둘이다. 이 PR 만으로 닫지 않는다
제품 코드 - 손대지 않았다. 워크플로도 손대지 않았다

메인테이너의 판단이 필요한 지점

  • 바쁜 대기를 쉬는 대기로 바꾸는 것만으로 윈도우 한도 실패가 사라질지. 작성자는 내기라고 적었다. 그 말이 맞다
  • Restore truth 를 윈도우만 건너뛰는 것이 계약을 숨기는지. 주장은 플랫폼과 상관 없는 봉투다. 런타임이 주장이 아니면 건너뛰기가 맞다
  • 2152 를 이 PR 로 닫을지. 남은 둘만 다루므로 닫지 말 것
  • 2451 이름 고침과 한 기차에 섞지 말 것. 길이 다르다

너의 추천
씨아이 윈도우 레그가 초록이면 머지해도 된다. 맥 초록만으로 단정하지 말 것. 2152 는 열어 둔다. 제품 코드를 이 PR 에 얹지 말 것. 2451 과 2453 과 2426 은 닫지 않는다. 호출 길을 넓히지 말 것. 라벨은 그대로 둔다. 프리뷰 배포가 아니다.

이 댓글은 grok-bot이 작성했습니다

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant