Repository navigation
fix(windows): scope scheduler ownership by OpenCodex home - #2857
Conversation
Treat a machine-global scheduled task that points outside the effective OpenCodex home as another home's manager claim. Keep missing or malformed current-home scheduler evidence fail-closed.
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⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe Windows service-manager probe now validates a registered scheduled task’s launcher path against the effective ChangesWindows scheduled-task ownership
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The change scopes Windows scheduler ownership by OpenCodex home while preserving fail-closed handling for ambiguous or malformed registrations. No actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Linked Issues checkExplanation The changes address issue Full details: Out of Scope Changes checkExplanation The changes are limited to the Windows scheduler ownership probe and focused regression tests. They directly support the linked issue and do not introduce unrelated production behavior or unrelated test coverage.
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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 |
리뷰 · 우선순위 74 / 80이 PR은 Windows에서 기계 전역으로 등록되는 Task Scheduler 작업 고치는 방식은 단순합니다. 테스트는 라인 681–698 (PR diff 기준
메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 51998e3f39
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (!registration.registeredXml.trim()) { | ||
| return unknown("Task Scheduler is registered but its definition XML could not be read"); | ||
| } | ||
| const launcherArg = windowsTaskArguments(registration.registeredXml); |
There was a problem hiding this comment.
Reject multiple task actions before declaring the task foreign
When the on-disk task XML is absent and the registered task contains multiple valid <Exec> actions, this reads only the first <Arguments> element. If that first action names a launcher outside configDir while a later action launches the current home's wrapper, the branch returns absent; inspectNativeCodexOwnership can then authorize unattended Codex writes despite an unaccounted current-home scheduler registration. Fail closed unless the registered XML has exactly one structurally valid executable action (as windowsTaskRegistrationHealthy already requires), then classify its launcher path.
Useful? React with 👍 / 👎.
Treat a machine-global scheduled task that points outside the effective OpenCodex home as another home's manager claim. Keep missing or malformed current-home scheduler evidence fail-closed.
Treat a machine-global scheduled task that points outside the effective OpenCodex home as another home's manager claim. Keep missing or malformed current-home scheduler evidence fail-closed.
Summary
opencodex-proxyTask Scheduler registration to the effectiveOPENCODEX_HOMEbefore it participates in write ownership.Closes #2800
Verification
bun test tests/codex-service-manager-probe-hardening.test.tsreturnedownership: unknownwithTask Scheduler holds opencodex-proxy but its task XML is missingfor the second-home fixture.unknowndecision failed only the new Windows: a second OpenCodex home can never pass admitCodexWrite once Task Scheduler holds opencodex-proxy #2800 ownership regression while the current-home negative remained green.bun test tests/codex-service-manager-probe-hardening.test.ts tests/codex-service-manager-probe.test.ts tests/codex-admission.test.ts— 83 pass, 0 fail, 201 assertions.bun x tsc --noEmit— exit 0.bun run privacy:scan— passed.ocx syncrun.Checklist
Summary by CodeRabbit
Bug Fixes
Tests