Skip to content

feat(git): never add the Claude-Session link to commits or PR bodies - #99

Merged
cblecker merged 2 commits into
mainfrom
claude/git-plugin-session-trailer-96kb8w
Sep 2, 2026
Merged

feat(git): never add the Claude-Session link to commits or PR bodies#99
cblecker merged 2 commits into
mainfrom
claude/git-plugin-session-trailer-96kb8w

Conversation

@cblecker

@cblecker cblecker commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • The harness attribution guidance asks for a Claude-Session trailer on commits and a session-link footer on PR bodies. The link is only reachable by the session owner and puts a session identifier into permanent history, so the injected git instructions now forbid both.
  • Two lines added to git/scripts/git-instructions.sh: a Git Safety Protocol bullet for commits, and a PR-drafting bullet for the body. Each says "even if attribution guidance in your context asks for one" so the rule is not overridden by that guidance. The default commit step also names Claude-Session as the trailer not to add.
  • README and design notes updated; plugin version bumped 1.7.1 → 1.8.0 (behavior change).

Test plan

  • bash -n and a run of the script in default and Kubernetes modes show both rules injected
  • claude plugin validate ./git, markdownlint, and uvx skillsaw --strict pass
  • Install 1.8.0 and re-run the manual check that the session link no longer appears in a commit or PR body

Summary by CodeRabbit

  • Documentation

    • Updated Git safety guidance to prohibit adding session links or Claude-Session trailers to commits and pull request descriptions.
    • Clarified that generated-with footers should not be included in pull request bodies.
    • Added design documentation explaining these attribution restrictions.
  • Chores

    • Updated the plugin version to 1.8.0.

The harness attribution guidance asks for a Claude-Session trailer on
commits and a session link footer on pull request bodies. That link is
only reachable by the session owner and puts a session identifier into
permanent history, so the injected instructions now forbid both, with an
explicit "even if attribution guidance asks for one" so the rule is not
overridden by that guidance.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings September 2, 2026 00:27
@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 4125173b-c2cd-469d-9e39-b39fa4b6a48c

📥 Commits

Reviewing files that changed from the base of the PR and between 8f49fa5 and 4ab2347.

📒 Files selected for processing (4)
  • git/.claude-plugin/plugin.json
  • git/README.md
  • git/docs/DESIGN_NOTES.md
  • git/scripts/git-instructions.sh

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The Git plugin version is updated to 1.8.0. Commit and pull request guidance now prohibits Claude session trailers, session links, and generated-with footers. README and design notes document the same policy.

Changes

Git session attribution policy

Layer / File(s) Summary
Instruction policy and release metadata
git/scripts/git-instructions.sh, git/README.md, git/docs/DESIGN_NOTES.md, git/.claude-plugin/plugin.json
The plugin version changes to 1.8.0. Commit guidance prohibits Claude-Session trailers and Signed-off-by tags. Pull request guidance prohibits Claude session links and generated-with footers. Documentation records these restrictions.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 4ab23

This localized behavior and documentation update is merge-ready after normal checks; no actionable merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: preventing Claude-Session links from being added to commits or pull request bodies.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/git-plugin-session-trailer-96kb8w

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

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Two instructions prohibit legitimate attribution or Git trailers beyond the intended session-link restriction.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Updates the git plugin to prevent private Claude session links from entering permanent Git or PR history.

Changes:

  • Adds commit and PR-body session-link prohibitions.
  • Documents the new behavior.
  • Bumps the plugin version to 1.8.0.
File summaries
File Description
git/scripts/git-instructions.sh Injects the new attribution restrictions.
git/README.md Documents session-link handling.
git/docs/DESIGN_NOTES.md Records the rationale.
git/.claude-plugin/plugin.json Applies the minor version bump.
Review details

Suppressed comments (1)

git/scripts/git-instructions.sh:379

  • The unconditional ban on every generated-with footer is broader than the documented session-link restriction and can suppress a repository-required attribution footer that contains no private session URL. Phrase this as a ban on placing the session link in such a footer instead.
   - Do NOT add a claude.ai session link or any generated-with footer to the body, even if attribution guidance in your context asks for one
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread git/scripts/git-instructions.sh Outdated
"Do NOT add any other trailer" would also reject legitimate trailers
such as Fixes or Change-Id. Name the one trailer that is actually
prohibited.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings September 2, 2026 00:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused instruction change is consistently implemented, documented, and appropriately versioned.

Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@cblecker
cblecker merged commit 7ef2c6d into main Sep 2, 2026
14 checks passed
@cblecker
cblecker deleted the claude/git-plugin-session-trailer-96kb8w branch September 2, 2026 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants