fix(codex): retry the native-main ACL timeout once, fail closed otherwise - #1135
fix(codex): retry the native-main ACL timeout once, fail closed otherwise#1135lidge-jun wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (2)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
|
✅ Deterministic PR hygiene checks passed. |
Summary
Separates "the Windows ACL call timed out" from "the ACL was refused" on the native-main owner path, and retries once for the former.
Previously a transient ACL stall was indistinguishable from a permanent denial, so a slow call could permanently fence the native-main owner.
src/lib/windows-secret-acl.tsnow returns a coded error taxonomy,src/codex/native-main-owner.tsretries exactly once on the timeout class, andsrc/codex/native-main-lock-file.tspropagates the coded failure.The fail-closed property is preserved. A refused ACL still denies — the retry applies only to the timeout class. That distinction is load-bearing because this path guards a physical credential: a retry that swallowed a denial would be a security regression, and the tests pin that it does not.
Attribution
This is @luvs01's work from #1130, cherry-picked with their authorship intact. #1130 stays open for them. The coded-error approach is the right shape for this — it makes the recoverable case explicit rather than widening the catch.
Stack 3 of the 260806 attribution campaign, stacked on #1134. Planning unit:
devlog/_plan/260806_stacked_bug_campaign/.Verification
bun test tests/windows-secret-acl.test.ts tests/native-main-owner-lifetime.test.ts— 166 pass, 0 failbun run typecheck— exit 0bun run privacy:scan— passedbun run testvia the repository prepush gate — passedPlatform limitation stated honestly: verification ran on macOS, so the Windows ACL boundary is exercised through injection rather than natively. The tests cover the permanent-error, timeout, and retry-exhaustion classes; they do not prove real Windows ACL behavior. A Windows CI leg is the check that would.
Checklist