Skip to content

Describe the Write Guard's Quoted Directory, Command Word, and Substitution Readings - #3001

Merged
ptr727 merged 5 commits into
developfrom
feature/guard-readme-readings
Oct 14, 2026
Merged

ptr727 merged 5 commits into
developfrom
feature/guard-readme-readings

Conversation

@ptr727

@ptr727 ptr727 commented Oct 14, 2026

Copy link
Copy Markdown
Owner

Brings the two READMEs that describe the write guard in line with the readings the guard gained in #2994.

  • A -C, --git-dir, or --work-tree value that word splitting may split is denied on every git subcommand, with the quoting fix named for an unquoted variable.
  • A command word holding a $ or a backtick is denied where the subcommand is push or commit.
  • The body of a command substitution is read as a command.

Two review rounds narrowed the wording to what the guard delivers. The gaps they found in the guard itself are filed as #2998, #2999, and #3000.

Closes #2990

Verification: prose_lint with --diff, repo_gate.py, spec/validate.py, build_dist.py --check, and the docker linters pass.

🤖 Generated with Claude Code

Copilot AI lite review requested due to automatic review settings October 14, 2026 16:09
@coderabbitai

coderabbitai Bot commented Oct 14, 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: a979ed4e-ee61-4617-8e51-c9f4bbab4649
  • 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.

@ptr727

ptr727 commented Oct 14, 2026

Copy link
Copy Markdown
Owner Author

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

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.

🟡 Changes recommended

The documentation overstates substitution coverage and omits some directory-value behavior.

3 open findings
What changed in this PR

This PR updates the write guard documentation to describe the directory-value, command-word, and substitution readings added by the earlier guard change.

Changes:

  • Clarifies when directory values and run-time command words are denied.
  • Adds command substitution bodies to the described guard checks.
File Description
host-setup/​agent-safety/​README.md Expands the guard requirement and its examples.
host-setup/​agent-safety/​claude/​README.md Updates the Claude hook summary.

🧠 Review effort: Lite


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread host-setup/agent-safety/README.md Resolved
Comment thread host-setup/agent-safety/README.md Resolved
@codecov

codecov Bot commented Oct 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (develop@dbd80de). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #3001   +/-   ##
==========================================
  Coverage           ?   60.92%           
==========================================
  Files              ?       17           
  Lines              ?     8996           
  Branches           ?        0           
==========================================
  Hits               ?     5481           
  Misses             ?     3515           
  Partials           ?        0           
Flag Coverage Δ
python-3.13 60.92% <ø> (?)

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 commented Oct 14, 2026

Copy link
Copy Markdown
Owner Author

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

@ptr727
ptr727 merged commit 6664651 into develop Oct 14, 2026
13 checks passed
@ptr727
ptr727 deleted the feature/guard-readme-readings branch October 14, 2026 16:27
ptr727 added a commit that referenced this pull request Oct 14, 2026
…and Write-Guard Split Directory and Substitution Denies to Main (#3002)

- #2986 makes `pr_review.py` count a Copilot finding named only in the
overview file table, or only in a headline total larger than the open
sections list, under `FINDINGS WITH NO THREAD`, so the gate reads a
finding the round opened no thread or open-findings entry for
- #2988 makes `pr_review.py cleanup` refuse a branch delete where
another open pull request in the repository uses the branch as its head
or base, naming them, and drops the hand-typed `git push origin
--delete` fallback from `drive-pr` step 4 and `merge-and-release` step
8, so a seat that cannot run `cleanup` reports the delete to the
maintainer. The failed-rules-read test now asserts the stub's stderr
text and exit code
- #2992 names `pr_review.py cleanup` as the branch delete in
`backlog-burndown` and in `scripts/README.md`, with any nonzero exit, or
a seat that cannot run it, reported to the maintainer
- #2994 makes `gh-write-guard` deny an unquoted `-C`, `--git-dir`, or
`--work-tree` value that word splitting may split, on every git
subcommand, naming quoting the variable as the fix, deny a command word
holding a `$` or a backtick where its subcommand is `push` or `commit`,
and read the body of a double-quoted `$(...)` or backtick substitution,
and of an unquoted backtick substitution, as a command, so a git push or
commit hidden there reaches every check. A heredoc body inside such a
substitution stays data
- #3001 describes those readings in the two agent-safety READMEs

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

Closes #2982
Closes #2969
Closes #2971
Closes #2983
Closes #2987
Closes #2976
Closes #2977
Closes #2990

🤖 Generated with [Claude Code](https://claude.com/claude-code)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Branch cleanup now checks that the branch still matches the pull
request and is not used by another open pull request before deletion. If
checks fail or cleanup cannot run, maintainers are asked to handle it;
remotely pushed abandoned branches are not deleted automatically.
* Review summaries now account for findings in file-table annotations
and headlines, reducing the chance that unthreaded findings go
uncounted.

* **Safety**
* Command safeguards now inspect command substitutions and reject
ambiguous directory values and command forms that could conceal Git
operations.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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