Repository navigation
test(windows): keep ACL subprocess work out of cache and registration assertions - #7358
Conversation
… assertions The pricing-cache case asserted warm-cache reuse while startServer's unawaited config-dir ACL harden was still rewriting inherited ACEs; on NTFS that moves usage.jsonl ChangeTime and the aggregate cache correctly rebuilds. Drain the flight first. AUTH-11 billed each writer's icacls work (registration hardening plus the exit drain, 30 s budget each) to the parent's 15 s registration deadline. ACL policy has its own suites; the fixture now pins the ACL platform gate off.
Codex Review SummaryThis 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. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Summary
Two intermittent Windows CI failures came from ACL subprocess work landing inside a test's assertion window. Neither one is a product bug.
policy-only API writes refresh warm estimate, summary and aggregate caches; reset restores catalog(Windows shard 5/9, run 39209343468,Expected: "unchanged").startServer→loadConfig→hardenConfigDirstarts an unawaitedicaclsdirectory harden. Its/inheritance:r+ inheritable grant rewrites the inherited ACEs onusage.jsonl, which moves the file's NTFS ChangeTime. The aggregate cache deliberately rebuilds on any same-size revision change, so the first stage sees"rebuild". The log shows the failure ~300 ms after server start, inside the first stage. The test now drains that flight withflushConfigDirHardeningAndReaps(home)before asserting warm-cache reuse. Later directory hardens either hit a compliant ACL, which only reads, or finish synchronously before the next summary rebuilds.AUTH-11: cross-process duplicate registration into A/B admits exactly one credential(Windows shard 1/9, nightly 39154486082,Anthropic registration completion deadline exceededat 16.8 s). The parent's 15 s completion timer starts after both writers report ready, and it also covers each writer'sicaclswork: secret hardening insidesaveCredentialWithReceipt, plusflushConfigDirHardeningAndReapsbefore exit. Each step has a 30 s budget. The writer fixture now turns the ACL platform gate off before importing the store, so the deadline measures registration admission only. The real processes, the cross-process store lock, atomic publication and duplicate detection are unchanged. ACL policy keeps its own suites (tests/windows/windows-secret-acl.test.ts).No timeout, retry or skip was changed.
Verification
bun test tests/server/model-costs-pricing-cache.test.ts -t policy-only: 40/40 passes, 8 parallel, under 6×yesCPU load (macOS).bun test tests/oauth/oauth-anthropic-instance-multiprocess.test.ts -t AUTH: 40/40 passes, same load.bun run typecheck,bun run structure:check: pass.rebuild → rebuildfor the cache case, and the exactcompletion deadline exceedederror for AUTH-11 while both result files already held["success","duplicate"]. With the change, both pass. Windows confirmation is left to the lane=all dispatch.Checklist