Skip to content

Name the Shared Git Stash in the Write-Safety Law and Host Block - #2913

Merged
ptr727 merged 3 commits into
developfrom
feature/stash-write-safety
Oct 12, 2026
Merged

ptr727 merged 3 commits into
developfrom
feature/stash-write-safety

Conversation

@ptr727

@ptr727 ptr727 commented Oct 12, 2026

Copy link
Copy Markdown
Owner

Summary

Names the shared stash in the write-safety law, per the maintainer's decision on #2900.

  • GOVERNANCE.md "Repository Boundaries and Write Safety": the task-isolation bullet lists git stash pop beside the blanket add, the hard reset, and the branch switch, with its reason (the stash is one list per repository shared by every worktree). A closing sentence says no working directory scopes the stash list, so a task leaves the stash alone, since the absolute-path habit does not protect it.
  • The footprint-cleanup bullet now says to save work aside in a scratch directory of your own, so "save aside" no longer reads as the stash this rule rules out.
  • host-setup/agent-safety/claude/claude-md-safety.md: the same rule in the host block's compact form, as its own sentence, so the absolute-path remedy is not read as covering the stash.

Matches the repo-worktree Skill's existing stash bullet. No Skill carries this bullet as a generated include.

Local Review

Three local-strict-review passes at the frontier tier. The last one is recorded.

  • Fixed: the absolute-path "so" covering the stash in the host block, "no path scopes" read as false for a pathspec, the pop's harm to the other task, and the footprint bullet's "save aside" read as the stash.
  • Declined (style): advisory sentence-length on the two lengthened GOVERNANCE sentences. That check is not in the gate's default rule set, and splitting the enumeration would take the stash out of the list the decision asked for.
  • Pre-existing, filed as Reword the Pre-Commit Framework's "Stashes" Beside the Shared Stash Rule #2912: the pre-commit framework is described as one that "stashes" unstaged changes.

Verification

The full local gate block in OPERATIONS.md passed: ruff, mypy, unittest, the selftests, test_install.py, build_dist.py --check, repo_gate.py, prose lint, spec/validate.py, and every docker linter. After the review fixes, prose lint, repo_gate.py, spec/validate.py, and markdownlint were re-run.

Closes #2900

🤖 Generated with Claude Code

ptr727 and others added 3 commits October 12, 2026 13:27
The stash is one list per repository shared by every worktree, so a
pop in one task can apply another task's entry, and no path scopes it.
GOVERNANCE.md and the host-wide agent-safety block now name it beside
the blanket add, the hard reset, and the branch switch.

Closes #2900

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… Stash Clause

The footprint-cleanup bullet said to save work aside without naming how,
and the obvious way is the stash the bullet above now rules out. The host
block's stash remedy moves to its own sentence so the absolute-path remedy
is not read as covering it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The host block listed the stash pop inside the sentence whose remedy is an
absolute path, which no path makes safe, so it now has its own sentence.
Both surfaces say no working directory scopes the stash list, and the law
names the pop as popping another task's entry, matching the worktree Skill.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 56 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6c9a4f60-4cee-4b96-bfd1-8864978b9847

📥 Commits

Reviewing files that changed from the base of the PR and between 26b8da7 and 46ce641.


📒 Files selected for processing (2)
  • GOVERNANCE.md
  • host-setup/agent-safety/claude/claude-md-safety.md

  • 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 findings remain.

0 open findings

What changed in this PR

This pull request documents that Git stash state is shared across worktrees and updates the related safety guidance.

Changes:

  • Adds the shared-stash restriction to GOVERNANCE.md.
  • Mirrors it in the Claude host safety block.
  • Clarifies use of private scratch directories for cleanup.
File Description
host-setup/​agent-safety/​claude/​claude-md-safety.md Mirrors the shared-stash safety rule.
GOVERNANCE.md Updates write-safety and cleanup guidance.

🧠 Review effort: Lite


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

@ptr727

ptr727 commented Oct 12, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@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.77%. Comparing base (9b93724) to head (46ce641).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2913      +/-   ##
===========================================
+ Coverage    59.75%   59.77%   +0.01%     
===========================================
  Files           16       16              
  Lines         8709     8713       +4     
===========================================
+ Hits          5204     5208       +4     
  Misses        3505     3505              
Flag Coverage Δ
python-3.13 59.77% <ø> (+0.01%) ⬆️

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 cef4c0f into develop Oct 12, 2026
14 checks passed
@ptr727
ptr727 deleted the feature/stash-write-safety branch October 12, 2026 20:51
ptr727 added a commit that referenced this pull request Oct 12, 2026
…t Citation Fixes to Main (#2919)

- #2910 reads the open handoff chain through `handoff.py tracks --json`
in the `session-handoff` and `unattended-handoff` skills, not the search
index
- #2913 names the shared stash in the GOVERNANCE.md write-safety law and
the host-wide agent-safety block
- #2914 shares one GraphQL transport and cursor walker between
`pr_review.py` and `handoff.py`
- #2911 states the no-`push` condition in D4.1 and drops the `!=
'schedule'` form from the audit
- #2918 lets a comment cite a contract section without echoing it, and
cites the Concurrency exceptions by number

Closes #2902
Closes #2900
Closes #2903
Closes #2904
Closes #2907

🤖 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