Skip to content

Warn of a Host-Set Session Link in the Report - #4331

Merged
ptr727 merged 1 commit into
developfrom
burndown/session-url-report-drift
Nov 22, 2026
Merged

ptr727 merged 1 commit into
developfrom
burndown/session-url-report-drift

Conversation

@ptr727

@ptr727 ptr727 commented Nov 22, 2026

Copy link
Copy Markdown
Owner

--report printed a plain note when the host itself set attribution.sessionUrl (or attribution) 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 one WARNING: 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 then CURRENT and exits 0. A host with no usable stamp exits 2 before reaching it.
  • Only an absent key stays drift in registration_problems, since a re-run clears it. Install behaviour is unchanged, and step 3c's message now says --report warns of it.
  • README line 30 is updated to match. Tests cover host true, attribution: true and non-object values (exit 0, WARNING, value left in place), false and sessionUrl: false (no WARNING), absent (STALE, install writes false), and the WARNING ordering before STALE and its absence without a stamp.
  • The comments label 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.py runs 244 tests, all OK. ruff format and check are clean.

🤖 Generated with Claude Code

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]>
@ptr727 ptr727 added the comments Permits the comment lines the pull request adds or edits, which the prose gate otherwise refuses label Nov 22, 2026
@coderabbitai

coderabbitai Bot commented Nov 22, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • 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.

Share

@ptr727

ptr727 commented Nov 22, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 8a97e4a07cf6c016f1922fcda365519c1639249a, the content this pull request carries at that commit against develop, and it recorded 0 findings.

Copilot AI lite review requested due to automatic review settings November 22, 2026 00:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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: before CURRENT or STALE for 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

codecov Bot commented Nov 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 79.14%. Comparing base (84b2cab) to head (8a97e4a).

Files with missing lines Patch % Lines
host-setup/agent-safety/claude/install.py 0.00% 1 Missing ⚠️
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           
Flag Coverage Δ
python-3.13 79.14% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ptr727
ptr727 merged commit 81fbb96 into develop Nov 22, 2026
15 checks passed
@ptr727
ptr727 deleted the burndown/session-url-report-drift branch November 22, 2026 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comments Permits the comment lines the pull request adds or edits, which the prose gate otherwise refuses

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants