Skip to content

State That a Worktree Does Not Use the Shared Git Stash - #2899

Merged
ptr727 merged 2 commits into
developfrom
feature/worktree-shared-stash
Oct 12, 2026
Merged

ptr727 merged 2 commits into
developfrom
feature/worktree-shared-stash

Conversation

@ptr727

@ptr727 ptr727 commented Oct 12, 2026

Copy link
Copy Markdown
Owner

Summary

git stash keeps one stash list per repository, refs/stash, and every worktree of that repository shares it, so a git stash pop in one worktree can pop another task's entry. The repo-worktree Skill's "The Mandate" section now states that a task in a worktree does not use git stash. It copies work in progress to a scratch directory of its own instead, or, where it is authorized to commit, commits it on its own branch.

The scope is the Skill only. Whether GOVERNANCE.md "Repository Boundaries and Write Safety" and the host-wide agent-safety block should also name the stash is a separate maintainer decision, filed as a follow-up.

Changes

  • .agents/skills/repo-worktree/SKILL.md: one new bullet in "The Mandate". The section has no include region, so the text is source-authored.
  • .github/skills/ and .claude-plugin/fleet-skills/: regenerated with python3 scripts/build_dist.py, and --check passes.

Verification

  • python3 scripts/prose_lint.py --diff <merge-base> passes, with and without --check sentence-length.
  • python3 scripts/repo_gate.py --check eol and --check eol-coverage pass.
  • python3 spec/validate.py passes.
  • python3 scripts/build_dist.py --check passes.
  • scripts/docker_lint.py --linter markdownlint --linter editorconfig-checker passes.
  • Two local strict review passes ran. The first raised two findings, both fixed in 93ae5c7: a sentence over the length limit, and a commit remedy stated without the commit-authorization condition from git-commit-conventions. The second pass raised none.

Closes #2896

🤖 Generated with Claude Code

The stash is one list per repository, shared by every worktree, so a stash pop in one worktree can pop another task's entry. The repo-worktree Skill's mandate now says a task commits work in progress on its own branch, or copies a file to its own scratch directory, instead.
…orization

A task without commit authorization now reads a remedy it can follow, and the stash sentence drops a clause that repeated itself.
Copilot AI lite review requested due to automatic review settings October 12, 2026 19:03
@ptr727

ptr727 commented Oct 12, 2026

Copy link
Copy Markdown
Owner Author

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

@coderabbitai

coderabbitai Bot commented Oct 12, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5f6dd230-7833-4004-8adc-242f4f62890f

  • 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

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

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 unresolved review issues were identified.

0 open findings

What changed in this PR

Updates worktree guidance to prohibit shared git stash usage and document safer alternatives.

Changes:

  • Adds stash-isolation guidance to the authored skill.
  • Regenerates GitHub and Claude skill copies.
  • Updates the source digest.
File Description
.github/​skills/​repo-worktree/​SKILL.md Generated GitHub skill copy
.claude-plugin/​fleet-skills/​skills/​repo-worktree/​SKILL.md Generated Claude skill copy
.claude-plugin/​fleet-skills/​.source-digests/​repo-worktree Updated source digest
.agents/​skills/​repo-worktree/​SKILL.md Authored stash-isolation guidance

🧠 Review effort: Lite


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

@codecov

codecov Bot commented Oct 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.63%. Comparing base (c978e6e) to head (93ae5c7).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2899   +/-   ##
========================================
  Coverage    59.63%   59.63%           
========================================
  Files           16       16           
  Lines         8684     8684           
========================================
  Hits          5179     5179           
  Misses        3505     3505           
Flag Coverage Δ
python-3.13 59.63% <ø> (ø)

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 94f220f into develop Oct 12, 2026
14 checks passed
@ptr727
ptr727 deleted the feature/worktree-shared-stash branch October 12, 2026 19:11
ptr727 added a commit that referenced this pull request Oct 12, 2026
…in (#2908)

- #2899 states in the `repo-worktree` skill that a worktree does not use
the shared git stash
- #2905 accepts a folded dispatch guard in D4.1 and extends the 5B N/A
rule to a schedule that never publishes
- #2901 allows a comment to name the contract section holding its why,
without restating it
- #2906 reads the handoff chain from the issue connection rather than
the search index

Closes #2896
Closes #2889
Closes #2888

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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.

2 participants