Skip to content

Describe the Write Guard's Prune, Mirror, heads/, and Push-Target Readings - #3042

Merged
ptr727 merged 3 commits into
developfrom
feature/guard-readme-readings-3021
Oct 15, 2026
Merged

ptr727 merged 3 commits into
developfrom
feature/guard-readme-readings-3021

Conversation

@ptr727

@ptr727 ptr727 commented Oct 15, 2026

Copy link
Copy Markdown
Owner

Summary

The agent-safety READMEs now describe the push readings the write guard performs since the earlier write-guard changes, and nothing beyond them. Both files change only inside the requirement 4 push-reading text.

  • --prune joins the push options read as git reads them. Beside a refspec pattern that can match under refs/heads/, a lone : refspec, --all, or a bare push, a --prune is read as deleting every branch protected by default.
  • A --mirror push with no refspec is read as forcing and deleting every branch protected by default.
  • A destination outside refs/ that starts heads/, such as HEAD:heads/develop or :heads/develop, is read as the branch after heads/ as well as by its literal name.
  • The root README replaces the remote-tracking sentence with the full @{push} reading: a listed remote name is stripped with its / where it leads the text after refs/remotes/, and that text is also checked whole and with its first segment dropped.
  • Both READMEs state that a bare push is denied when its push target resolves but git remote cannot list the remotes.

Each reading was confirmed against _push_targets, _dst_branches, _push_ref_branches, _read_branch, and _check_push_bypass at develop's tip, and by a scratch probe calling _push_targets on constructed commands.

Local review

Three recorded local-strict-review passes. The first raised a wording imprecision on the remote-name strip and three new sentences over 25 words, all fixed. The second raised an ambiguous "That text" referent, fixed. The third raised nothing. The one remaining --check sentence-length hit in the root README is the unchanged "A force-push and a delete each write the branch too" sentence, reflowed onto a changed line, so it is pre-existing rather than introduced.

Closes on promotion: #3021

🤖 Generated with Claude Code

ptr727 and others added 3 commits October 14, 2026 18:55
…dings

The agent-safety READMEs now state how the push check reads --prune,
--mirror, a heads/ destination, and a bare push's full push-target name,
and that a bare push is denied when git cannot list the remotes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Name prune among the push options read as git reads them, split the
heads/ completion sentence, and state that a remote name is stripped
only where a slash follows it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The sentence after the remote-name strip now names the text after
refs/remotes/ rather than a pronoun that reads as the stripped name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings October 15, 2026 02:02
@ptr727 ptr727 added the documentation Improvements or additions to documentation label Oct 15, 2026
@ptr727

ptr727 commented Oct 15, 2026

Copy link
Copy Markdown
Owner Author

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

@coderabbitai

coderabbitai Bot commented Oct 15, 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: 3ff25a0b-1db6-416e-83d1-6ab81e865e2b
  • 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

Documentation changes are consistent and have no unresolved review issues.

0 open findings

What changed in this PR

Updates both agent-safety READMEs to document the write guard’s current push-target parsing behavior.

Changes:

  • Documents --prune, --mirror, and heads/ handling.
  • Documents @{push} remote resolution and failure behavior.
File Summary
host-setup/​agent-safety/​README.md Updates requirement 4 push-reading documentation.
host-setup/​agent-safety/​claude/​README.md Mirrors the updated write-guard behavior.

🧠 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 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.00%. Comparing base (02f21a5) to head (6f2d70a).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3042   +/-   ##
========================================
  Coverage    61.00%   61.00%           
========================================
  Files           17       17           
  Lines         9014     9014           
========================================
  Hits          5499     5499           
  Misses        3515     3515           
Flag Coverage Δ
python-3.13 61.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 4720440 into develop Oct 15, 2026
14 checks passed
@ptr727
ptr727 deleted the feature/guard-readme-readings-3021 branch October 15, 2026 02:10
ptr727 added a commit that referenced this pull request Oct 15, 2026
… Narrative Findings, and Bootstrap Handoff Tests to Main (#3051)

- #3042 brings the agent-safety READMEs up to the write guard's #3023
and #3037 readings: `--prune` beside a pattern, `:`, `--all`, or a bare
push, a `--mirror` push with no refspec, a `heads/` destination outside
`refs/`, the full `@{push}` read, and a bare push denied when `git
remote` cannot list the remotes
- #3041 has `backlog-burndown` keep an abandoned group's claim comment
until cleanup decides its release, say stopped on each path that sends a
group to the maintainer, and name a branch no pull request has used when
a claim comment first names it
- #3044 tests `bootstrap.sh`'s `--report` handoff to the agent tools
step, tests the `--agents` handoff on Linux and through
`Invoke-AgentsInstall` under `pwsh`, and moves the unprivileged-root
probe into `tests/host_capability.py`
- #3045 makes `pr_review.py` read an `Open findings remain:` list in a
Copilot review and count each entry no thread of the round accounts for,
pairing by severity tier and file, so the count can only rise
- #3049 makes `gh-write-guard` read a bare push's destination from
`push.default` and `branch.<name>.merge`, read a persisted
`remote.<name>.mirror`, deny when the `@{push}` read times out or cannot
run, give a dash-named word after `--` or `--end-of-options` a reading
as a remote or refspec, and judge a push moved into another checkout
against that checkout's origin as well. A differential against the
previous guard found no deny-to-allow flip. It addresses one item of
#2943, which stays open
- #3054 makes `gh-write-guard` answer unresolved, and so deny, when its
`push.default` read times out or cannot run, a promotion fix for this
pull request's first review
- #3062 brings both agent-safety READMEs up to #3054: an unset
`push.default` is read as `simple`, both destinations are read for a
value git does not define or a read exiting with any other error, and a
read that times out or cannot run is denied
- #3059 bumps `actions/create-github-app-token` from 3.2.0 to 3.3.0

After this merges, the host-safety installer payload changes, so the
maintainer runs the installer after promotion.

Fixes #3021
Fixes #3026
Fixes #3027
Fixes #3039
Fixes #3033
Fixes #3038
Fixes #3034
Fixes #3031
Fixes #3019
Fixes #3020
Fixes #3029
Fixes #3036
Fixes #3052

🤖 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

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants