Repository navigation
test: fix config-root seed and macOS history-probe fixtures after #7903/#7900 - #7914
Conversation
…canonicalize the history probe path
|
✅ Deterministic PR hygiene checks passed. |
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes.
|
| Layer / File(s) | Summary |
|---|---|
Control the Windows owner ACL test runner tests/claude-integration/claude-config-root-late-admission.test.ts, tests/claude-integration/claude-config-root-writer-barrier.test.ts |
Both tests configure the runner to return a non-timeout failure and reset it during teardown. The comments describe the mocked icacls context. |
History Fixture Path Resolution
| Layer / File(s) | Summary |
|---|---|
Resolve the history database from the real CODEX_HOME path tests/fixtures/stop-restore-history-runner.ts |
The lock-path check passes the canonical real path of CODEX_HOME to resolveCodexHistorySerializationDatabasePath instead of the supplied path spelling. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Other
Possibly related issues
- lidge-jun/opencodex issue 7815: The writer-barrier test setup changes, but the PR does not add the remaining writer coverage described in the issue.
- lidge-jun/opencodex issue 7854: The tests configure mocked ACL checks so the real PowerShell owner check does not determine hardening.
Suggested reviewers: ingwannu, luvs01
Merge Risk: 
Minimal · previous review 4df7e
-
The targeted test-fixture updates are safe to merge; no actionable current-head risk was established.
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 3 files.
-
Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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 @coderabbitai help to get the list of available commands.
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. |
Summary
The dev
lane=allrun 40708434824 failed two new groups of tests. Both are test-fixture assumptions; no product behavior changes here.Windows config-root seeds (windows 4/9, 9/9). Since #7903,
src/client/lifecycle-lock.tsaskshardenSecretDirto verify an existing runtime directory first, and that verifier launches real PowerShell (src/lib/windows-owner-acl.ts).claude-config-root-late-admissionandclaude-config-root-writer-barriermock icacls but left the verifier real, inside a 1s ACL budget. A cold PowerShell start exhausts the budget, hardening refuses before the mocked icacls runs, and the seed reportswritten: false. Both files now stub the owner verifier as unavailable, so hardening takes the mocked icacls path exactly as before #7903; the stub is reset inafterEach.macOS history ownership (macos 3/3, macos control).
tests/fixtures/stop-restore-history-runner.tshashed the rawCODEX_HOMEspelling into its history-lock probe path, while production locks the canonical spelling (src/codex/paths.tsusesrealpathSync.native). On macOS the temp alias (/varvs/private/var) gives a different hash, so the probe opened another database and sawhistory: false. The probe now canonicalizes the path the same way. This test was never reached on macOS before #7900 fixed the install script.Verification
seeded.writtenassertions CI reported.OCX_TEST_NO_QUEUE=1:claude-config-root-late-admission,claude-config-root-writer-barrier,stop-restore-history-ownership,stop-restoration-preflight: 96 pass / 0 fail.bun run typecheckpassed.lane=alldev batch.NOT RUN: macOS locally, full suite.
Checklist
Summary by CodeRabbit