Repository navigation
Conversation
…n Checks (#2465) ## Summary On a host without a systemd user manager, every Windows and macOS host among them, 11 `TestRegistration` cases in `host-setup/agent-safety/claude/test_install.py` failed (#2462). - Each case installs through `run()`, which forces `AGENT_SAFETY_CONTAINMENT_OVERRIDE=1` on the installer subprocess, so the install registers the containment prefix. - The case then calls `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.setUp` now patches the same override into `os.environ` for 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 - Reproduced on Linux by exporting `AGENT_SAFETY_CONTAINMENT_OVERRIDE=0` to the test process, which makes the in-process judgment match a host that cannot contain. Before the fix, `TestRegistration` failed exactly the 11 cases #2462 lists. After it, all 26 pass with the outer signal at `0`, at `1`, and unset. - The whole `test_install.py` suite passes, all 137 tests, both with the outer signal at `0` and on this host's real signal. - ruff and the prose gate are clean, and the local strict review raised no finding. - The native Windows run is still to come, and the maintainer runs it. Fixes #2462 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Tests** * Test setup now applies the safety-containment configuration consistently and cleans up environment changes after each test. This helps keep test runs isolated and repeatable without changing the app’s user-facing behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Claude Opus 5.5 <[email protected]>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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 |
|
CodeRabbit is not prompted here, because its one included review per hour went to #2465, which it reviewed at head
|
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The reviewed test-only change has no unresolved blocking issues.
Review effort: Lite
Findings: None
What changed in this PR
Test-only fix aligning in-process registration checks with the containment signal used by installer subprocesses.
Changes:
- Forces containment capability during
TestRegistrationsetup. - Restores the environment after each test.
| File | Description |
|---|---|
host-setup/agent-safety/claude/test_install.py |
Aligns test-process containment state with installer behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2466 +/- ##
=======================================
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:
|
Summary
Promotes #2465 to
main. On a host without a systemd user manager, every Windows and macOS host among them, 11TestRegistrationcases in the agent-safety install suite failed. Each case installs through a subprocess that forces the containment signal on. The in-processregistration_problems()check that follows read the host's real capability instead, and judged the forced prefix as stale.TestRegistrationnow 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