Repository navigation
test: assert the specific refusal gate in the fixture preload tests - #7861
Conversation
refuses() accepted any refusal text, so a case could pass because an earlier, unrelated gate refused it. Each case now names the gate that must stop the child, following the preload's check order.
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. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Specific refusal reason assertions tests/ci-workflows/fixture-windows-runtime-preload.test.ts |
The shared refuses helper checks a case-specific expected pattern in stderr. Refusal cases specify patterns for guard, owner-root, protected-tree, boundary, owner-marker, and nonce rejection paths. These include symlink-alias and protected-target cases. |
Priority:
Estimated code review effort: 2 (Simple) | ~8 minutes
Change: Other
Possibly related PRs
- lidge-jun/opencodex#7852: Adds the preload fixture and refusal cases that this PR updates.
Suggested reviewers: ingwannu
Merge Risk: 
Minimal · up to c2e52
-
This test-only change strengthens refusal assertions without introducing a current-head production or mergeability risk.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Title check
-
Explanation
The title "test: assert the specific refusal gate in the fixture preload tests" matches the main change. The raw summary and PR objectives both say the preload refusal tests now assert specific refusal reasons instead of the broad /refus|requires/i match. The title is short, specific, and free of file lists or vague terms. No production code changes are reported, which the "test:" prefix reflects.
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. 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 1 functions across 1 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches: 💡 1
-
📝 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.
|
✅ Deterministic PR hygiene checks passed. |
|
Maintainer integration into dev: all required checks passed on exact head c2e52cb, which merges into current origin/dev without conflict. Test-only change. |
Summary
Follow-up to #7852 for a CodeRabbit finding on that PR.
refuses()intests/ci-workflows/fixture-windows-runtime-preload.test.tsaccepted any stderr matching/refus|requires/i. Every gate intests/helpers/fixture-windows-runtime-preload.tsthrows a message that matches, so a case could pass because an earlier, unrelated gate refused it.Each case now names the gate that must stop the child, following the preload's check order: armed guard and absolute home, owner root and nonce presence, protected-tree overlap, owned-root containment, owner marker, nonce match. The two direct-assertion cases (missing/blank/relative home, protected local-appdata target) use the same named gates. No production code changes.
Verification
bun test tests/ci-workflows/fixture-windows-runtime-preload.test.tson Windows 11, Bun 1.4.4: 31 pass / 0 fail.NOT RUN: full
bun run test(test-only change to one file; PR CI covers it).Checklist
devSummary by CodeRabbit