Repository navigation
Force the Containment Signal in test_install's In-Process Registration Checks - #2465
Conversation
…n Checks TestRegistration installs through run(), which forces AGENT_SAFETY_CONTAINMENT_OVERRIDE=1 on the subprocess, and then calls install.registration_problems() in-process with no override set. On a host without a systemd user manager, every Windows and macOS host among them, that call judged the forced containment prefix as stale, and 11 cases failed. The class now sets the same override in os.environ for each case, so the in-process check judges containment exactly as the install did. Fixes #2462 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe ChangesRegistration test setup
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to The change aligns in-process registration checks with the installer’s forced-containment mode. Native Windows execution remains pending, so that platform-specific acceptance result is not yet confirmed; no code failure is otherwise established. 🚥 Pre-merge checks | ✅ 3 | ❌ 1 | ❓ 1❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
Full details: Linked Issues checkExplanation Issue
✨ 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2465 +/- ##
========================================
Coverage 58.47% 58.47%
========================================
Files 16 16
Lines 8062 8062
========================================
Hits 4714 4714
Misses 3348 3348
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No unresolved review issues were identified.
Review effort: Lite
Findings: None
What changed in this PR
Aligns in-process registration checks with the containment override used by installer subprocesses, preventing false test failures.
Changes:
- Applies
AGENT_SAFETY_CONTAINMENT_OVERRIDE=1duringTestRegistration. - Restores the environment after each test.
| File | Description |
|---|---|
host-setup/agent-safety/claude/test_install.py |
Synchronizes registration-test containment behavior with installer execution. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Native Windows check at |
…'s In-Process Registration Checks (#2466) ## Summary Promotes #2465 to `main`. On a host without a systemd user manager, every Windows and macOS host among them, 11 `TestRegistration` cases in the agent-safety install suite failed. Each case installs through a subprocess that forces the containment signal on. The in-process `registration_problems()` check that follows read the host's real capability instead, and judged the forced prefix as stale. `TestRegistration` now sets the same signal for each case. Only the test changes, and the installer is unchanged. On Linux, forcing the in-process signal off reproduced exactly the 11 failures, and with the fix the whole suite passes (137 tests) with the signal forced off and on the host's real signal. The native Windows run is the maintainer's, and its result goes on #2465. Closes #2462 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Summary
On a host without a systemd user manager, every Windows and macOS host among them, 11
TestRegistrationcases inhost-setup/agent-safety/claude/test_install.pyfailed (#2462).run(), which forcesAGENT_SAFETY_CONTAINMENT_OVERRIDE=1on the installer subprocess, so the install registers the containment prefix.install.registration_problems()in-process, with no override set. That call judged containment against the host's real capability and reported the forced prefix as stale.TestRegistration.setUpnow patches the same override intoos.environfor each case, so the in-process check judges containment the same way the install did. The patch is undone in each case's cleanup.Verification
AGENT_SAFETY_CONTAINMENT_OVERRIDE=0to the test process, which makes the in-process judgment match a host that cannot contain. Before the fix,TestRegistrationfailed exactly the 11 cases Force the Containment Signal in test_install's In-Process Registration Checks #2462 lists. After it, all 26 pass with the outer signal at0, at1, and unset.test_install.pysuite passes, all 137 tests, both with the outer signal at0and on this host's real signal.Fixes #2462
🤖 Generated with Claude Code
Summary by CodeRabbit