Repository navigation
Warn of a Host-Set Session Link in the Report - #4331
Conversation
A host-set attribution.sessionUrl that leaves the link on printed only a note that read as current. --report now prints a WARNING line before the verdict naming the value and the fix. The verdict and exit code are unchanged, so a host otherwise current still reads CURRENT, and a re-run still leaves the host's value alone. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
|
A recorded local strict-review pass covers head |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported, and the changes include targeted coverage for warning behavior while preserving verdict and exit-code semantics.
No open issues 🎉
What changed in this PR
This PR updates the Claude host-safety report so host-owned session-link settings produce a visible warning without changing installation behavior, verdicts, or exit codes.
Changes:
- Reports
WARNING:beforeCURRENTorSTALEfor foreign session-link settings. - Preserves host-owned values while treating absent settings as installation drift.
- Adds coverage for warning states, ordering, missing stamps, and unchanged exit codes.
- Updates the README and installer messaging.
The test suite reports 245 tests, while the pull request description currently states 244.
| File | Description |
|---|---|
| host-setup/agent-safety/claude/test_install.py | Adds tests covering warning behavior, verdict ordering, exit codes, preserved host values, and missing-stamp handling. |
| host-setup/agent-safety/claude/README.md | Documents warnings for host-owned session-link settings and the unchanged verdict semantics. |
| host-setup/agent-safety/claude/install.py | Emits warnings for host-owned session-link settings and updates installer messaging while preserving existing report behavior. |
Review effort: Lite
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #4331 +/- ##
========================================
Coverage 79.14% 79.14%
========================================
Files 45 45
Lines 15918 15918
========================================
Hits 12598 12598
Misses 3320 3320
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:
|
--reportprinted a plain note when the host itself setattribution.sessionUrl(orattribution) to a value that leaves the session link on. A re-run leaves that value alone, so this change makes the report warn of it loudly without calling the machine stale.report()prints oneWARNING:line before a CURRENT or STALE verdict whenever the session-link state is foreign. The verdict and exit code are unchanged, so an otherwise current host prints the WARNING thenCURRENTand exits 0. A host with no usable stamp exits 2 before reaching it.registration_problems, since a re-run clears it. Install behaviour is unchanged, and step 3c's message now says--reportwarns of it.true,attribution: trueand non-object values (exit 0, WARNING, value left in place),falseandsessionUrl: false(no WARNING), absent (STALE, install writes false), and the WARNING ordering before STALE and its absence without a stamp.commentslabel is needed, as the change edits two code comment lines.The maintainer's decision, keeping the host's value and warning rather than reporting drift, is in #1264 (comment).
Closes on promotion: none
Verification:
python3 host-setup/agent-safety/claude/test_install.pyruns 244 tests, all OK. ruff format and check are clean.🤖 Generated with Claude Code