Repository navigation
Conversation
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. Comment |
Contributor
|
✅ Deterministic PR hygiene checks passed. |
This branch has not been deployed
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 x64 now resolves the effective user's LocalAppData in-process with
SHGetKnownFolderPath, removing a fresh PowerShell startup andAdd-Typecompilation from runtime namespace resolution. This fixes the avoidable helper deadline on the nested Bun lock controller's cold path while preserving SID scoping, canonicalization/reparse refusal, required ACL hardening, and the existing live-lock assertions.Evidence and diagnosis:
27d095b4f9731e366fc191e4655bb17bb2d0a45d, failed the nested controller case after 30302.87 ms, reportingthe Windows effective-user runtime is unavailable.resolveEffectiveUserRuntimeRoot, after the SID has resolved and before lock-directory ACL hardening or acquisition. The controller copies its parent's environment and removes only the queue opt-out. The runtime resolver deliberately ignoresUSERPROFILEandLOCALAPPDATA; propagating those values cannot fix this path. The known-folder helper has a 30000 ms child timeout and compiles a P/Invoke type withAdd-Typein each fresh process. The duration and failure boundary strongly support helper timeout. The receipt omits the underlying cause, so the historical log cannot distinguish PowerShell startup from compilation/scheduling time or completely exclude a filesystem refusal inside the same wrapper. No particular antivirus or scheduler cause is claimed.fix/dpapi-helper-latency), test(codex): use shared Windows attest spawn budgets #7151 (fix/windows-attest-zero-effect-timeout), and fix(usage): keep usage-ledger file ids exact so Windows NTFS ids stop colliding #7089 (fix/windows-history-stale-ledger): none changes this resolver or test-lock path. test(ci): give the Windows nested live-lock case its own lock owner #5078 supplied the independent controller owner; that coverage remains intact. Refs [Bug][CI]: Windows batch leg skips its nested live-lock regression under OCX_TEST_NO_QUEUE=1 #4991.The native path uses the same LocalAppData GUID,
KF_FLAG_DEFAULT_PATH, and null token as the existing helper. Shell32/Ole32 load from the OS-resolved system directory. UTF-16 decoding is bounded andCoTaskMemFreeruns even for a failed HRESULT or decoding error, as required by the Windows API contract. Unsupported FFI retains the existing bounded trusted helper; native API failures refuse without an environment fallback. The SID helper and its existing timeout are unchanged.Verification
bun install --frozen-lockfile— passed.bun test tests/codex-integration/codex-user-identity.test.ts tests/windows/windows-popup-fix.test.ts tests/ci-workflows/test-runner.test.ts— 85 pass, 4 platform skips, 0 fail, 475 assertions, macOS/Bun 1.4.3. Includes the unchanged Windows live-lock case (platform-skipped locally) and a new Windows x64 test requiring the real in-process lookup even when the helper callback throws.bun test tests/codex-integration/codex-coordinator-doctor.test.ts tests/codex-integration/codex-write-lock.test.ts tests/clients/client-lifecycle-lock.test.ts tests/ci-workflows/file-size-ratchet.test.ts tests/test-layout.test.ts tests/test-layout-tooling.test.ts— 79 pass, 0 fail, 848 assertions.bun test tests/codex-integration/codex-user-identity.test.ts --test-name-pattern 'native known-folder resolution avoids'fail (0 pass / 1 fail). Restoring native selection passes (1 pass / 0 fail). The fixture models a timed-out probe without sleeping. Additional portable tests cover GUID/flags/null token, Unicode including surrogate pairs, HRESULT failure, null output, decoding failure, bounded unterminated output, allocation cleanup, and refusal without fallback.bun run typecheck,bun run structure:check,bun run privacy:scan,git diff --check— passed. Structure documentation stays within the existing 600-line codex-home budget; no ratchet caps or test-layout registrations changed (coverage extends an existing registered file).gh workflow run ci.yml --repo lidge-jun/opencodex --ref fix/windows-nested-test-lock-identity -f lane=allexactly once: run 38757309924, eventworkflow_dispatch, heada1d50db6378db59a7245a2afb031e26feef3b842, currently queued. The normal pull-request run 38757292102 is also queued at that head. Neither is passing evidence; Windows execution and required checks remain pending.Security review scope: effective-user namespace identity and native memory/DLL handling. Author inspection checked the 16-byte GUID layout, x64 pointer output, 32-bit HRESULT/flags, null current-user token, trusted absolute DLL paths, matching allocator/free routine, and fail-closed API errors. Maintainer security sign-off remains required under
MAINTAINERS.md; no claim of independent approval is made.Checklist