Skip to content

Promote Develop to Main: Python Line Selector, Docker Lint Digest Pins, Environment Secret Audit, and macOS Bash Floor - #4485

Merged
ptr727 merged 26 commits into
mainfrom
develop
Nov 26, 2026
Merged

ptr727 merged 26 commits into
mainfrom
develop

Conversation

@ptr727

@ptr727 ptr727 commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner

Promotes the 26 pull requests that landed on develop since the last promotion (#4428), from the away-mode backlog burndown run.

Release notes for callers

Findings from the local strict review

The attested local pass on c25ec49 (main...develop) raised five findings. Their outcomes:

The attested local pass on f93f34a (main...develop) raised 57 findings. Their outcomes:

The attested local pass on 3183644 (main...develop) raised 53 findings. Their outcomes:

Fixes #3468
Fixes #3880
Fixes #4408
Fixes #2070
Fixes #4473
Fixes #4474
Fixes #2594
Fixes #4327
Fixes #4450
Fixes #1783
Fixes #3325
Fixes #3917
Fixes #4448
Fixes #1164
Fixes #1613
Fixes #1727
Fixes #4403
Fixes #4407
Fixes #4158
Fixes #4210
Fixes #4429
Fixes #4406
Fixes #4488
Fixes #4498
Fixes #4489
Fixes #4499
Fixes #4504

🤖 Generated with Claude Code

dependabot Bot and others added 21 commits November 25, 2026 12:43
… actions-deps group across 1 directory (#4447)

Bumps the actions-deps group with 1 update in the / directory:
[DavidAnson/markdownlint-cli2-action](https://github.com/davidanson/markdownlint-cli2-action).

Updates `DavidAnson/markdownlint-cli2-action` from 25.0.0 to 25.1.0
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/DavidAnson/markdownlint-cli2-action/commit/3ce8f712b5d8f31acd8e201be6d97e3d2bb23eb7"><code>3ce8f71</code></a>
Update to version 25.1.0.</li>
<li><a
href="https://github.com/DavidAnson/markdownlint-cli2-action/commit/7040ae8f7efcb286573f6b3a7e302af981ad2c3c"><code>7040ae8</code></a>
Bump minimatch and eslint</li>
<li><a
href="https://github.com/DavidAnson/markdownlint-cli2-action/commit/c28957d5a6d1b3a79ab6d5c546e1bfe7ec271a5f"><code>c28957d</code></a>
Update dependency: markdownlint-cli2 to 0.24.2.</li>
<li><a
href="https://github.com/DavidAnson/markdownlint-cli2-action/commit/af945fe9405afdb987c36b20a02429e7b8509fe4"><code>af945fe</code></a>
Update dependency: markdownlint-cli2 to 0.24.1.</li>
<li><a
href="https://github.com/DavidAnson/markdownlint-cli2-action/commit/be0d5f2f1eea9d35d0b41a9e8ab7208968b09cf5"><code>be0d5f2</code></a>
Bump eslint from 10.13.0 to 10.14.0</li>
<li><a
href="https://github.com/DavidAnson/markdownlint-cli2-action/commit/820a51918fa80d1df595298769e5750b92006750"><code>820a519</code></a>
Address new lint errors from previous commit.</li>
<li><a
href="https://github.com/DavidAnson/markdownlint-cli2-action/commit/0cb355adb766f63847a3d9a1cd6c1b8786f7aa6f"><code>0cb355a</code></a>
Bump eslint-plugin-unicorn from 78.0.0 to 79.0.0</li>
<li><a
href="https://github.com/DavidAnson/markdownlint-cli2-action/commit/b4f136db4a9d2ffff88d04cf1328773cb4a1c7ab"><code>b4f136d</code></a>
Bump eslint-plugin-n from 18.4.1 to 18.5.0</li>
<li><a
href="https://github.com/DavidAnson/markdownlint-cli2-action/commit/1900a7033fd860ac85e7f3188ba480552a3f6a29"><code>1900a70</code></a>
Bump eslint from 10.12.0 to 10.13.0</li>
<li>See full diff in <a
href="https://github.com/davidanson/markdownlint-cli2-action/compare/696eb3f2509270d7b882d2aa68347bc676e7af34...3ce8f712b5d8f31acd8e201be6d97e3d2bb23eb7">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=DavidAnson/markdownlint-cli2-action&package-manager=github_actions&previous-version=25.0.0&new-version=25.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
… Merges (#4449)

## Summary

Writes the maintainer's answer to #4406 into each unit that states who
drives an audit's file fix after review. The agent drives the fix pull
request into the target's `develop` to green. Once the maintainer merges
it, the agent opens that target's `develop` -> `main` promotion, or
finds the open one, and drives it to green. The maintainer merges that
too. The re-audit runs once the fix is on `main`. On an operational
repository, the agent confirms that a promotion is wanted before opening
one, per `drive-pr`.

- `AUDIT.md` section 10: the "Merge only with explicit maintainer
approval" bullet. The "Re-audit once the fix reaches `main`" bullet
already states the re-audit timing. The section 9 flow diagram now shows
the promotion before the re-audit.
- `RESYNC.md` section 6: the "The maintainer merges" bullet, and "Done
means measured, not applied" now re-runs the audit once the fix is on
`main`. The opening flow diagram's step 6 now names the promotion.
- `.agents/skills/resync-a-repo/SKILL.md` and
`.agents/skills/audit-a-repo/SKILL.md`: the same sentences, with
`.github/skills/` and `.claude-plugin/` regenerated by
`scripts/build_dist.py`.

## Local review

Two recorded `local-strict-review` passes. The first raised four
findings. Three are fixed in this branch: when the promotion opens, who
confirms on an operational repository, and the two flow diagrams. One is
declined: what ends a convergence when an operational repository
declines the promotion. The `audit-a-repo` Skill already states that an
operational repository's `develop` work counts once it reaches `main`,
so the re-audit waits on that promotion. The second pass raised none.

Closes on promotion: #4406

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


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

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Documentation**
* Updated repository audit and resynchronization guidance to include
promoting fixes from `develop` to `main` after maintainer approval.
* The agent now drives the promotion pull request to a passing status
and leaves the merge to the maintainer.
* For operational repositories, the guidance requires confirming that a
promotion is wanted before opening one.
  * The final audit is now run after the fix reaches `main`.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…4453)

## Summary

The prose gate's interrupt test once saw the gate exit by SIGTERM after
a back-to-back SIGINT and SIGTERM (#4429). The cause is in the gate's
handler, not the test's delivery.

### Cause

CPython runs a Python signal handler from its pending-signal check, and
checks again at that handler's own first instruction. So a SIGTERM whose
C-level trip lands after the check that started `on_signal(SIGINT)` runs
`on_signal(SIGTERM)` nested inside it, before the SIGINT is recorded.
The nested call receives the outer handler's frame as `frame`. It finds
`received` empty, records SIGTERM, and raises. The SIGINT handler never
reaches its own line. Where both signals are pending at one check,
CPython takes them in signal-number order, so SIGINT wins. That is why
the failure needs the narrow window above and shows only now and then.

### Fix

- `on_signal` returns when the frame it interrupted is its own
(`frame.f_code is on_signal.__code__`), so the handler already running
records its signal. The first signal decides, as `CODESTYLE.md`
"Interrupts in Python" states.
- A new test,
`test_a_signal_handled_as_the_first_handler_starts_is_passed_over`,
makes the nested call at the same point with a `sys.setprofile` hook, so
the order is fixed rather than raced. It fails on develop's gate
(`[SIGTERM] != [SIGINT]`) and passes with this fix.
- The test's stubbed git call now sleeps in 0.05-second steps instead of
one 60-second sleep. A signal tripped after the interpreter's last check
but before a long sleep starts waits that sleep out. Under load that ran
the stub into the test's own 60-second timeout. This is a second,
test-only flake the stress runs below found.

### Evidence

All runs were local, on CPython 3.13 on Linux, each under `setsid --wait
timeout`, with `pgrep` confirming that no process survived.

- A mirror of the handler logged the frame each call interrupted. Under
64 busy loops it reproduced the CI signature 2 times in 1,440 trials.
Each time the SIGINT handler was called first, interrupting `<module>`.
The SIGTERM handler then ran on the `on_signal` frame and recorded
itself.
- The real gate, run through the test's own launcher, was swept over a 0
to 400 microsecond gap between SIGINT and SIGTERM. On develop's gate, 21
of 2,560 runs died by SIGTERM. With this fix, 0 of 2,560 did.
- In the mirror, 3 of 1,440 runs held a signal until the 60-second sleep
ended. A stack dump showed the child still in `time.sleep`, with neither
handler called yet.
- With both commits, the interrupt test class passed 640 of 640 runs
under 64 busy loops. The full `test_prose_lint` module passes.

### Pre-existing findings, filed

- The local review found the same handler body at eight other sites, and
`CODESTYLE.md` "Interrupts in Python" states the rule without the guard.
This is a `pre-existing` correctness defect, filed once with every site
as #4452.

Closes on promotion: #4429

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…rt Any Other Copy as a Stray (#4456)

## Summary

- `install-agents.sh` and `install-agents.ps1` record a managed copy for
claude and codex, from each tool's native installer, beside opencode's.
On Linux that is `~/.local/bin/claude` and `codex` in
`CODEX_INSTALL_DIR` or else `~/.local/bin`. On Windows it is a directory
form, `~\.local\bin` and `CODEX_INSTALL_DIR` or else
`%LOCALAPPDATA%\Programs\OpenAI\Codex\bin`, compared with every link
followed, since the codex `bin` is a junction.
- A claude or codex from any other source (npm, bun, Homebrew, mise,
scoop, a bare file) is a stray: reported with the command that removes
it and then `--install`, and never upgraded or removed here, even where
no native copy exists. This is the maintainer's answer on #4402 (option
1) and the report-only answer on #4158, applying the #4210 rule that a
one-off is detected and reported.
- Tests move to the managed layout. The manager-upgrade tests that used
claude or codex as their vehicle now use herdr where a manager still
reaches it, and become stray tests otherwise. New tests cover the native
copy alone, `CODEX_INSTALL_DIR`, the `%LOCALAPPDATA%` default, and a
stray ahead of a native copy.
- The two READMEs and `docs/host-setup.md` state the three managed
copies.

The PowerShell installer is edited here from Linux and verified by its
`pwsh` tests, not on a native Windows host.

Closes on promotion: #4158, #4210

Removal candidates (#4210's "done when"): the npm and bun upgrade paths
that no tool now reaches are filed as #4450 and left in place, so each
diff is reviewed alone (the #4402 answer). No other one-off correction
code was found in the two installers.

Comments: this change adds comment lines, so it carries the `comments`
label.

Local review (three passes, the last with no findings): fixed an npm
copy linked into the managed directory reading as managed, a duplicate
directory comparison, and an unneeded link-following candidate.

Pre-existing findings, not filed:
- `host-setup/windows/install-agents.ps1` `Test-BunPackageOwnership`,
class pre-existing consolidation: its inline shim-directory compare also
resolves the file's own link, so it was not moved onto
`Test-SameDirectory`.
- `host-setup/windows/install-agents.ps1` `Get-StrayPlan`, class
pre-existing: a winget-owned claude is now a stray and `winget uninstall
claude` is a bare name search that may match another package.
Unconfirmed, and outside the trust model.

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
…ext (#4457)

## Summary

- `CODESTYLE.md` "PowerShell" names the in-code suppression form,
`[Diagnostics.CodeAnalysis.SuppressMessageAttribute('<RuleName>', '',
Justification = '<reason>')]` on the `param()` block of the function
holding the finding. A finding outside any function takes the script's
own `param()` block. That is the narrowest scope "Analyzer Diagnostics
and Suppressions" prefers, and the section names no Skill to carry it.
No `powershell-codestyle` Skill is added and `AGENTS.md` is unchanged,
per the 2026-11-25 answer on #4403.
- The second positional argument is `''` rather than the decision
comment's `'<target>'` placeholder, and the attribute sits on the
`param()` block rather than "on the function or parameter". Measured
with `Invoke-ScriptAnalyzer -ScriptDefinition` on PSScriptAnalyzer
1.23.0, the version CI installs:
- `''` on a function's or a script's `param()` block suppresses the
finding.
- A function name as the second argument raises "Cannot find any
DiagnosticRecord with the Rule Suppression ID", since PSScriptAnalyzer
reads it as a RuleSuppressionID.
- The attribute on a single parameter inside `param(...)` suppresses
nothing.
- `python-codestyle` "Local development loop" matches its Toolchain
contract. The clean-compile runs both checkers only where the repo
enforces pyright beside mypy. CI's backstop runs one type checker, mypy
where both are configured, and such a repo backstops pyright from its
own validate hook. `validate-task.yml` is unchanged, per the 2026-11-25
answer on #4407.
- The generated `.github/skills/` and `.claude-plugin/` copies are
regenerated with `scripts/build_dist.py`, and `--check` passes.

Closes on promotion: #4403, #4407

## Dropped findings

- `.agents/skills/python-codestyle/references/profiles.md:12`, wording
on text this change did not touch: "A repo running both" sits under
"Type checker in CI", so it already means both checkers enforced.

## Pre-existing findings, not filed

- `PSScriptAnalyzerSettings.psd1`, scope: the root settings exclude two
rules for every `.ps1` file, while their stated reasons name only the
`host-setup/windows` scripts.


## Test plan

- [x] `uv run --no-project --script scripts/build_dist.py --check`
reports the distributions current.
- [x] `prose_lint.py --diff origin/develop` reports no violation on the
changed files.
- [x] The pre-commit hook (ruff, mypy, prose, eol) passes.
- [x] The suppression form is measured in
`mcr.microsoft.com/powershell:latest` with PSScriptAnalyzer 1.23.0, as
above.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…4458)

## Summary

`scripts/backlog_metrics.py` `review_pr` built each bot's set of
reviewed heads with its own copy of the filter
`pr_review_rounds.reviewed_heads` owns: the reviewer's own reviews,
refusals excluded, a commit present. The gate returned only a count, so
the report could not reach it. This is the one restatement the
2026-11-05 scope update on #3880 left open.

- `pr_review_rounds.reviewed_oids(nodes)` now holds that filter and
returns the set of commits.
- `reviewed_heads` returns that set's size, so the merge gate's round
count is unchanged.
- The metrics report reads the same set through `reviewed_oids`, with
the gate's own `reviewer_nodes` selecting the reviews.

`scripts/pr_review_rounds.py` stays under its 700-line ceiling in
`tests/test_pr_review_size.py` (699 lines), which is not raised, and the
file is not split.

## Tests

- New case `test_reviewed_heads_are_the_gates_one_definition` in
`tests/test_backlog_metrics.py`. It holds a counted review, a refusal,
and a review naming no commit, and checks the report's rounds against
the gate's count. It then replaces the shared reader and checks both
readings move together. Run against the old local filter, it fails.
- `tests/test_backlog_metrics.py`, `tests/test_pr_review.py`,
`tests/test_pr_review_size.py`, `tests/test_pr_review_policy.py`,
`tests/test_pr_merge.py`, and `tests/test_cli_usage.py` pass locally
(893 tests). `ruff format --check`, `ruff check`, and `mypy` over the
configured tree are clean.

## Issue State

This pull request does not close #3880. The issue's 2026-11-05 comment
also names `side_asks`, now in `scripts/pr_review_hold.py`, which still
repeats the trusted-and-shown comment filter that `trusted_comments` in
`scripts/pr_review_rounds.py` owns. The later scope update names only
the reviewed-heads restatement, so whether that site is still owed is
left open on #3880 rather than closed by this change.

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

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
#4460)

## Summary

This addresses items 2 and 3 of #2286 only. Item 1 is a `pip` entry in
KiCadLibrary's `.github/dependabot.yml`, a write in another repository,
so #2286 stays open for that repository's resync.

- **Item 2.** The `dependabot.ecosystems` check now asserts Python's
ecosystems per directory, by the rule #2286 sets:
  - A `uv.lock` implies `uv` for its own directory.
  - A `requirements*.txt` implies `pip` for its own directory.
- A `pyproject.toml` declaring `[project]` dependencies, with neither
file beside it, implies `pip` or `uv`. It implies nothing when it is a
member of a uv workspace whose root `uv.lock` is tracked.
  - A config-only `pyproject.toml` implies nothing.

An entry covers a directory its `directory` value names literally, or
one a `directories` glob matches. A `pyproject.toml` the audit cannot
read or parse is reported rather than guessed.
- **Item 3.** `AUDIT.md` section 4 records that Dependabot cannot see a
`uvx` tool pinned to an exact version in a workflow. The fix is
`@latest`, or a version pinned in a manifest a Dependabot entry tracks.
- **Split.** `spec/audit.py` sits at its 3000-line ceiling, so the
ecosystem helpers move to a new `spec/audit_dependabot.py`. That module
gets a ceiling of its own in `tests/test_audit_size.py`. The root-suite
check in `spec/audit.py` now uses the same `uv.lock` /
`requirements*.txt` predicate.
- **Docs.** `AUDIT.md` section 4 and the `setup.dependabot.ecosystems`
assert in `spec/project-types.json` now describe the per-directory
check. The other language ecosystems (`nuget`/`npm`) stay audited by
inspection.
- **Tests.** `tests/test_audit.py`'s `run_audit` fixture gives its
tracked `pyproject.toml` a config-only text, since the check now parses
it.

## Hub Self-Audit

Under this rule the hub's own audit reports one new DRIFT: `pip` is not
declared for `/tests` though `tests/requirements.txt` is present.
Nothing gates on it, since no workflow runs `spec/audit.py` and a DRIFT
does not change its exit status. Whether to track that file or accept
the finding is a question for the maintainer, filed as #4459.

## Verification

- `python -m unittest discover -s tests` passed in full apart from the
three fixture tests the `run_audit` change fixes, and the audit suites
pass after it.
- ruff (pinned), mypy, `spec/validate.py`, and the prose gate are clean.
- Local strict review: two recorded `agent-skill` passes. The first
raised three findings, all on text this change wrote:
  - A glob in a `directory` value read as coverage. Fixed.
- Duplicated manifest logic. The audit's root-suite site was moved onto
the shared predicate. The validator action's `shape()` in
`.github/actions/python-directories/python_directories.py` was declined:
it is a separately deployed action the audit mirrors rather than
imports, as `python_directory_covers` already does.
  - Shape guards that trusted fleet manifests never need. Removed.

  The second pass, over the full diff, raised none.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ifest (#4461)

## Summary

Pins the Docker lint images by digest through one manifest that
Dependabot tracks, and retries a failed pull a bounded number of times.
Before this change, a transient registry error could fail a release, and
a tool release could change behavior under a pinned hub ref. This
follows the recorded answer on #1727 (option 1) and the design and
missing-manifest answer on #4397 (option 1).

- `.github/actions/docker-lint-pins/Dockerfile` (new) is never built. It
holds one `FROM <image>:<version-tag>@sha256:<digest> AS <stage>` line
for each of the seven images: editorconfig-checker, actionlint,
markdownlint-cli2, cspell, shellcheck, shfmt, and PowerShell. Each
digest was read live from its registry on 2026-11-25. The version tags
match what the moving tags resolved to, with two exceptions. shfmt
`latest` tracks the default branch, so the pin is the newest release,
`v3.14.1`. MCR's PowerShell `latest` is a 2024 Ubuntu 22.04 image that
no version tag names, so the pin is `7.4-ubuntu-22.04`. That keeps the
same PowerShell minor and base, which keeps the PSScriptAnalyzer 1.23.0
comment true.
- `.github/actions/docker-lint-pins/action.yml` (new) reads that
manifest from `$GITHUB_ACTION_PATH` and outputs the
editorconfig-checker, shellcheck, shfmt, and PowerShell references the
workflow runs, the way `python-tool-pins` does. It fails where any of
the seven stages is named on no line or on more than one, or on a line
missing its tag or digest.
- `validate-task.yml` reaches the action as
`$/.github/actions/docker-lint-pins`. It drops `--pull=always`. The
EditorConfig, shell, and PowerShell steps each pull their pinned image
with three bounded attempts before they run a container. A pull that
times out is not retried.
- `repo_gate.py` reads the shellcheck pin from the sibling manifest when
the `composite-actions` check runs, and retries a failed pull. An
unreadable pin is one finding and makes no Docker call. A copy fetched
alone names where the check can run instead. A carrier's `--check eol`
run never reads it.
- `docker_lint.py` reads all seven pins from the manifest at its
hub-relative path and retries a pull that exits non-zero. A timeout or a
client that cannot start is not retried. Where the manifest is not
beside it, the run exits non-zero and names the `hub_fetch_run.py`
resync, per #4397.
- `catalog/snippets/hub_fetch_run.py` adds the manifest to
`COMPANIONS["scripts/docker_lint.py"]`, so a fetched tree carries it
beside the script.
- `.github/dependabot.yml` adds a `docker` ecosystem pair, `main` and
`develop`, on `/.github/actions/docker-lint-pins`.
- `GOVERNANCE.md`, `OPERATIONS.md`, `scripts/README.md`, both hook
snippet READMEs, and `host-setup/linux/README.md` each change only the
sentences that named `:latest` or `:stable`, or said the wrapper is
fetched alone.

Known risk, from #4397: mirror.gcr.io's tag list holds only the tags it
has cached, so a Dependabot bump of a mirror.gcr.io image may lag
upstream releases.

Accepted cost, from #4397: a carrier's local Docker lint tasks fail,
naming the resync, until that carrier's `hub_fetch_run.py` is resynced.
CI is unaffected, since the reusable workflow and the repo gate read the
manifest at the hub pin.

## Verification

- `python3 scripts/docker_lint.py --root "$PWD"` against this branch
pulled all seven pinned images and ran every linter clean,
PSScriptAnalyzer on the new PowerShell pin included.
- `python3 scripts/repo_gate.py`: every check passes,
`composite-actions` shellchecking the new action's run body with the
pinned shellcheck image.
- The full unit suite passes. New tests stub every network and Docker
call. They cover the action's output and refusals, the EditorConfig
step's retry bound through stand-in `docker` and `sleep`, the Dependabot
pair, `docker_lint.py`'s retry bound, its manifest parsing, and the
missing-manifest exit. They also cover `repo_gate.py`'s retry and
unreadable pin, and `hub_fetch_run.py` fetching the manifest beside the
wrapper at one commit.
- ruff format and check, mypy, and the prose gate (diff against
`develop`) are clean.

## Local review findings declined

- `.github/workflows/validate-task.yml`: the `pull()` retry helper
appears in the EditorConfig, shell, and PowerShell steps. It stays as
three copies, since workflow steps share no shell functions, and a
shared script beside the action would be a file outside this change's
scope. A test runs the EditorConfig copy's retry bound and timeout
through stand-in `docker` and `sleep`.
- `scripts/docker_lint.py`: `resolve_digest()` still inspects each
pulled image although the pin already names its digest. Removing it
would make text outside this change's scope false: `GOVERNANCE.md`
"Running the Linters Locally" ("then resolves the pulled repository
digest") and the `comment-and-doc-style` skill ("resolves each digest").
- `.github/actions/docker-lint-pins/Dockerfile`: Dependabot may not list
tags on mirror.gcr.io for the shellcheck and shfmt lines. This is the
known risk #4397 recorded, stated above. No pre-merge run can confirm
it, and the first Dependabot docker run for this directory will show it.
The images stay on mirror.gcr.io, since a762b07 (#2689) moved the pulls
off Docker Hub for its rate limits.
- `.github/actions/repo-gate/repo_gate.py`: it keeps its own one-stage
pin regex rather than loading `docker_lint.py`'s `read_pins` through
importlib. The wrapper is standalone, fetched with only its manifest,
and coupling the gate to it would add a dependency neither needs. The
divergence the finding named is fixed instead. The action, the gate, and
the wrapper each read only well-formed lines for their own stages and
refuse a stage named twice, and the gate now finds the hub tree through
the existing `gate_hub_root()`.
- `.github/actions/repo-gate/repo_gate.py` and `scripts/docker_lint.py`:
each has its own bounded `docker pull` retry loop. They stay apart for
the reason above. The wrapper is standalone, and the gate would have to
load it to share one. Each loop is tested on its own bound.
- `tests/test_release_guards.py`: the pull retry test lists a job's
steps with its own `- name:` regex rather than `job_steps` from
`tests/test_docker_task_workflow.py`. Moving that helper into
`tests/workflow_steps.py` would edit two files outside this change's
scope. Any step the regex misses is caught anyway, since the test counts
every `docker run` in the workflow against the steps it read.
- `scripts/pr_review_promotion.py`: a Dependabot bump of the pin
Dockerfile is not counted as covered when a promotion is read. That
module leaves Dockerfiles out on purpose. A pin bump changes which
images CI runs, so the promotion's review reading it errs toward more
review. The module is outside this change's scope.

The three workflow copies of `pull()` are held equal by a test that
reads every Docker step in the workflow live and checks each `docker
run` image was pulled first. It counts every `docker run` in the file
against the steps it read, and holds each lint image variable to a
`docker-pins` output.

Closes on promotion: #1727

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


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

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Improvements**
* Docker-based lint checks now use version- and digest-pinned images
instead of floating tags.
* Failed image pulls are retried, with bounded attempts and delays;
timeouts still fail immediately.
* Shell and PowerShell lint images are pulled only when matching files
are present.
* **Documentation**
* Updated local setup and linting guidance to reflect the pinned images.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ample (#4464)

## Summary

- **Platform weighting (#4448).** `GOVERNANCE.md` "Supported Development
Platforms" gains a bullet. Within the cross-platform default, Linux is
the primary platform, Windows is fully supported, and macOS is
best-effort. A minimum tool version is never held down to what macOS
ships, a macOS host may need extra installs such as Homebrew's bash for
bash 4.4, and no CI runs on macOS. `docs/host-setup.md`'s "Supported
hosts" list now follows that order and weighting and links the section.
- The issue's decided text also said Linux "sets minimum tool versions".
The local review found that false against `spec/host-tools.json`, whose
`docker` and `uv` floors are anchored to Windows hosts and whose Python
floor is a toolchain target. So the bullet states the decision's effect
on floors (macOS never holds one down) rather than that sentence.
- The `shell-codestyle` and `python-codestyle` skills and `CODESTYLE.md`
carry no macOS wording, so nothing there changes.
- **"Durable Knowledge and Self-Improvement" (#1164's four remaining
items).**
- The upstream-proposal remedy now names the hub and the mechanism:
where the rule text is carried from the hub, file the change as an issue
in the hub.
- The `gh-write-guard` worked example now claims only the check the hook
decides, whether a mutating git command targets a primary checkout, and
says the rest of the rule stays prose. Re-checked against requirement 6
of `host-setup/agent-safety/README.md` and the hook's
`_is_primary_checkout` comparison, read only.
- The example points at requirement 6 of
`host-setup/agent-safety/README.md` in the hub, so a carrier can check
it. The `.husky/pre-push` example already named the hub.
- "it was promoted" now reads "that check was promoted", so the promoted
object is a check within the rule rather than the lapse.
- **#1613 item 9, the `GOVERNANCE.md` surface.** "Definition of done is
the audit" now says `AUDIT.md` section 8 defines `<repo>` in
`reports/<repo>/audit.md`, per the maintainer's answer on #3755. That
was the last surface item 9 named.
- The `agent-conduct` include of "Durable Knowledge and
Self-Improvement" and its `.github/skills/` and `.claude-plugin/` copies
are regenerated with `scripts/build_dist.py`, and `--check` passes.

Closes on promotion: #4448, #1164, #1613

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
… Title and Location (#4463)

## Summary

Fixes items 1 and 2 of #3917. Item 3 asks for no change.

- **Key stability.** A Qodo findings-comment entry's acknowledgment key
hashed the section's whole text. Qodo edits that one comment in place,
and an edit can rewrite a permalink's commit or another link. So every
open entry could come back under a new key, and a `comment --ack
<key>=<outcome>` posted after a push failed. The key now hashes the
title and the section text with each link and each 7-to-40-character
lowercase hex run removed from both. The comment-id anchor is unchanged.
- **Dismiss request.** Qodo answered that it cannot map the numbers the
remedy line named. The digest's remedy line now asks Qodo to dismiss a
disproved finding by its title and file location. `scripts/README.md`,
`pr-review-conduct`, and `drive-pr` say the same. `pr-review-conduct` no
longer claims Qodo marks a disproved finding `Dismissed` when asked,
since that has not been measured. The `--ack` record still answers
`merge` either way.

## Tests

- `tests/test_pr_review.py`: a constructed Qodo body whose title,
permalink, and short hash name one commit, then another, keeps one key.
A different title, or an edit to the description alone, still gets a
different key. The test fails with the stripping disabled.
- The remedy-line test now pins the title-and-location wording.
- `tests/test_pr_review.py` and `tests/test_pr_review_size.py` pass
locally. `scripts/pr_review_answers.py` is at 423 lines against its
unchanged 450 ceiling.

Closes on promotion: #3917

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…#4465)

## Summary

Per the maintainer's 2026-11-01 answer on #3325 (option 1), a hub task's
hook can now learn which caller runs it.

- `check-upstream-version-task.yml` and `validate-task.yml` each take an
optional `hook-input` string, default empty.
- Each task runs its caller's hook from one of two guarded steps. The
plain step runs when `hook-input` is empty and passes nothing, as today.
The second runs only when it is set and passes `with: hook-input`. So a
caller passing nothing runs its hook exactly as before, a hook declaring
no such input included. A caller that sets the value needs a hook
declaring `hook-input`.
- The upstream task reads `versions` from whichever of the two steps
ran.
- The hub's no-op `validate-default` never receives the value.
- The hub's own `resolve-upstream` and `validate` hooks declare the
input, ignored, so actionlint accepts the new `with:` blocks against
them. They also show the declaration a caller's hook copies.
- `docs/reusable-workflows.md` states the input in "The Hook Contract"
and in "Adopting the Gates". "Adopting the Type-Specific Tasks" now has
ESPHome-NonRoot's second tracker pass `hook-input: dependency` and its
own `state-file`, so its one hook can branch and the two trackers no
longer share one state file.
- `tests/test_workflow_steps.py` pins both routes, with a mutation test
for each guard, the passed value, and the input's declaration.

No caller stub changes, since every fleet caller is outside this
repository. WORKFLOW.md describes no hook inputs, so it stays true.

Closes on promotion: #3325

## Verification

- actionlint and markdownlint via `scripts/docker_lint.py`: clean.
Before the hub hooks declared the input, actionlint failed on both new
steps, which is why they declare it.
- The full unittest suite: 5016 tests pass (13 skipped), including the
new `HookInputCase` in `test_workflow_steps.py`.
- The pre-commit gate (ruff, mypy, the prose gate, the repo gate) passed
on each commit.
- Local strict review: two recorded passes. The first raised three
findings. Two were fixed in b8b0ded: the test did not read `required`,
and the doc sentences were misplaced. The third is listed below. The
second pass was clean.

## Pre-existing findings, not filed

-
`.agents/skills/branching-and-release-model/references/release-publish-mechanics.md`
"Wrapper repos that track an upstream release" (pre-existing, incomplete
instruction): it gives a package-list snapshot tracker as its
`auto-merge: false` example without saying that a second tracker in a
repository that already runs one needs its own `state-file` and a
`hook-input` for the shared hook. The text predates this change and
stays true as written. This change put the full second-caller shape in
`docs/reusable-workflows.md` "Adopting the Type-Specific Tasks".

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ers (#4466)

## Summary

This is the audit half of #1783, per the maintainer's 2026-11-01 answer
(option 1). Each entry-point caller must now declare a workflow-level
`permissions: {}`. Without it, a caller that drops the block runs every
job that has no `permissions:` of its own under the repository's default
token grant. That grant is `read` in some repositories and `write` in
others, and until now no check noticed.

- `spec/files.json`: every interface unit under `.github/workflows/`
gains `"requireTokens": ["\npermissions: {}"]`. Those units are
`test-pull-request.yml`, `publish-release.yml`,
`merge-bot-pull-request.yml`, and `deploy-site.yml`, and each is an
entry-point caller. The first three reference stubs already declare the
block. `deploy-site.yml` has no catalog snippet, and a site repository's
copy with only job-level blocks will now report this drift. That report
is the check doing its job, and the fix belongs to that repository.
- `spec/audit_contract.py`: before this change, `requireTokens` could
not tell `permissions: {}` from a workflow-level grant such as
`permissions:\n contents: write`, since the code view writes both as a
bare `permissions:` line. It also missed a block that is the file's
first key. Every token now reads its view with a leading newline, and a
key with nothing under it reads `key: {}`. That covers the whole-file
view and each job's view, so a token means the same thing under every
contract key. The workflow-level token therefore matches only an empty
top-level block. A job-level block, a granted scope, and a comment all
fail it. Token findings now print a newline in a token as `\n`, so each
finding stays on one line. No contract key was added, so
`spec/validate.py`, `spec/files.schema.json` and `spec/audit.py` are
unchanged.
- `tests/test_audit_helpers.py`: adds `WorkflowPermissionsCase`,
covering constructed stubs with the block as the first, a middle, and
the last key, and with the block missing. It also covers a
job-level-only block, workflow-level grants (a mapping, `write-all`,
`read-all`), a comment, and a block-scalar key. It checks that a
job-level token reads an empty block the same way, and that every
interface workflow unit in `spec/files.json` carries the token. It also
checks that both the hub's own callers and the catalog snippets pass.
- `.github/workflows/test-pull-request.yml` and
`.github/workflows/publish-release.yml`: the hub's own callers now
declare `permissions: {}`. The new check flagged both, since neither
declared a workflow-level block.

## Per-Job Evidence for the Hub Workflow Change

Every step of each job that declares no `permissions:` of its own was
re-read. None of them makes a checkout, a `gh` call, an API call, or a
reusable-workflow call that consumes `GITHUB_TOKEN`. So none needs a
scope of its own.

- `test-pull-request.yml` `check-workflow-status`: one `run` step
comparing `needs.validate.result` and `needs.windows-test.result`, with
no token.
- `publish-release.yml` `assert-dispatch-ref`: one `run` step comparing
`$GITHUB_REF_NAME` against `main` and `develop`, with no token.
- `publish-release.yml` `plan`: calls
`./.github/workflows/publish-plan-task.yml`. Its one job has one `run`
step that reads the `event_name`, `actor` and `ref_name` inputs and
writes `$GITHUB_OUTPUT`, with no token. The catalog snippet's `plan`
already runs under `permissions: {}`.
- Jobs that already declare their own block keep it unchanged:
`validate`, `windows-test`, and `publish`, which keeps `contents: write`
and `actions: write`.

`test-pull-request.yml` runs on this pull request, so its CI exercises
that change. `publish-release.yml` runs only on `workflow_dispatch`, so
this pull request cannot exercise it. Its change is verified only by
reading until the next release dispatch.

## Known Limit

The code view writes a null `permissions:`, an empty string
`permissions: ''`, and an empty sequence `permissions: []` the same way
as `permissions: {}`, so each one passes this check. None of them
reaches a run, though. The pinned actionlint (`rhysd/actionlint:1.7.12`)
refuses all three in the fleet's lint gate, checked against constructed
workflows.

## Closing

Closes on promotion: #1783

The trusted comments on #1783 say the audit half alone closes it. On
2026-11-24, after PR #4426 landed the `configure.sh` half, #1783 "stays
open for the audit permissions half". #4433 states that it "holds only
the apply and the option confirmation". The fleet apply stays with
#4433.

## Verification

- `uvx --with-requirements tests/requirements.txt python -m unittest
discover -s tests`: 5022 tests, OK, 13 skipped.
- `ruff check`, `ruff format --check`, `mypy`, `spec/validate.py`, `jq
empty spec/files.json`, `scripts/docker_lint.py` (actionlint included),
and `scripts/prose_lint.py --diff origin/develop`: all clean.

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


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

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Security**
* Release and pull-request workflows now start with no default token
permissions. Permissions must be granted explicitly at the job level.
* **Tests**
* Workflow checks now verify that permission settings are empty at the
workflow level and distinguish them from job-level grants.
* Checks also validate required workflow names, event types, and tokens,
including tokens that begin with a newline.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Removes the npm and bun upgrade paths no managed tool reaches, per the
maintainer's option 1 on #4402. Stray claude and codex copies stay
report-only per #4210, so `package_step` removal and its ownership reads
are kept.

- Linux: `package_step` is removal-only, and `manager_plan` reports an
npm or bun owned tool as upgrade-by-hand.
- Windows: the bun upgrade is removed. npm's stays, since opencode's
managed copy is `@opencode/cli`.
- Tests: a bun and an npm owned tool are reported and never run, on both
platforms.
- Docs: the install-agents sentences in both host-setup READMEs and
`docs/host-setup.md`, smallest edit.

The change edits comments that state the removed behavior, so it needs
the `comments` label.

Local review: two passes recorded, the first raised 4 findings (all
fixed), the second none. Python tests 145 pass under pwsh; the Windows
script runs under pwsh here, not natively.

Closes on promotion: #4450


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

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
…4469)

## Summary

Adds `scripts/enable_hooks.py`, a hub-hosted Python script that enables
a clone's Git hook framework once per clone, per the maintainer's
2026-11-25 answer on #4327. A downstream repository reaches it through
its root `hub_fetch_run.py` copy: `python3 hub_fetch_run.py
scripts/enable_hooks.py`.

- It reads the framework from the clone's top level. `.husky/` with a
.NET tool manifest declaring Husky.Net runs `dotnet tool restore`, then
`dotnet husky install`. `.husky/` alone sets `core.hooksPath` to
`.husky`. `.pre-commit-config.yaml` runs `pre-commit install`. Both, or
neither, is refused.
- It prints the framework it found and a `changed` or `unchanged` line.
A clone already enabled is left as it is, so an unchanged run writes
nothing.
- It never replaces a `core.hooksPath` naming another directory, nor a
pre-commit hook the framework did not write.
- It refuses a linked worktree, told apart by `git rev-parse --git-dir`
differing from `--git-common-dir`, which keeps `repo-worktree`
"Preparing Git Hooks" intact.
- One script covers Linux, macOS, and Windows. Tools resolve through
`shutil.which`, so a `.cmd` or `.exe` resolves like a POSIX command.
- SIGINT and SIGTERM stop the running step and re-raise the signal, per
`CODESTYLE.md` "Interrupts in Python".

`docs/pre-commit-hooks-rollout.md` "Per-Repo Conversion" names the
script in place of the raw enable commands, and
`catalog/snippets/pre-commit/README.md` names it in its enable sentence.
`scripts/README.md` gains the script's section and lists it among the
utilities and the writers. `tests/test_cli_usage.py` declares it among
the entry points taking no argument.

`tests/test_enable_hooks.py` drives the script against throwaway clones
with an isolated Git config and a PATH holding only stubs and Git. It
covers each framework's first run and an unchanged rerun, checked
against a snapshot of the whole clone. It covers the linked-worktree
refusal and each refusal case. A POSIX-only case signals the script
mid-step and asserts it died by the signal with the step gone.

Closes on promotion: #4327

## Considered and left alone

These still name the raw enable commands as a manual step, and each
stays true:

- `catalog/snippets/pre-commit/.pre-commit-config.yaml`, its header
comment.
- `.husky/pre-commit`, its header comment.
- `catalog/snippets/husky/README.md`.

## Pre-existing findings, not filed

- `.agents/skills/repo-worktree/SKILL.md` "Preparing Git Hooks", the
standalone-clone steps (`pre-existing`, from the local pass). They still
give the raw `dotnet husky install` and `pre-commit install` commands,
which do not refuse a foreign hooks setting or hook the way
`enable_hooks.py` does. That text is outside this change.
- `catalog/snippets/pre-commit/.pre-commit-config.yaml`, line 6 header
comment (`pre-existing`, from the local pass). It still names the raw
`pre-commit install` step rather than the script. It stays true as a
manual step, and is listed under "Considered and left alone" above.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…4472)

Lets each repository select its Python line with a root
`.python-version` naming `X.Y`, the toolchain-version model
`CODESTYLE.md` "Toolchain Versions" states and .NET follows through
`global.json`. The hub's workflows read that selector before falling
back to 3.14. This is the part of #4187 that needs no decision. Carrying
the file as a baseline unit waits on #4471.

## What changes

- `.github/actions/python-version` reads the caller's root
`.python-version`, taking the first line that is neither blank nor a
comment, as uv does. With no file it falls back to 3.14 with a warning.
A test holds that fallback to the Python devcontainer snippet's line. A
file naming no `X.Y` line fails the step, so CI never runs a line the
file does not name.
- `validate-task.yml` defaults `python-versions` to empty. An explicit
input still wins, then the selector, then the fallback. The
`test-matrix` job sparse-checks out `/.python-version` to resolve the
line. It publishes the resolved array as a `versions` output, which
`unit-test` reads.
- The `lint` job selects the line itself, since it already holds the
tree, and only that job warns of a fallback. It reads a present
`.python-version` whatever `python-versions` names, so a malformed
selector fails validate before a release would read it. It also refuses
an explicit `python-versions` whose first entry differs from that line,
since the release builds on it. The `test-matrix` job cannot tell
whether the caller holds Python, so a warning from it would reach every
.NET-only caller on every run.
- The release task's `build-pypi` job selects the line ahead of the hub
default. It passes the line a caller's `.python-version` selects to the
new optional `python-version` input of `pypi-build-default`, so a
release builds on the line validate tested. A caller carrying no
selector passes nothing, and uv chooses an interpreter its
`requires-python` admits, as before. The release never takes the 3.14
fallback, since it cannot see a caller's validate `python-versions`
input.
- `python.version.consistent` is a by-hand `letter` check in
`spec/project-types.json` that applies wherever a root `.python-version`
is present. It holds these to the selector:
  - a build-profile directory's `requires-python` floor
  - the ruff, mypy, and pyright targets, which stay unset there
  - a lint-only tree's explicit targets
  - the devcontainer tag
  - the first explicit `python-versions` entry
- `CODESTYLE.md` and the `python-codestyle` Skill state the selector and
the settings derived from it. `docs/devcontainer.md` states that a
repository owns its Python tag. `docs/reusable-workflows.md` states the
new default and the migration step.
- The hub carries a root `.python-version` of `3.13`, so its own pytest
leg stays on its hub-owned tooling line. That line matches its lint-only
`pyproject.toml`. `spec/host-tools.json`, the PEP 723 headers, and the
lint job's job-wide setup-uv stay at 3.13. The Windows installer is
unchanged.

## For the promotion's release notes

A caller passing no `python-versions` input and carrying no root
`.python-version` moves from 3.13 to 3.14 once its hub pin reaches this
change. That covers its `unit-test` leg and its `lint` job's Python
steps. Its hub-default PyPI release build is unchanged. Its `lint` job
warns on each such run until it carries a selector. A caller whose
`requires-python` or locked dependencies exclude 3.14 adds a
`.python-version` before it moves its pin. The nested check name moves
from `Unit test job (Python 3.13)` to `Unit test job (Python 3.14)` with
it, a name that binds no ruleset. Its Codecov flag moves from
`python-3.13` to `python-3.14`, so a `.codecov.yml` naming the old flag
stops matching it. A caller carrying a `.python-version` that names no
`X.Y` line now fails validate. A caller passing `python-versions`, or
carrying a valid `.python-version`, keeps the line it names. A caller
carrying a valid `.python-version` builds its hub-default PyPI release
on that line. A caller's own `build-pypi` hook is unchanged.

## Not in this change

Carrying `.python-version` as a `spec/files.json` baseline unit, with
its catalog snippet and the Python type's `requiredFiles` entry. #4187
asks for intent fidelity and for the whole value to be repository-owned,
and the engine cannot express both. #4471 asks which gives way, so #4187
stays open for that part.

## Dropped findings

- `tests/test_release_guards.py`, the step runners this change does not
touch that still run their own runner (the PyPI version,
publish-history, Python test step, python-versions guard, and .NET
coverage cases): `consolidation` on text this change did not touch.

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


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

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **New Features**
* Python versions are now selected from the repository’s
`.python-version` file for validation and PyPI builds. If the file is
missing, workflows use a 3.14 fallback; an invalid version entry fails
validation.
* Python version overrides for reusable workflows are now optional, with
matrix checks defaulting to the selected version.
* **Documentation**
* Updated Python version selection, workflow configuration, and
development-container guidance.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…nconfigured (#4479)

Report `dotnet` and `powershell` as `unmanaged` in the Linux installer's
report while Microsoft's apt feed is not configured and an install would
add it.

Closes on promotion: #2594

## Summary

- One shared predicate set (`microsoft_feed_configured`,
`microsoft_feed_arch`, `microsoft_feed_pending`) now backs the install
path and the report, so a report-side copy of the install decision no
longer exists.
- A `dotnet` or `powershell` with nothing installed, no feed, on `amd64`
(and for `dotnet` no visible distro SDK) reads `unmanaged`. Other hosts
keep their status.
- A hand-installed `powershell` on `amd64` with no feed reads
`unmanaged`, the same as `gh`, `node`, and `op`.
- `dotnet_source` names the feed as the source of a feed install. The
apply log and the `dotnet` and `powershell` notes state only the
conditions each tool checks.
- Linux `--json` `schema` moves from 1 to 2, because a not-installed
`dotnet` or `powershell` can now read `unmanaged` with `installed:
null`. Windows `-Json` stays at 1, and the platform comparison row says
so.
- The test `SOURCES_DIR` redirect is one `LinuxFunctionsCase` helper.

## Pre-existing findings, not filed

- `host-setup/linux/install-tools.sh` comment above the powershell note
("A host without the feed reads no candidate at all"): false for a
hand-installed copy. Class: false comment. Left alone because this
change cannot add comment lines without the `comments` label.

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


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

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Improvements**
* Linux setup reports now distinguish missing Microsoft feeds,
unsupported architectures, and unavailable .NET SDKs, with clearer
status and installation messages.
* Linux JSON reports now use schema version 2, including cases where
installation status is unknown.
* **Documentation**
* Linux and Windows setup guides clarify how unmanaged tools and missing
Microsoft feeds are reported. The Windows JSON schema remains version 1.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
…4477)

## Summary

Fixes the carried-unit findings that ptr727/PlexCleaner#1294's review
raised against hub content.

- `AGENTS.md` "Context and Delegation Discipline" > "Reading": the
map-a-large-file heading search now names a quoted file placeholder,
`grep -nE '^#+ ' "<file>"`. Pasted alone, the old span named no file and
read standard input, against "Copy-and-Run Commands".
- `CODESTYLE.md` "Shell" > "Interrupts in Shell": the `INT` and `TERM`
trap bullet now bounds the wait on the children. It polls them with
`kill -0`, sleeps `0.1` between polls, sends SIGKILL at a bound such as
10 seconds, then reaps them with `wait "${pids[@]}"`. A child that
ignores SIGTERM no longer hangs the script at Ctrl-C, and the rule now
agrees with "Interrupts in Python". The `2>/dev/null` and `|| :`
sentences cover the new commands, the `sleep` included, since a second
Ctrl-C ends it non-zero. Each child's ID is stored at an index that only
increases and leaves the array once the script's own `wait` on it
returns, so the trap's SIGKILL never reaches a reused ID.
- The `shell-codestyle` include and its generated copies are regenerated
with `scripts/build_dist.py`.

## Verification

- The placeholder-filled heading search ran in a temporary directory and
printed the file's headings.
- A probe script built to the new trap bullet ran under `setsid --wait
timeout`, signalled mid-run, in each combination of SIGINT or SIGTERM
and children that obey or ignore SIGTERM. Children that obey: exit 130
or 143 in about 0.1 seconds. Children that ignore SIGTERM: SIGKILL at
the 10-second bound, then exit 130 or 143. In every run no child
survived and the `EXIT` trap removed the temporary directory.
- A double Ctrl-C sent to the process group during the bounded wait
still ended at the bound, confirming the `sleep`'s `|| :`.
- With a process substitution held open, the named `wait "${pids[@]}"`
ended at once, while a bare `wait` hung until the harness's 40-second
timeout.
- With parallel children, removing a finished one by its stored index
left the others' IDs intact, and a later SIGTERM stopped every running
child.
- The loop shape ran under dash too, polling a scalar child and sending
SIGKILL at the bound.
- `pgrep` confirmed no probe process survived.
- `scripts/build_dist.py --check` reports the generated distributions
current, and the pre-commit gates passed.

Closes on promotion: #4473, #4474

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…4480)

Check each deployment environment's secret and variable names against
the registry, in the hub-hosted audit. This follows the maintainer's
2026-11-01 answer on #2070, option 1.

## What changes

- **Declaration.** Each `registry/repos.json` `environments[]` entry may
now carry `secrets` and `variables` name lists. An absent list declares
an empty store. Blog's two environments declare the names they hold
today. aiopurpleair's `pypi` declares none, and it holds none.
- **Check.** A new `secrets.environments` check lives in the new
`spec/audit_environments.py`. It reads every environment GitHub has for
the repo, and each one's two stores:
- A declared name missing from its store is a DEFECT, and so is a name
held as the other kind.
  - A held name the declaration omits is DRIFT.
  - An environment the registry does not declare must hold nothing.
- A declared environment GitHub lacks reports each name it declares as
missing.
- A name the repository stores forbid, such as a retired publish token,
is a DEFECT in an environment store too, however it is declared.
- **Names only.** Each read is `gh api --paginate --hostname github.com
... --jq '.<key>[].name'`, through `spec/resolve_secrets.py`'s `gh_run`.
So no variable value ever reaches the audit's process, and the host is
pinned against `GH_HOST`.
- **A failed read is an ERROR.** `gh_run` raises on a non-zero `gh` exit
or a missing `gh`, and `audit.main` reports that as the repo's ERROR
rather than as an empty store.
- **Gate.** `spec/validate.py` shape-checks the two new lists with the
same `name_list_errors` helper `requiredSecrets` now uses. Each name
must match `SECRET_NAME_PATTERN`, and a name a publish mechanism forbids
is refused. The schema's copy of the pattern is held byte-identical by
`RegistrySchemaMirrorCase`.
- **Retired.** The unread `environments` object leaves
`spec/secrets.schema.json`. The `spec/secrets.json` notes, Blog's
driftNote, AUDIT.md sections 4 and 6 (the `hugo` bullet and the
`repo-setup` dimension now grade environment names),
`docs/repo-config.md`, `STANDUP.md`, and the "Locally Required Secrets"
entry in `TODO.md` no longer say that environment names go unchecked.
- **Wiring.** `spec/audit.py` gains only the import and a three-line
wrapper, and it ends at 2994 of its 3000-line ceiling.
`tests/test_audit_size.py` gives the new module a 200-line ceiling of
its own.

## Verification

- `python -m unittest discover -s tests` passes on the head, 5076 tests,
including the new `tests/test_audit_environments.py`. It uses
constructed names only.
- `spec/validate.py` reports OK.
- `ruff format --check`, `ruff check`, and `mypy` on the changed files
are clean.
- A live, read-only run of the new check against all 23 cataloged repos
reported no findings and no read errors, private repos included.

## Open findings from the local pass

The local pass's edit budget was spent, so these two `introduced`
findings were handed to this pull request's review loop. Both are now
fixed:

- `spec/project-types.json:116`, `introduced`, **fixed** in c2cbad6.
The `hugo` type's note said no audit inventories per-environment deploy
credentials. It now names `spec/audit_environments.py` (the
`secrets.environments` check).
- `spec/audit_environments.py` with `spec/validate.py`, `introduced`,
**fixed** in 7ffe971. An environment list could declare a name the
repo's mechanisms forbid, which the audit reports missing until stored
and forbidden once stored. `spec/validate.py` now refuses that
declaration through `forbidden_environment_names()`, as it refuses a
forbidden `requiredSecrets` name.

## Declined local-pass findings

- `spec/validate.py` `forbidden_environment_names`, raised as
over-hardening: **declined**. It mirrors the existing `requiredSecrets`
forbids cross-check in the same per-publish-target loop, so the gate
treats both declaration surfaces alike, and the mirror covers exactly
the mechanism forbids that check covers. A baseline-forbidden name in an
environment is still a DEFECT on every audit run. Without the gate, a
declared mechanism-forbidden name sends the audit's first finding the
wrong way: "missing", which reads as "store it".

## Pre-existing findings, not filed

- `spec/audit.py` `gh()` and `spec/resolve_secrets.py`
`read_live_names`: neither pins `--hostname github.com`, so `GH_HOST`
moves their reads to another host while this change's environment reads
stay on github.com. Class: correctness, raised by the local pass against
unchanged code.

## Dependants

#2174 (its option 6) and #1801 (its option 2) were waiting on this
answer. Neither is changed here.

Closes on promotion: #2070

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
)

Closes on promotion: #4408

## What

`lib/sh/secrets.sh` splits a path with `readarray -d` in `secret_state`,
and the `-d` option needs bash 4.4. Stock macOS ships bash 3.2. Per the
maintainer's answer on #4408, the library keeps `readarray -d` and macOS
gets a bash 4.4 floor instead.

- **`spec/host-tools.schema.json` and
`spec/host-tools-local.schema.json`** gain an optional `platforms` key,
identical in both: a non-empty, duplicate-free list drawn from `linux`,
`macos`, `windows`. Absent means every platform.
- **`scripts/host_gate.py`** reads nothing for an entry whose
`platforms` leaves out the running platform, and notes the skip.
`field_problems` shape-checks the key on overlay entries, and
`contract_problems` checks it on the merged set, so a bad hub value is
caught at runtime too. The merge stays tighten-only: an overlay may
widen `platforms` and may not narrow it. A malformed hub value reads as
every platform, both in the merge and in the check.
- **`spec/host-tools.json`** gains a `bash` entry: required, `platforms:
["macos"]`, a measured 4.4 floor, Homebrew's bash as source, and `brew
install bash` as remedy. `install` rather than `upgrade`, because the
failing bash is the platform's own, per the spec note's rule. The probe
reaches `bash` through `PATH`, which is the bash
`repo-config/configure.sh`'s `#!/usr/bin/env bash` runs.
- **`tests/test_bootstrap.py`**: the installer coverage check and the
remedy totality check skip a platform the entry's `platforms` leaves
out. They read the key and add no `NOT_MANAGED` or
`REMEDY_NOT_APPLICABLE` records. No other part of the file changes.
- **`tests/test_host_gate.py`** covers the skip and its note, the check
on the scoped platform, malformed values, widening and narrowing in the
merge, the contract check with and without a floor, and the shipped bash
entry against both a 3.2 and a 5.2 banner.
- **`docs/host-setup.md`** gains a contract-table row for `bash`, a
paragraph on the macOS floor and the `PATH` order it depends on, and the
widening rule beside the other tighten-only rules.
- **`scripts/README.md`**, the root **`host-tools.json`** note, and the
**`STANDUP.md`** overlay paragraph state the widening rule beside the
other tighten-only rules. `scripts/README.md` also names the bash floor
beside the other measured floors and drops the stale count of them.

## Verification

- On Linux: `python3 tests/test_host_gate.py`, `python3
tests/test_bootstrap.py`, the full suite as `uv run --no-project
--with-requirements tests/requirements.txt python -m unittest discover
-s tests` (5092 tests after merging current develop, OK, 13 skipped),
`uv run --no-project --script spec/validate.py`, ruff format and check,
mypy, and the prose and EOL gates in the pre-commit hook. `python3
scripts/host_gate.py` on this Linux host notes the bash skip and passes.
- **Unverified on native macOS.** No CI job runs on macOS and this host
is Linux. The macOS cases are proven only by tests that set
`sys.platform` to `darwin`. Still owed on a macOS host, per #3933:
1. On stock bash 3.2, `python3 scripts/host_gate.py` reports `bash 3.2.x
is below the 4.4 floor` with `REMEDY: brew install bash`.
2. After `brew install bash` with Homebrew's `bin` ahead of `/bin` on
`PATH`, the gate reports `bash 5.x meets the 4.4 floor`.
3. `repo-config/configure.sh` then runs its secrets group past
`secret_state`.

## Local review

Five recorded `local-strict-review` passes. The `introduced` findings
that stayed open past an edit budget are fixed by later pushes:

- `spec/host-tools.schema.json`, `platforms` description: it said the
installers "neither manage it nor owe it a remedy" on an unlisted
platform, while `install-tools.sh` and `install-tools.ps1` read an
overlay's `install` metadata without reading `platforms`. It now says a
hub entry owes no installer coverage or remedy there, which is what the
two bootstrap checks enforce.
- `tests/test_host_gate.py`: the malformed-hub-value merge test now
covers widening to every platform as well as the narrowing rejection its
docstring named.
- `STANDUP.md`, the `host-tools.json` overlay paragraph: it restated the
merge rule as a closed list without the platforms axis. The third push
adds widening and narrowing there, the last restatement of that list.

### Declined local findings

- `lib/sh/secrets.sh` `secret_shape_verdict` uses GNU `stat -c`, which
macOS's BSD `stat` rejects, so a Mac past this floor still has present
secrets refused. This is the portable `stat` half of #3933, which that
issue tracks and which is outside this change by its claim. This
change's text claims only that the floor covers the `readarray -d`
split, which stays true.
- `spec/validate.py` does not check the hub's `platforms` value.
`contract_problems` checks it on every gate run before any tool is read,
and `test_the_shipped_declaration_meets_its_own_contract` runs it over
the shipped `spec/host-tools.json` in CI, so a malformed hub value fails
before merge. The `host_gate.py` comment naming `spec/validate.py` is
about pattern compilation alone, which that file still checks.
- `tests/test_bootstrap.py` reads `tool.get("platforms", (platform,))`
rather than `host_gate.effective_platforms`, so the two disagree on a
malformed value. A malformed shipped value already fails CI through the
contract test above, so the disagreement cannot reach a merged
declaration. Reusing the helper would mean importing `scripts/` into a
file whose edit here is bounded to its two checks.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
## Summary

`side_asks` in `scripts/pr_review_hold.py` restated the
trusted-and-shown comment filter that `trusted_comments` in
`scripts/pr_review_rounds.py` applies. So a change to whose comment the
gate trusts had two places to land, and nothing failed when only one was
edited.

- `scripts/pr_review_payload.py` now holds `TRUSTED_ASSOCIATIONS` and a
node-level reader, `trusted_comment_nodes`. It returns each conversation
comment an owner, member, or collaborator wrote and nobody minimized, in
payload order.
- `trusted_comments` and `side_asks` both build on it. Their names,
signatures, and behavior are unchanged. `side_asks` still keeps only a
whole-body match and sorts oldest first, and `trusted_comments` still
yields each body with its HTML lines outside code.
- The reader lives in `pr_review_payload.py` because
`pr_review_rounds.py` sits at its size ceiling, and the payload module
is already the dependency-free base both readers import. Every file
stays under its ceiling in `tests/test_pr_review_size.py`, which is not
raised. `pr_review_rounds.py` drops from 699 to 695 lines,
`pr_review_hold.py` from 195 to 189, and `pr_review_payload.py` grows
from 80 to 95.
- A constructed case in `tests/test_pr_review_policy.py` pins that the
shared reader, `side_asks`, and `trusted_comments` keep the same
comments. Its comments come from each write-access association, a
minimized owner, a contributor, a passer-by, and a missing association.

This was the last item #3880 held open. The attestation marker, the
reviewer logins, the trigger commands, and the thread readers were
shared by #3886, and the reviewed-heads set by #4458.

Closes on promotion: #3880

## Dropped findings

- `scripts/handoff.py` (`WRITERS`, and its use in two places),
consolidation: it repeats the write-access-and-not-minimized test over
issue comment rows rather than a pull request payload. This change does
not touch the file. Raised by the local strict review.

## Verification

- `python -m unittest discover -s tests`, run as CI runs it with
`tests/requirements.txt`.
- `ruff format --check`, `ruff check`, and `mypy` clean through the
pre-commit hook.

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

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
## Summary

Measures the git floor the `rev-parse --verify --quiet --end-of-options
<ref>^{commit}` read in `scripts/skills_install.py` needs, and records
the answer in the `git` entry of `spec/host-tools.json`. The answer is
no floor. The read resolves an ordinary ref on every release measured,
back to 2.20.5. The issue's premise was that an older git fails every
candidate ref, and the measurement disproves it. `rev-parse --verify`
drops a flag it does not know, so a release older than the marker reads
`refs/remotes/origin/main` and `refs/heads/main` the same way a current
one does.

What the marker adds, from 2.30.0, is its meaning. A ref name beginning
with a dash resolves as a revision there. On 2.29.3 and below the same
read exits 1 with no output, so an older release fails that case closed
rather than misreading it. Debian 12 packages 2.39.5 and Ubuntu 22.04
packages 2.34.1, so a supported distribution sits above even that
release.

`docs/host-setup.md` already lists `git` with no floor and says it comes
from the distribution, so it needs no edit. `tests/test_host_gate.py`
needs no constructed case, since no floor is added.

## Evidence

Each run used one container, a throwaway repository with one empty
commit, and `setsid --wait timeout`. Every container ran with `--rm`,
and afterwards `docker ps -a --filter name=gitfloor` and `pgrep` found
nothing left. The probe ran these reads:

- `rev-parse --verify --quiet 'HEAD^{commit}'`, the control.
- `rev-parse --verify --quiet --end-of-options 'HEAD^{commit}'`, the
read the issue names.
- The same read on an absent ref, to show the success above is a real
resolution.
- The same read on a ref named `refs/heads/-x`, with and without the
marker, to show where the marker gains meaning.

| git | Source | Control | Marker read | Absent ref | Dash ref with
marker |
| --- | --- | --- | --- | --- | --- |
| 2.20.5 | kernel.org tarball, built in
`debian@sha256:e67eeead736ff7bbe258ef088bff683635c561b1fcfefad0806c1df4ab49ce0e`
| 0 | 0 | 1 | 1 |
| 2.23.4 | kernel.org tarball, same builder image | 0 | 0 | 1 | 1 |
| 2.24.0 | kernel.org tarball, same builder image | 0 | 0 | 1 | 1 |
| 2.24.3 |
`alpine/git@sha256:8d2aedf3898243892d170f033603b40a55e0b0a8ab68ba9762f9c0dae40b5c8d`
| 0 | 0 | 1 | 1 |
| 2.26.2 |
`alpine/git@sha256:23618034b0be9205d9cc0846eb711b12ba4c9b468efdd8a59aac1d7b1a23363f`
| 0 | 0 | 1 | 1 |
| 2.29.3 | kernel.org tarball, same builder image | 0 | 0 | 1 | 1 |
| 2.30.0 |
`alpine/git@sha256:1f6d3a3e26e7452fab3e144d9dd3f11712b2f8dffa4b2094918bf4cd874e7841`
| 0 | 0 | 1 | 0 |
| 2.32.0 |
`alpine/git@sha256:e39163015b1351d4220e9e3ec9395ea78d0a2f371529e936808cbfb98f799ed9`
(tagged `v2.30.2`, reports 2.32.0) | 0 | 0 | 1 | 0 |
| 2.47.3 | this host | 0 | 0 | 1 | 0 |

Each tarball was checked against kernel.org's `sha256sums.asc` before it
was built. The builder is `debian:bookworm-slim`, and the binary was
built with `NO_OPENSSL NO_CURL NO_EXPAT NO_TCLTK NO_GETTEXT NO_PERL
NO_PYTHON`. Without `--verify`, every release prints the marker back as
a flag beside the commit, current git included, so that form says
nothing about the floor.

Distribution packages, read with `apt-cache policy git` in digest-pinned
containers:

- Debian 12
(`debian@sha256:e67eeead736ff7bbe258ef088bff683635c561b1fcfefad0806c1df4ab49ce0e`):
`1:2.39.5-0+deb12u3`.
- Ubuntu 22.04
(`ubuntu@sha256:b000e69a50ff940390233025e7a337fb8469b509e2334fa4d018ac30f3e18cdb`):
`1:2.34.1-1ubuntu1.18`.

## Local strict review

Five recorded `agent-skill` passes ran at the `frontier` tier, and the
last one, over the current head, found nothing. The first four raised
seven `introduced` findings against the `why`, and the fix commits
answer all of them:

- The `why` no longer calls this read the fleet's only git version
question. It names the git 2.31 dependencies in the agent-safety write
guard and `merge-bot-task.yml` as examples. It also says the packaged
Debian 12 and Ubuntu 22.04 releases clear 2.31, so
`host-setup/agent-safety/claude/README.md`'s pointer to this `why` for
the fleet-wide reasoning still holds.
- Each version range is limited to the releases measured.
- The tarball check is stated as it ran: a sha256 check against
`sha256sums.asc`, with that file's signature unverified.

### Pre-existing findings, not filed

- `.agents/skills/upstream-contribution-workflow/SKILL.md`, around lines
87 and 105, a false or unfollowable instruction. The skill tells the
reader to run `git show --remerge-diff`, which needs git 2.36, and
Ubuntu 22.04 packages 2.34.1.

Closes on promotion: #3468

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


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

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Documentation**
* Updated the Git compatibility notes to describe how reference
verification behaves across specified Git releases, including when
dash-prefixed references are protected from option parsing.
* Added related observations about Git-version behavior and retained the
existing compatibility note for newer Git releases.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings November 26, 2026 07:33
@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • 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

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

Approval is blocked by an active critical fingerprint-collision bug and an inaccurate tracker statement that still require correction.

2 open issues
What changed in this PR

This promotion consolidates the latest fleet changes into main, strengthening repository auditing, Docker lint reproducibility, Python version selection, workflow contracts, host-platform handling, and review tooling.

Changes:

  • Adds environment secret and variable auditing, directory-aware Dependabot checks, and workflow permission validation.
  • Selects Python versions from .python-version, pins Docker lint images by digest, and adds bounded pull retries.
  • Updates host-tool contracts, reusable workflow inputs, promotion procedures, review helpers, documentation, and generated Skills.
File Description
TODO.md Records the completed environment secret audit work.
tests/​test_workflow_steps.py Tests conditional hook-input routing for reusable workflows.
tests/​test_spec_validate.py Tests environment store name validation.
tests/​test_skills_install.py Updates companion-file coverage expectations.
tests/​test_repo_gate.py Tests Docker pull retries and digest manifest handling.
tests/​test_prose_lint.py Tests deterministic signal-handler ordering.
tests/​test_pr_review.py Tests Qodo finding key stability and dismissal guidance.
tests/​test_pr_review_policy.py Verifies shared trusted-comment filtering.
tests/​test_hub_fetch_run.py Tests fetching Docker lint companion files.
tests/​test_cli_usage.py Registers the hook-enablement script in CLI checks.
tests/​test_bootstrap.py Handles platform-scoped host-tool declarations.
tests/​test_backlog_metrics.py Verifies shared reviewed-head calculations.
tests/​test_audit.py Stubs environment audit reads in audit fixtures.
tests/​test_audit_size.py Adds size limits for new audit modules.
STANDUP.md Documents environment declarations and platform overlays.
spec/​validate.py Validates environment store names and secret and variable declarations.
spec/​secrets.schema.json Removes the obsolete environment declaration schema block.
spec/​secrets.json Documents registry-owned environment declarations.
spec/​host-tools.schema.json Adds platform-scoped host-tool entries.
spec/​host-tools.json Adds the macOS Bash 4.4 requirement and updates Git compatibility notes.
spec/​host-tools-local.schema.json Allows repository overlays to widen supported platforms.
spec/​files.json Requires empty workflow-level permissions blocks.
spec/​checks.json Registers the environment secret audit check.
spec/​audit.py Integrates environment and Dependabot audits.
spec/​audit_environments.py Compares declared and live environment stores.
spec/​audit_dependabot.py Detects Python manifests needing directory-scoped Dependabot coverage.
spec/​audit_contract.py Supports exact workflow contract token matching.
scripts/​pr_review_rounds.py Centralizes reviewed-commit calculations and trusted comment reading.
scripts/​pr_review_payload.py Provides the shared trusted-comment reader.
scripts/​pr_review_hold.py Reuses trusted-comment filtering for review requests.
scripts/​pr_review_answers.py Stabilizes Qodo finding keys and updates dismissal instructions.
scripts/​host_gate.py Enforces platform-scoped host-tool contracts.
scripts/​backlog_metrics.py Reuses the shared reviewed-head calculation.
RESYNC.md Extends resync convergence through promotion to main.
registry/​repos.schema.json Defines environment secret and variable name lists.
registry/​repos.json Declares Blog's environment stores.
OPERATIONS.md Documents digest-pinned Docker lint images.
host-tools.json Updates the repository host-tool overlay contract description.
host-setup/​windows/​README.md Documents managed agent copies and report schema behavior.
host-setup/​linux/​README.md Documents Microsoft-feed unmanaged states and digest-pinned linting.
host-setup/​linux/​install-tools.sh Reports and handles unmanaged Microsoft-feed tools.
docs/​repo-config.md Documents registry-owned environment store checks.
docs/​pre-commit-hooks-rollout.md Adds clone-safe hook enablement instructions.
docs/​devcontainer.md Aligns Python devcontainer guidance with .python-version selectors.
catalog/​snippets/​pre-commit/​README.md Updates hook enablement and Docker pin guidance.
catalog/​snippets/​husky/​README.md Updates Docker lint image documentation.
catalog/​snippets/​hub_fetch_run.py Fetches the Docker lint pin manifest with the linter script.
AGENTS.md Makes the large-file heading command runnable as written.
.python-version Selects Python 3.13 for the hub.
.github/​workflows/​test-pull-request.yml Adds an empty workflow-level permissions block.
.github/​workflows/​publish-release.yml Adds an empty workflow-level permissions block.
.github/​workflows/​check-upstream-version-task.yml Routes optional hook input to upstream hooks.
.github/​workflows/​build-release-task.yml Selects the repository Python line for PyPI builds.
.github/​skills/​shell-codestyle/​SKILL.md Documents bounded shell child cleanup.
.github/​skills/​resync-a-repo/​SKILL.md Updates resync promotion and re-audit guidance.
.github/​skills/​python-codestyle/​SKILL.md Documents Python-line selection and checker policy.
.github/​skills/​python-codestyle/​references/​code-style.md Aligns Python syntax guidance with the selected line.
.github/​skills/​pr-review-conduct/​SKILL.md Updates Qodo dismissal guidance.
.github/​skills/​drive-pr/​SKILL.md Updates Qodo redrive guidance.
.github/​skills/​audit-a-repo/​SKILL.md Updates post-audit promotion guidance.
.github/​dependabot.yml Adds Docker ecosystem tracking for lint images.
.github/​actions/​validate/​action.yml Declares the optional validate hook-input interface.
.github/​actions/​resolve-upstream/​action.yml Declares the optional resolve-upstream hook-input interface.
.github/​actions/​repo-gate/​repo_gate.py Reads pinned ShellCheck images and retries pulls.
.github/​actions/​python-version/​action.yml Selects and validates the repository Python line.
.github/​actions/​pypi-build-default/​action.yml Accepts the selected Python version.
.github/​actions/​prose-gate/​prose_lint.py Makes nested signal handling deterministic.
.github/​actions/​docker-lint-pins/​Dockerfile Stores digest-pinned Docker lint image references.
.github/​actions/​docker-lint-pins/​action.yml Exposes and validates Docker lint image pins.
.claude-plugin/​fleet-skills/​skills/​shell-codestyle/​SKILL.md Regenerates the Claude shell skill copy.
.claude-plugin/​fleet-skills/​skills/​resync-a-repo/​SKILL.md Regenerates the Claude resync skill copy.
.claude-plugin/​fleet-skills/​skills/​python-codestyle/​SKILL.md Regenerates the Claude Python skill copy.
.claude-plugin/​fleet-skills/​skills/​python-codestyle/​references/​code-style.md Regenerates the Claude Python style reference.
.claude-plugin/​fleet-skills/​skills/​pr-review-conduct/​SKILL.md Regenerates the Claude review-conduct skill copy.
.claude-plugin/​fleet-skills/​skills/​drive-pr/​SKILL.md Regenerates the Claude drive skill copy.
.claude-plugin/​fleet-skills/​skills/​audit-a-repo/​SKILL.md Regenerates the Claude audit skill copy.
.claude-plugin/​fleet-skills/​.source-digests/​shell-codestyle Updates the shell skill source digest.
.claude-plugin/​fleet-skills/​.source-digests/​resync-a-repo Updates the resync skill source digest.
.claude-plugin/​fleet-skills/​.source-digests/​python-codestyle Updates the Python skill source digest.
.claude-plugin/​fleet-skills/​.source-digests/​pr-review-conduct Updates the review-conduct skill source digest.
.claude-plugin/​fleet-skills/​.source-digests/​drive-pr Updates the drive skill source digest.
.claude-plugin/​fleet-skills/​.source-digests/​audit-a-repo Updates the audit skill source digest.
.claude-plugin/​fleet-skills/​.source-digests/​agent-conduct Updates the agent-conduct skill source digest.
.agents/​skills/​shell-codestyle/​SKILL.md Updates the authored shell cleanup guidance.
.agents/​skills/​resync-a-repo/​SKILL.md Updates the authored resync guidance.
.agents/​skills/​python-codestyle/​SKILL.md Updates the authored Python guidance.
.agents/​skills/​python-codestyle/​references/​code-style.md Updates the authored Python style reference.
.agents/​skills/​pr-review-conduct/​SKILL.md Updates the authored review guidance.
.agents/​skills/​drive-pr/​SKILL.md Updates the authored PR-driving guidance.
.agents/​skills/​audit-a-repo/​SKILL.md Updates the authored audit guidance.

Review effort: Lite

Comment thread scripts/pr_review_answers.py Resolved
Comment thread TODO.md Resolved
@codecov

codecov Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 70.85828% with 146 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.31%. Comparing base (7362607) to head (3183644).
⚠️ Report is 530 commits behind head on main.

Files with missing lines Patch % Lines
scripts/enable_hooks.py 23.49% 140 Missing ⚠️
scripts/docker_lint.py 97.67% 2 Missing ⚠️
spec/audit_dependabot.py 97.46% 2 Missing ⚠️
scripts/host_gate.py 96.77% 1 Missing ⚠️
spec/validate.py 94.73% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4485      +/-   ##
==========================================
- Coverage   79.62%   79.31%   -0.31%     
==========================================
  Files          47       50       +3     
  Lines       16398    16835     +437     
==========================================
+ Hits        13057    13353     +296     
- Misses       3341     3482     +141     
Flag Coverage Δ
python-3.13 79.31% <70.85%> (-0.31%) ⬇️

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 Nov 26, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@ptr727

ptr727 commented Nov 26, 2026

Copy link
Copy Markdown
Owner Author

/review

@coderabbitai

coderabbitai Bot commented Nov 26, 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.

## Summary

A Qodo acknowledgment key is hashed from the open section's title and
text after a normalization
that drops what an in-place Qodo edit can rewrite. Its second
alternative removed every standalone
7-to-40-character lowercase hex run, so two findings differing only in a
run of 7 or more digits,
or in a hex-only word or file stem, shared one key, and one `--ack`
answered both.

The normalization now drops a link, as before, and a hash only where it
follows the word `commit`
or `commits`, in any case, optionally through an HTML tag, a backtick, a
quote, a bracket, or a
colon. A sample of 30 open sections
from real Qodo findings comments in the fleet showed every commit hash
inside a link, which the
link alternative already removes, and the only bare hex-like run outside
one was a compliance rule
number, exactly the kind of text the old alternative wrongly stripped.

The `scripts/README.md` sentence saying what a Qodo entry's key leaves
out was updated to match.

## Tests

- New: two Qodo findings differing only in `1048576` against `2097152`,
and only in `abcdef0.py`
against `abcdef1.py`, get distinct keys, and a section whose only change
is the hash after
  `commit` keeps its key. It fails against the old expression.
- Updated: the existing test that a key survives an edit moving only the
commit now renders the
hash as a commit link and after `commit`, the shapes the normalization
keeps volatile.

Closes on promotion: #4488

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


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

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Bug Fixes**
* Finding keys now ignore hexadecimal hashes only when they follow a
commit reference, while still ignoring links. Hexadecimal-like text
elsewhere in findings is preserved, so distinct findings remain
distinguishable.
* **Tests**
* Added coverage for commit-reference variations in findings and linked
URLs.
* **Documentation**
* Updated the description of which content is excluded from finding
keys.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

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.

🔵 Needs a closer look

Approval should wait for maintainer or CI validation because the promotion combines workflow, privileged environment-API, host-platform, and Docker changes whose live permissions and native macOS behavior were not verified.

No open issues 🎉

2 resolved since last review

Review effort: Lite

@ptr727

ptr727 commented Nov 26, 2026

Copy link
Copy Markdown
Owner Author

Answering the Copilot round on c25ec49 (review 6077912218), VERDICT WITH NO COUNTED FINDING, count (1): the headline, quoted: "Approval should wait for maintainer or CI validation because the promotion combines workflow, privileged environment-API, host-platform, and Docker changes whose live permissions and native macOS behavior were not verified."

No change needed. The headline names no file, line, or failing input. Its two conditions are already met or already disclosed: CI is green on this head (14/14 checks), and this promotion waits on the maintainer's explicit merge permission in any case. The unverified items it gestures at are stated in this pull request's body under "Release notes for callers": #4478's macOS bash floor is recorded as not yet verified on a native macOS host, and #4461's Dependabot docker ecosystem on mirror.gcr.io as unconfirmed until its first run. #4480's environment reads are names-only through gh api --jq '.<key>[].name', per that pull request's body, so no secret or variable value reaches the audit. Nothing in the promotion changes on this verdict.

@ptr727

ptr727 commented Nov 26, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head c25ec496406ec1f65320fba0ca8b155f1a183f82, the content this pull request carries at that commit against main, and it recorded 5 findings.

ptr727 and others added 3 commits November 26, 2026 09:52
…#4500)

## Summary

`scripts/enable_hooks.py` `on_signal` kept the handler shape from before
#4453. A SIGTERM handled as the SIGINT handler starts runs nested inside
it, before the SIGINT is recorded, so the reported signal is the
SIGTERM.

### Fix

- `on_signal` returns when the frame it interrupted is its own
(`frame.f_code is on_signal.__code__`), matching the handler #4453 fixed
in the prose gate.
- New test
`test_a_signal_handled_as_the_first_handler_starts_is_passed_over` makes
the nested call with a `sys.setprofile` hook, so the order is fixed
rather than raced. It fails against the old handler (`[SIGTERM] !=
[SIGINT]`) and passes now.

### Review finding

- Local review (design): the handler is now copied a second time while
eight other sites still lack the guard. Declined here. That class, and
whether it gets one shared fix, is tracked by the open decision issue
#4452, which lists all eight sites, two of them needing the maintainer.
This PR fixes only the one site #4452 did not list, using the handler
#4453 settled, and does not decide #4452's question.

Closes on promotion: #4498

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


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

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Bug Fixes**
* Improved handling of closely timed interrupts. When another signal
arrives while an earlier signal is still being processed, the original
signal is now preserved, helping ensure the expected interruption
behavior.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
## Summary

Most of the hub's `gh` calls named no host. So an exported `GH_HOST`
moved a read or a write to a host the registry never named. With
`GH_HOST=other.example`, `spec/audit.py` read `repos/ptr727/<repo>` from
that host. Its environment checks in the same run stayed on github.com.
The registry names every repository on github.com, so the host is now
pinned for every `gh` child these scripts start.

The pin is one mechanism in one place. `scripts/gh_graphql.py` gains
`pinned_env()`, the process environment with `GH_HOST=github.com`. Its
`run_subprocess` now passes that to every child. The pin goes in the
child environment rather than in `--hostname`, since `--hostname` exists
on `gh api` alone. `gh help environment` says `GH_HOST` sets the host
for a command that names none. Reads run with `GH_HOST` set to an
unresolvable constructed host confirmed it. `gh api` REST and GraphQL
calls follow it, and so do `gh pr view` and `gh issue list` given
`--repo OWNER/REPO`. Each failed with `error connecting to` that host.
Each answered from github.com with `GH_HOST=github.com`.

Each listed site now reaches the pin:

- `spec/resolve_secrets.py`: all four reads go through `gh_run`, which
calls `run_subprocess`.
- `scripts/agent_policy.py`, `scripts/backlog_metrics.py`,
`scripts/gh_graphql.py`: already ran through `run_subprocess`.
- `spec/audit.py` `gh()`: now runs through `run_subprocess`. The file is
at 2988 of its 3000.
- `scripts/handoff.py` `run_gh()`: now runs through `run_subprocess`,
which does the same UTF-8 decode and `OSError` mapping it did by hand.
- `scripts/pr_review.py` `_run()`: passes `pinned_env()` unless a caller
names its own `env`. That covers `gh_rest`, the escape-flag probe, the
tarball read, and `scripts/pr_merge.py`'s `gh pr merge`, which runs
through `core._run`. No `gh` call passes its own `env`. The file stays
at 2196 of its 2200.

The trusted comment on the issue asked for one host-pinned names reader
in place of the `spec/audit_environments.py` `names()` and
`spec/resolve_secrets.py` `read_live_names` pair. That reader is now
`resolve_secrets.read_names(path, key)`. `read_live_names` and the
environment check both read through it, and `names()` is gone. The argv
the two built is unchanged, since `--hostname` is no longer needed. So
`tests/test_configure_secrets.py`'s stub `gh` matches as before.

Closes on promotion: #4489

## Out of Scope

- The shell and PowerShell scripts were not swept, as the issue states.

## Pre-existing findings, filed

- `host-setup/agent-safety/claude/gh-write-guard.py`
`_live_branch_rules`, correctness: its branch-rules read names no host,
so `GH_HOST` moves it. Filed as #4501.

## Local review findings

- `spec/audit.py` `check_secrets_names` read the repository stores
through an unpaginated `gh()` page, a third copy of the names reader.
Fixed: it now calls `resolve_secrets.read_live_names`, which paginates.
- `spec/audit.py` kept its own copy of `HTTP_STATUS`. Fixed: `gh()` uses
`gh_graphql`'s.
- Moving `audit.gh()` onto `resolve_secrets.gh_run` was declined.
`gh_graphql`'s docstring says each caller maps a failed run to its own
exit contract, since the contracts differ. `gh_run` names a repository
and raises `ResolveError`. `audit.gh()` also reads non-repository paths,
and its callers catch `RuntimeError`. Both share the transport,
`run_subprocess`.

## Tests

- `tests/test_gh_graphql.py`: a real child started by `run_subprocess`
under `GH_HOST=ghe.example.invalid` reads `github.com`. `pinned_env()`
keeps the rest of the environment, and a GraphQL `request` runs pinned.
- `tests/test_pr_review.py`: a real child started by `_run` reads
`github.com`, and `gh_rest` and `head_carries` both pass the pinned
host.
- `tests/test_audit_helpers.py`, `tests/test_resolve_secrets.py`,
`tests/test_handoff.py`, `tests/test_agent_policy.py`,
`tests/test_backlog_metrics.py`, `tests/test_pr_merge.py`: each site run
under `GH_HOST=ghe.example.invalid` passes `GH_HOST=github.com` to its
child.
- Each new test fails with `pinned_env()` reduced to a plain copy of the
environment, and passes with the pin.
- The existing environment-reader tests now read through
`resolve_secrets.read_names`.
- Full `unittest` suite, `ruff check`, `ruff format --check`, and `mypy`
are clean.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
## Summary

The Docker image pull retry was written five times, with three different
backoff schedules: 5s/10s, 10s/20s and 15s/30s. This change keeps one
implementation and one schedule.

- **One loop.** `scripts/docker_lint.py`'s `pull_image` is now the only
retry. It makes 3 attempts and waits 15s, then 30s. A timeout or a
client that cannot start is not retried. The client's error output is
captured into the failure, so whoever reports it names the cause.
- **Why 15s then 30s.** This was the widest of the three existing
schedules. #1727's failure was a connection reset on Docker Hub's token
endpoint during a release run. That blip clears within such a window,
and a pull that succeeds never waits.
- **`--pull IMAGE` mode.** It pulls each named image and lints nothing.
It cannot be combined with `--linter`. Under GitHub Actions a retried
pull prints a `::warning::` annotation and a failed one an `::error::`,
as the removed shell loops did. Both are built from the image reference
alone.
- **Workflow steps.** `validate-task.yml`'s EditorConfig, shell, and
PowerShell steps drop their three copied `pull()` functions and call
`python3 "$DOCKER_LINT" --pull ...`. The steps keep their existing pull
conditions. EditorConfig checks the whole tree and always pulls, as
before. The shell step pulls inside its existing `if [ "${#scripts[@]}"
-gt 0 ]`, and the PowerShell step inside its `if [ "${#ps_scripts[@]}"
-gt 0 ]`. No workflow step is declined.
- **Repo gate.** `repo_gate.py` loads the hub's `scripts/docker_lint.py`
the same way it already loads `scripts/carry.py`. It now does this
through one `hub_script` loader, which registers the module in
`sys.modules` so that `docker_lint.py`'s dataclass resolves. Its
shellcheck pull goes through `pull_image`.
- **Why the loop lives in `docker_lint.py` rather than in a new
module.** Fleet repos fetch `docker_lint.py` through their carried
`hub_fetch_run.py` with only its pin Dockerfile beside it. A new module
it imported would break every fleet repo whose `hub_fetch_run.py`
predates it.

## Same-ref guarantee for pinned callers

Callers run `validate-task.yml` at their own hub pin. The `--pull` mode
and the path the steps run always come from that same commit:

- The steps reach the script only through the new `docker-lint` output
of `$/.github/actions/docker-lint-pins`. A `$/` action runs from the
whole hub tree at the calling workflow's own ref. The new `Locate Docker
lint script step` resolves
`$GITHUB_ACTION_PATH/../../../scripts/docker_lint.py` inside that tree.
If the file were missing, `python3` would fail the step on it.
- A caller pinned before this change runs the old workflow, which
carries its own `pull()` and reads no `docker-lint` output.
- A caller pinned at or after this change gets the workflow and
`docker_lint.py` from one commit, and that commit has `--pull`.

No ref is ever mixed. The lint steps run the script under the runner's
system `python3`. A new test runs `--pull` under Python 3.12.

## Tests

- `test_docker_lint.py`:
  - The schedule is now 15/30, and pulls are `--quiet`.
  - The failure carries the client's stderr.
- New tests cover `pull()`, `main --pull` routing and its refusal beside
`--linter`, the Actions annotations, and `--pull` under Python 3.12.
- `test_repo_gate.py`:
  - The gate pulls on `docker_lint`'s schedule.
  - A pull that times out is not retried.
  - A `docker_lint.py` that fails to load becomes the reason.
- `test_release_guards.py`:
  - The new locate step names `scripts/docker_lint.py` in the hub tree.
- The EditorConfig step pulls through `$DOCKER_LINT` before `docker
run`, and a failed pull stops it before any container starts.
- Every `docker run` in the workflow is preceded by a `--pull` of its
image, and no `docker pull` is left in the workflow.

Local runs:

- The full unittest suite, plus ruff, mypy, `build_dist.py --check`,
`spec/validate.py` and the repo gate.
- The prose gates, whole-tree and diff.
- `docker_lint.py` over the tree: 7 linters, success.
- A live `--pull` of the pinned shfmt image, and one of an unresolvable
image. The second retried 3 times and failed with the daemon's error.

Closes on promotion: #4499

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

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

Active moderate and critical findings remain, including crashes on malformed configuration and a test stub that invokes a real gh process, so the change is not approval-ready.

1 open issue
3 previously missed issues

In code that hasn't changed since last review

Medium severity Nested platform values crash the host gate

scripts/​host_gate.py:219

platforms is validated as a list, but a nested value such as platforms: [["macos"]] reaches this membership test and raises TypeError because the inner list is unhashable. That makes the host gate crash instead of reporting the malformed declaration, and the existing malformed-platform merge case reaches this path. Convert each value to text before testing membership, or otherwise handle non-hashable elements as stray names.

Medium severity Dependabot fields are not validated before iteration

spec/​audit_dependabot.py:47

dependabot.yml is repository-controlled input, but these fields are iterated without shape validation. A syntactically valid directories: null raises TypeError, and directory: null makes _directory() call .strip(), aborting the audit instead of reporting malformed configuration. Validate these fields at the boundary and return a finding before iterating them.

Medium severity Non-mapping TOML values crash the Dependabot audit

spec/​audit_dependabot.py:63

A syntactically valid pyproject.toml can still assign a scalar or list to tool or project. This loop then calls .get on that non-mapping value, so the new Dependabot audit aborts instead of reporting the directory finding. Return an empty mapping when an intermediate or final value is not a mapping, as this helper's contract describes.

Review effort: Lite

Comment thread spec/audit.py Resolved
@ptr727

ptr727 commented Nov 26, 2026

Copy link
Copy Markdown
Owner Author

Answering Copilot's three "Previously missed" findings on f93f34a. All three are declined.

[Medium severity] Nested platform values crash the host gate, scripts/host_gate.py:219

Declined, the finding is false. PLATFORM_KEYS is a tuple, ("linux", "macos", "windows") at scripts/host_gate.py:269, so n not in PLATFORM_KEYS tests by equality and never hashes n. The set comprehension then hashes str(n), never the list. On f93f34a, host_gate.platforms_problems([["macos"]]) returns ["platforms names ['macos'], which no platform reads - use linux, macos, windows"], a reported problem rather than a TypeError. A dict element reports the same way.

[Medium severity] Dependabot fields are not validated before iteration, spec/audit_dependabot.py:47
[Medium severity] Non-mapping TOML values crash the Dependabot audit, spec/audit_dependabot.py:63

Declined under the fleet's trust-boundary rule. The input is trusted: the audit reads .github/dependabot.yml and pyproject.toml from the maintainer's own registry repositories at their own refs, not content an outsider supplied. Against trusted input the rule guards a realistic mistake only where it would fail silently or destructively. Neither shape does. A directories: null or a scalar tool table does raise here. But spec/audit.py's per-repository run catches the exception and reports it as an ERROR finding naming the exception, so the failure is loud and changes nothing. Dependabot itself also rejects a directories that is not a list, so that configuration fails visibly on its own side as well. The module already reports the realistic mistakes, YAML that does not parse and TOML that does not parse, as findings.

@ptr727

ptr727 commented Nov 26, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head f93f34a67e4d7021bb62a45a7479bd718c815869, the content this pull request carries at that commit against main, and it recorded 57 findings.

…4505)

## Summary

The repo gate's one `gh` read named no host, and the Docker pin manifest
had three parsers that disagreed. Both are fixed here.

### The gate's `gh` read is pinned to github.com

`gh_read` ran `gh api` in the inherited environment. With `GH_HOST`
exported to a reachable host that lacks the path, the 404 read as
absent, so `sha-pin` could report a valid hub SHA as unresolvable. The
child now runs under `gh_env()`, the process environment with
`GH_HOST=github.com`. That is the same pin #4502's
`gh_graphql.pinned_env()` sets. It is set in place rather than loaded
from `gh_graphql.py` because one context cannot load it: a single-file
fetch through `hub_fetch_run.py`. `repo_gate.py` has no companions
there, and `gate_hub_root()` needs `spec/files.json`. That fallback
would have to exist anyway, so loading the hub module elsewhere changed
no behavior. The local review raised exactly that, and the first draft's
two paths were collapsed into one. A test holds the gate's `GITHUB_HOST`
equal to `gh_graphql.HOST`. Another sets `GH_HOST` to a constructed host
and asserts the child still gets github.com. The existing read-only test
read the 270-byte `scripts/repo_gate.py` shim rather than the gate, so
it could never fail. It now reads the gate itself.

### The pin manifest has one parser

`docker_lint.read_pins` is now the only parser of
`.github/actions/docker-lint-pins/Dockerfile`.

- The repo gate drops its `SHELLCHECK_PIN` regex and takes
`read_pins(...)["shellcheck"]` from the hub's `docker_lint.py`.
`check_composite_actions` loads that script and resolves the image once
per run. It then hands both to `docker_unreachable`, for the pull, and
the image to each body. A pin it cannot read, or a script that will not
load, is one finding before docker is asked anything.
`docker_lint.require_stages` is now the one check that a stage is
pinned, used by `lint`, `--pin` and the gate.
- The `docker-lint-pins` action drops its `sed`. `docker_lint.py` gains
a small `--pin STAGE` mode that prints `STAGE=<image reference>` per
stage. Where the manifest cannot be read, a stage is unpinned, or a
stage is named twice, it prints nothing and exits 1. The action appends
that to its outputs. On a failure, its one `::error::` annotation
carries the script's reason. It calls the script it already locates, so
the locate step now runs first.

Before this, the `sed` accepted an empty tag (`FROM r.io/x:@sha256:...
AS x`), which `read_pins` and the gate refused, and a failure left
partial outputs written. Tests now run the empty-tag and duplicate-stage
cases through all three readers, and the old action fails the new case.

`scripts/README.md`'s `docker_lint.py` section documents `--pin`, and
its repo-gate sentence now names the shellcheck pin as well as the pull.

### Where the action runs, and `python3` there

`docker-lint-pins` has one user in the hub tree, `uses:
$/.github/actions/docker-lint-pins` in `validate-task.yml`'s `lint` job
(`Lint sources job`). A search of every tracked file found no other
workflow, job or step that uses it. That job is `runs-on: ubuntu-latest`
with no `container:`. Its own later steps already run `python3
"$DOCKER_LINT" --pull ...` (the EditorConfig, shell and PowerShell
steps). In run 45877714910 on develop's head `f93f34a6`, `Validate
sources job / Lint sources job` passed both `Read Docker lint pins step`
and `Check EditorConfig step`, the second of which calls `python3`. On
this pull request's head `1530a579`, the new `Read Docker lint pins
step`, which calls `python3 "$DOCKER_LINT" --pin ...`, passed in run
45886897083, along with `Check EditorConfig step` and `Check shell
scripts step`, which read its outputs.

## Test evidence

- `uvx --with-requirements tests/requirements.txt coverage@latest run -m
unittest`: `test_docker_lint` 74 OK, `test_repo_gate` 211 OK,
`test_release_guards` 53 OK.
- The new action-step cases fail against develop's `action.yml`. The
empty tag exits 0 there, and every failing case left partial outputs
written.
- ruff check, ruff format --check and `uvx mypy@latest` are clean. The
pre-commit hook passed.
- `repo_gate.py --check composite-actions` ran live in Docker through
the new pin path and found 0 issues.
- With `GH_HOST=unresolvable.invalid`, `repo_gate.py --check sha-pin`
resolved 8 of 8 same-owner pins. That held from the hub checkout and
from a copy of `repo_gate.py` placed alone. Develop's file reported all
8 as "GitHub did not answer".
- The action-step test is now skipped off POSIX, since it runs the
runner's `python3`, which a Windows host may not have on PATH.

## Local review findings

The first push listed four `introduced` findings that the local review's
budget had left open. Copilot raised the same four on `1530a579`, plus a
fifth on the read-once test. All are fixed in `acebe006` and `25129446`,
and `eb2c231c` corrects the README sentence on a duplicate stage.

- `check_composite_actions` resolved the shellcheck image a second time,
outside any `try`. It now resolves it once and hands it on, and a pin it
cannot read is a finding.
- The read-once test mocked away the first read. `docker_unreachable`
now takes the module and image rather than loading them. The test
asserts one load and that `docker_unreachable` receives that module. It
stubs the action read, so a host without PyYAML still runs it.
- `require_stages` said a stage was not named where a line named it with
a moving or empty tag. It now says the stage is pinned on no `FROM
<image>:<tag>@sha256:<digest> AS <stage>` line.
- `hub_script`'s docstring listed `gh_graphql.py`, which no gate check
loads. That line is restored.

Closes on promotion: #4504

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


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

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Chores**
* Docker image pin checks now use the shared pin manifest and report
clear errors for missing or invalid pins.
* Repository shell checks use the pinned ShellCheck image, with Docker
or pin-loading problems reported as reasons checks cannot run.
* GitHub API reads consistently target GitHub.com, regardless of
inherited host settings.
* **Tests**
* Expanded coverage for pin validation, error reporting, and reuse of
the resolved ShellCheck image.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

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

Two active issues remain: a critical YAML permission-rewrite bug can accept granted permissions, and malformed TOML manifest structures can abort the audit without reporting drift.

2 open issues
1 resolved since last review

Review effort: Lite

Comment thread spec/audit_contract.py Resolved
Comment thread spec/audit_dependabot.py Resolved
@ptr727

ptr727 commented Nov 26, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 31836441485360fd0f1a66fd72956e4c53fbd3e9, the content this pull request carries at that commit against main, and it recorded 53 findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment