You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Promote the Write-Guard Bare Push and Checkout Readings, pr_review.py Narrative Findings, and Bootstrap Handoff Tests to Main - #3051
…dings (#3042)
## 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](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
…ch in backlog-burndown (#3041)
Three wording fixes in the `backlog-burndown` skill, all in
`.agents/skills/backlog-burndown/SKILL.md`, with the generated
`.github/skills/` and `.claude-plugin/` copies regenerated by
`scripts/build_dist.py`.
- "Grouping and File Claims": a group told to abandon its branch now
keeps its claim comment unchanged at adjudication, since cleanup decides
whether that claim is released. Before this, the "either direction"
update could release the claim of a group that cleanup later stops, and
a stopped group keeps its branch and its claim.
- "Cleanup Is the Orchestrator's" and "Bounding the Wait on a Worker":
the two paths that said the group "goes to the maintainer" now say it
"is stopped for the maintainer per "Raising a Blocked Question"", the
same wording the neighboring sentences already used. "Ranking" keys off
that stopped state.
- "Dispatching a Worker": a branch a claim comment names for the first
time must be one no pull request on the repository has used as its head.
That is checked with `gh pr list --head <name> --state all` before the
comment is written. Re-dispatching onto a branch an existing claim
already names is unaffected.
Local strict review: three passes, recorded and attested. Pass 1 raised
two findings on the new sentences, and both were fixed. Pass 2 raised
the same two again. The 3039 one was fixed. The 3026 one, that the
winner and the abandoning loser both name the contested file until
cleanup, was declined with evidence that pass 3 accepted. Both records
are accurate, the loser stops editing once told to abandon, and the
claim check before any dispatch defers a resumed loser while the winner
holds the file. Pass 3 raised no findings. The opt-in `sentence-length`
check flags the edited sentences and was declined as style.
Closes on promotion: #3026, #3027, #3039
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
…ability (#3044)
Adds tests for the bootstrap loaders' agent tools handoff and moves the
unprivileged-root probe into the shared capability module. Test-side
only: no script under test changed.
Closes on promotion: #3033, #3038, #3034
- `TestKeptTreeEndToEnd` gains `--report` cases: all five steps run, a
failing agent tools step still completes and prints the "did not report"
line, and a root run (via `unshare -r`) skips the step with its "Running
as root" line.
- `TestKeptTreeEndToEnd` gains `--agents` cases: a comma list hands off
as `--install <names>`, `all` as `--install --all`, and an empty or
missing list is refused before anything runs or any directory is
created.
- `TestPowerShellToolHandoff` gains `Invoke-AgentsInstall` cases run
through `pwsh` on Linux against stub tools: comma list, separate words,
`all` alone, `all` beside other names refused, empty list refused. The
comma split line is read from `bootstrap.ps1` itself.
- `unprivileged_root_is_available` moves to `tests/host_capability.py`
as a cached probe with a `requires_unprivileged_root` decorator.
`test_bootstrap.py` no longer imports a test module.
Each new test was shown to fail by breaking the matching behavior in a
scratch copy of the loaders (gate dropped, info line dropped, `--all`
mapping, comma split, empty-list guard, `all` handling).
Unverified natively: the Windows cases run under `pwsh` on Linux, so
they exercise the loader's functions and argument handoff but not a real
Windows host (for example `-File` comma handling by the Windows
PowerShell host). The Windows `Test-Elevated` branch is stood in for, as
in the existing cases. The Linux and Windows loaders differ on `all`
beside other names and on empty names in a list, filed as #3043.
Local review: two adversarial passes. Fixed: unfiltered step assertions,
directory-untouched assertion, argument boundaries in the stubs,
root-run skips, stale docstrings. Declined: sentence-length hits on a
docstring moved verbatim (pre-existing text), import-time probe (matches
`requires_symlink`), `STUB_ARGS_TOOL` duplication (a single stub would
change step names other tests assert).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Sonnet 5.5 <[email protected]>
…3045)
## Summary
A second-format Copilot round can restate its open findings in the `What
changed in this PR` narrative block under an `Open findings remain:`
label. Some entries there name findings no review thread carries.
`status` read no such list, so it printed no `FINDINGS WITH NO THREAD`
block for them.
`status` now reads that list and pairs each entry with a thread the head
round accounts for. Each thread pairs with one entry at most, and an
entry left unpaired counts toward `FINDINGS WITH NO THREAD`:
- An entry pairs only with a thread whose open-section entry is badged
at the severity tier the entry's own bold word states
(`critical`/`high`, `moderate`/`medium`, `nit`/`low`). Where the entry
names a file, it must also be that thread's file. A file alone would
pair an entry with an unrelated thread on the same file and hide it.
- An entry naming no file pairs on the tier alone.
- An entry stating `votes each` counts as two findings.
- An entry or a thread whose tier is not read pairs with nothing. That
overstates the count rather than hiding a finding.
- The count joins the existing shortfall readings through `max`, so it
can only raise the reported number.
`prose_findings`, `unpaired`, and `round_thread_paths` are refactored
onto shared helpers (`labelled_entries`, `entry_paths`, `unmatched`,
`round_accounted_threads`), with their behavior unchanged. The badge
tier is read through the existing `SEVERITY_TEXT` pattern, which gains a
capture group.
## Verification
- Tests written first against constructed bodies and threads. At
develop's tip, the issue's shape printed `overview=4/4` with no
`FINDINGS WITH NO THREAD` block. With this change it reports 3, and a
narrative carrying no such list reads as before.
- Mutation-tested. Each of these reverts fails the suite: dropping the
wiring into the count, pairing on the file alone, letting an untiered
entry pair, never pairing a pathless entry, misspelling the label,
dropping the `votes each` doubling, and doubling on any `each`.
- `tests/test_pr_review.py` (all pass), `tests/test_cli_usage.py`, ruff
format and check, mypy, `prose_lint.py --diff` with and without `--check
sentence-length`, `repo_gate.py --check eol` and `--check eol-coverage`,
`spec/validate.py`.
- Three recorded `local-strict-review` passes. All `introduced` findings
were fixed. Two design findings were declined with evidence: a separate
badge walker beside `read_overview`, and a loose list stopping at a
blank line, which predates this change. No finding is left open.
Closes on promotion: #3031
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
…, and Its Own Checkout in the Write Guard (#3049)
## Summary
Closes the write guard's bare-push and `@{push}` allow gaps, plus one
#2943 item. Every changed verdict goes from allow to deny.
- **#3019, the destination comes from branch config too.**
`_current_push_branch` keeps the `@{push}` read and adds
`_configured_push_branches`. That function reads `push.default` and
`branch.<name>.merge`. `current` and `simple` give the branch's own
name, and `upstream` and `tracking` give each merge branch. A
`push.default` that cannot be read, or holds a value git does not
define, gives both. The two readings are combined, so a fetch refspec
that maps under `refs/remotes/origin/mirror/*`, or a missing
remote-tracking ref, no longer hides `develop`.
- **#3020, persisted mirror.** `_remote_mirrors` reads
`remote.<name>.mirror` for a push with no refspec and no `--mirror`, in
the directory the push runs in. It reads the named remote's key, or
every remote's key when the push names none. A true value, a value that
is not a boolean, or a read that cannot answer adds a `mirror` op on
each protected default. That op denies where the rules forbid a force, a
delete, or a direct write.
- **#3036, failed reads.** `_git_read` returns the exit status beside
the output, and `_git_stdout` now wraps it. In `_read_branch` and the
branch config reads, a read that times out or cannot run is unresolved,
which denies. Only a non-zero exit still means "not there".
- **#3029, end of options.** A push reading with a dash-named word after
its first `--` or `--end-of-options` is read a second time, with every
word after that boundary taken as the remote or a refspec. The first
reading is unchanged, so a word there that develop read as an option
still counts.
- **#2943, partly: the checkout a push runs in.** `_push_targets` now
returns `(op, branch, repo)`. The repo is the origin of the checkout a
`-C` or leading `cd` moves the push to, from the new `_push_repo`.
`_check_push_bypass` checks each target against the session origin, as
before, and also against its own push's checkout. A checkout or origin
the guard cannot name counts as having undetermined rules, which denies
only `main`, `master`, and `develop`. That covers a missing directory,
`sudo -D`, `env -C`, a wrapper shell, a git directory variable, a later
`cd` a loop or a function may run first, and git run by a command not in
`_STAYING_LAUNCHERS`. That reading is `_repo_may_move`. A command that
may move `HEAD`, such as a checkout, does not count, since it changes
the branch and not the repository. Only that #2943 item is addressed.
Every other #2943 item stays open, and so does #2943.
The READMEs describe each new reading.
## Verification
- **Gaps confirmed at develop's tip.** Each was probed against throwaway
repositories under `mktemp -d` with `git push --dry-run --porcelain`
(git 2.47.3), and develop's `classify` allowed every one. The probes
were the mirror-namespace fetch refspec and the single-branch clone (git
wrote `develop` both times), a persisted mirror (git deleted a
remote-only branch, and with `--tags` it deleted `develop`), a timed-out
`@{push}` read, `--x:refs/heads/develop` after `--` and after
`--end-of-options`, and `-C`, `cd`, `sudo -D`, and wrapped pushes into a
checkout whose origin requires a pull request.
- **Develop-versus-branch differential.** Both guards' `classify` ran
over the same inputs: every develop `_GIT_CASES` row (301), 99,603
generated push shapes over seven constructed repositories and three rule
maps, the 133 `_PUSH_DIR_CASES`, and 189 runs of extra shapes. **0 deny
-> allow, 13,007 allow -> deny.** By mechanism, those are 5,138 pushes
into a missing directory, 2,569 each under `sudo -D`, `env -C`, and a
wrapper shell, 146 in a checkout with a persisted mirror, and 16
dash-named refspecs after the boundary. A plain push, a `timeout`
prefix, a run-time word elsewhere, a later `cd`, `git tag`/`git commit`
before a push, a glob refspec, and a checkout tracking `origin/develop`
under `push.default` unset or `current` each kept develop's verdict.
- **Revert proof.** With develop's `_check_push_bypass`,
`_push_targets`, `_current_push_branch`, `_read_branch`, and
`_git_stdout` swapped into the branch module, all 19 new deny cases in
the selftest fail and every control passes.
- `gh-write-guard.py --selftest` passes, and passes too with an empty
`PATH`, as the installer's no-git test runs it. `test_install.py` passes
(161 tests), and so does the root `tests/` suite (2,813 tests). Ruff
format and check, mypy, `prose_lint.py`, the eol and eol-coverage gates,
`spec/validate.py`, and markdownlint, editorconfig-checker, and cspell
in Docker pass too.
## Local Review
Frontier `local-strict-review` passes ran before every push. These
findings were fixed:
- A run-time word anywhere, a `timeout` prefix, or a later `cd` had
marked a push's checkout unnamed. That over-denied, so `_repo_may_move`
replaced it.
- The checkouts of all pushes in a command had been applied to every
target. Each push now carries its own.
- A README claim, a control row that proved nothing, a live git read in
the offline selftest rows, and sentence length were also fixed.
- One deny -> allow was found and removed: a decoding change on the
origin URL read was reverted to develop's strict form.
The opening push listed four `introduced` findings from its final pass.
Three are fixed on later pushes, and the fourth is filed:
- A later `cd` now moves a push's checkout only where a loop or a
function definition may run it first, so a pipe, a background job, or a
subshell after the push no longer counts.
- The launcher test skips options, numbers, and redirections, and
`setsid`, `gtimeout`, `time`, `flock`, and `winpty` keep their
directory.
- The `_repo_may_move` docstring names `uv` as its moving example.
- #3050: only the first launcher word is read, so a staying launcher in
front of a moving one hides it. Develop allows those shapes too.
Filed rather than widened here:
- #3046: a `git config` or `git remote` command before the push can
rewrite the config the guard reads.
- #3047: a timed-out persisted alias read reads as no alias.
- #3048: a push to a remote other than `origin` is judged against the
origin's rules.
- #3050: a launcher that keeps its directory can hide one that moves it.
- A persisted `remote.<name>.push` and `push.default=matching` are
already #2943 items.
Partially addressed: #2943, its item on the directory a push runs in
only.
Closes on promotion: #3019, #3020, #3029, #3036
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.21%. Comparing base (02f21a5) to head (2b0975a). ⚠️ Report is 384 commits behind head on main.
…3054)
Answers the Copilot finding on the develop -> main promotion PR #3051 at
`gh-write-guard.py`'s `_configured_push_branches`.
- A `push.default` read that times out or cannot run now returns
`_UNRESOLVED`, so a bare `git push` denies with the "Could not tell
which branch" reason. An unset `push.default` stays `simple`, and an
unlisted value or another error exit stays the "read as both" reading.
- The docstring now says which result each case gets.
- `_push_read_failure_selftest` gains a `push.default` timeout case
expecting the unresolved deny. Restoring the old line fails only that
case, since the old reading denied there for the protected-branch reason
instead.
Verification: `gh-write-guard.py --selftest` passes, and passes with an
empty `PATH`. `test_install.py` passes, and so do ruff, mypy, the prose
gate, the eol gates, and `spec/validate.py`. A differential of develop
against this branch ran `classify` over `_GIT_CASES`, `_PUSH_DIR_CASES`,
and generated bare and explicit push shapes under each `push.default`
mode, each upstream, and each single timed-out read, 2239 cases in all.
It found 0 deny-to-allow flips and 84 allow-to-deny flips. All 84 are
under a timed-out `push.default` read.
Local review findings, each with an outcome:
- `introduced`: both agent-safety READMEs still say a `push.default`
that cannot be read is read as both, and that only "any other read"
timing out denies. Another lane holds those READMEs, so this is filed as
#3052 rather than edited here.
- `introduced`, declined: the reviewer asked whether the early return is
over-hardening, since the old "both" reading never missed a protected
branch the defined modes write. The function's docstring already said "A
read that times out or cannot run is `_UNRESOLVED`", and `_read_branch`
treats every timed-out read the same way. The only cost is a fail-closed
deny on a timed-out local config read.
- `pre-existing`: a bare push under `push.default=matching` is read as
writing only the current branch, filed as #3053.
Closes on promotion:
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 5.5 <[email protected]>
Scope open-findings scan to the narrative details block
scripts/pr_review.py:2940
This reads every Open findings remain: label in the review body, not just the list inside the What changed in this PR narrative block. A body that uses the same heading in the main overview or another details section will therefore add unrelated entries to unlisted and can block an otherwise clean review. Scope the label scan to the narrative details span before pairing entries.
Answering the previously-missed finding at scripts/pr_review.py:2940, raised on head 0fff6c20:
This reads every Open findings remain: label in the review body, not just the list inside the What changed in this PR narrative block. A body that uses the same heading in the main overview or another details section will therefore add unrelated entries to unlisted and can block an otherwise clean review. Scope the label scan to the narrative details span before pairing entries.
Declined. The reading is unscoped on purpose, and the case it describes fails loud rather than silent.
The code states its own stance. unthreaded_narrative_findings' docstring says "An entry or a thread whose tier is not read pairs with nothing, which overstates rather than hides." Unpaired entries raise the count and block the gate. They never clear it. A label outside the narrative block can therefore only block a clean round, and the driver then reads the body. It cannot wave a finding through.
Scoping the scan to the What changed in this PR block would make the opposite failure possible. A round that moved the list out of that block, or renamed the block, would have its open findings dropped without anything showing it, and that is the false green this count exists to close. mask_narrative already treats the block's summary as a heading that can change rather than a fixed contract.
Under GOVERNANCE.md "Trust Boundaries and Hardening Effort", a robustness case earns a fix only where it can realistically occur and its failure is silent or destructive. The test fixture (with_narrative in tests/test_pr_review.py) places the list where it was seen, after the narrative block's change bullets. No round on this pull request carries the label as a list at all, and this case's failure is a visible block. So it is declined, and no issue is filed.
…READMEs (#3062)
A promotion fix for #3051. Since #3054, the write guard answers
unresolved, and so denies, when its `push.default` read times out or
cannot run. Both agent-safety READMEs still said such a read is read as
both destinations. They now say:
- an unset `push.default` is read as `simple`
- both destinations are read where `push.default` holds a value git does
not define, or where its read exits with any other error
- a bare push is denied where any read of its branch, its push target,
or `push.default` times out or cannot run
This answers the two README threads on #3051 and fixes#3052, the issue
filed for that drift.
The `sentence-length` hits that `prose_lint.py --diff` reports on
`host-setup/agent-safety/claude/README.md:15` are sentences that were
already there. That bullet is one physical line, so any change to it
brings every sentence in it into scope. Neither new sentence exceeds the
limit.
Two local strict review passes ran at Opus. Pass 1 raised three
findings. Two, a timed-out read still covered by the "read as both"
sentence and the unset case left unstated, are fixed. The third, the
guard folding the value's case, is pre-existing and filed as #3061. Pass
2 raised nothing.
Closes on promotion: #3052
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
Answering the round on head 2b0975a, whose headline reads:
Two unresolved moderate findings remain in scripts/pr_review.py.
The round names no file line and opens no thread, so neither finding can be identified from it. Every review thread on this pull request is resolved. The one earlier scripts/pr_review.py finding raised without a thread, the narrative-scope finding at scripts/pr_review.py:2940, was answered in this conversation with evidence. The round 3 finding on tests/test_pr_review.py:5515 was declined because the test passes. No finding located on this head remains open.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
--prunebeside a pattern,:,--all, or a bare push, a--mirrorpush with no refspec, aheads/destination outsiderefs/, the full@{push}read, and a bare push denied whengit remotecannot list the remotesbacklog-burndownkeep 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 itbootstrap.sh's--reporthandoff to the agent tools step, tests the--agentshandoff on Linux and throughInvoke-AgentsInstallunderpwsh, and moves the unprivileged-root probe intotests/host_capability.pypr_review.pyread anOpen 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 risegh-write-guardread a bare push's destination frompush.defaultandbranch.<name>.merge, read a persistedremote.<name>.mirror, deny when the@{push}read times out or cannot run, give a dash-named word after--or--end-of-optionsa 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 Close the Write Guard's Remaining Push Detection Gaps Found Reviewing the #2936 Fix #2943, which stays opengh-write-guardanswer unresolved, and so deny, when itspush.defaultread times out or cannot run, a promotion fix for this pull request's first reviewpush.defaultis read assimple, 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 deniedactions/create-github-app-tokenfrom 3.2.0 to 3.3.0After 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