Repository navigation
test(claude): control ACL time in the concurrent config-edit merge cases - #8629
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
✅ Deterministic PR hygiene checks passed. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Maintainer judgment (dev integration, MAINTAINERS.md maintainer-integration exception): merging without a second maintainer approval, as part of the DEV-RED repair for dev batch run 43343080374 (macos 1/4).
|
Summary
The macOS dev batch (run 43343080374, macos 1/4) failed
tests/claude-integration/claude-config-root-stale-updates.test.ts:64,admitted partial edits merge the latest state: /api/effort-caps, with[200, 500]after 1291 ms. The other four routes passed in 20–80 ms, and earlier macOS batches passed this case in 20–26 ms.The cases come from #7826. They force the Windows ACL path, set
OPENCODEX_ACL_TIMEOUT_MS=1000, and hold both requests at the config-root barrier on the real clock. Both admissions sharewithWindowsSecretAclSettled's deadline (src/lib/windows-secret-acl.ts), so when the first save is slow on a loaded runner, the second request's one-second budget expires. The handler then answers itsETIMEDOUTas a 500 (src/server/management/agent-settings-routes.ts). These cases test merging under a controlled ACL barrier, not elapsed time. They now freeze the ACL clock (setNowForTests) and disable the belt scheduler (setAsyncIcaclsBeltSchedulerForTests); the existingafterEachalready resets both. Timeout refusals keep their own coverage inclaude-config-root-late-admission.test.ts. Both 200s and the merged live and disk state assertions are unchanged, and production code is untouched.Verification
bun test tests/claude-integration/claude-config-root-stale-updates.test.ts -t '/api/effort-caps'gave 0 pass, 1 fail ([200, 500],ETIMEDOUT) before, 1 pass after.bun test tests/claude-integration/claude-config-root-stale-updates.test.ts tests/claude-integration/claude-config-root-late-admission.test.ts: 80 pass, 0 fail.bun run typecheck: exit 0.bun run test:changed: 14 pass, 0 fail.Checklist
Summary by CodeRabbit