Skip to content

test: fix config-root seed and macOS history-probe fixtures after #7903/#7900 - #7914

Merged
lidge-jun merged 2 commits into
devfrom
fix/ci-acl-verifier-and-history-probe
Oct 28, 2026
Merged

lidge-jun merged 2 commits into
devfrom
fix/ci-acl-verifier-and-history-probe

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

The dev lane=all run 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.ts asks hardenSecretDir to verify an existing runtime directory first, and that verifier launches real PowerShell (src/lib/windows-owner-acl.ts). claude-config-root-late-admission and claude-config-root-writer-barrier mock 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 reports written: 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 in afterEach.

macOS history ownership (macos 3/3, macos control). tests/fixtures/stop-restore-history-runner.ts hashed the raw CODEX_HOME spelling into its history-lock probe path, while production locks the canonical spelling (src/codex/paths.ts uses realpathSync.native). On macOS the temp alias (/var vs /private/var) gives a different hash, so the probe opened another database and saw history: false. The probe now canonicalizes the path the same way. This test was never reached on macOS before #7900 fixed the install script.

Verification

NOT RUN: macOS locally, full suite.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed. (Tests only.)
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults. (Test stubs only; production ACL code unchanged.)

Summary by CodeRabbit

  • Tests
    • Updated integration tests to account for unsuccessful Windows permission checks.
    • Adjusted a history-path check to use the resolved home directory path.

@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner October 28, 2026 15:39
@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature). label Oct 28, 2026
@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 4df7e8e and 63861c1.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 7eab243 and 4df7e8e.

Files selected for processing: 3
  • tests/claude-integration/claude-config-root-late-admission.test.ts
  • tests/claude-integration/claude-config-root-writer-barrier.test.ts
  • tests/fixtures/stop-restore-history-runner.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Walkthrough

Two Claude integration tests now control the Windows owner ACL test runner. A history fixture now uses the canonical CODEX_HOME path when resolving the history serialization database.

Changes: Windows ACL Test Setup

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: Low

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: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title accurately identifies both fixture updates: the config-root test fix and the macOS history-probe fixture fix. It also references the related issues and remains concise.
Docstring Coverage Passed 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. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T15:41:23.456733Z 4df7e8e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@lidge-jun
lidge-jun merged commit be6b6b9 into dev Oct 28, 2026
29 checks passed
@lidge-jun
lidge-jun deleted the fix/ci-acl-verifier-and-history-probe branch October 28, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant