Skip to content

feat: scripts/fleet_wave.py, the driver for the last fleet PR wave - #64

Merged
fatherlinux merged 2 commits into
mainfrom
feat/fleet-wave
Nov 17, 2026
Merged

fatherlinux merged 2 commits into
mainfrom
feat/fleet-wave

Conversation

@fatherlinux

@fatherlinux fatherlinux commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Adds scripts/fleet_wave.py, which runs convert_repo.py across the org for the last fleet-wide PR wave.

  • Repos: every public, non-archived repo in crunchtools, or the ones a --repos FILE names (for the pilots).
  • Per repo: a shallow clone of the default branch the API names (master included), then convert_repo.py. Exit 2 is recorded as refused with the converter's own reason, and an empty diff as a no-op. Verify means --apply followed by a second run that must be a no-op, the bootstrap committed 100755, and no changed file outside the converter's set.
  • Preflight: skips a repo whose org or repo SDLC_IMAGE the bootstrap would refuse (main, latest, X.Y.Z or @sha256: are allowed, and empty counts as unset), or that has an open chore/python-sdlc PR. That PR would edit the rev: line this conversion deletes.
  • --apply: commits the canonical message with a Co-Authored-By trailer, runs no hooks, and force-pushes chore/sdlc-floating. It then opens the PR with a fixed body covering what changed and how to roll back, or updates the PR already open on that branch, and enables squash auto-merge through GraphQL. It uses REST and GraphQL over http.client. The token comes from the env var --token-env names (default GH_TOKEN) and goes only in a header: never in argv, never printed, and redacted from errors. git pushes with the credentials it already has.
  • Ledger: a TSV of repo, action, pr_url and reason, appended one row per repo. A re-run skips repos already opened, updated or noop (or would-* in a plan). Dry runs and applied runs keep separate ledgers by default.
  • Rate: sequential, with --sleep (default 3s) between repos. Exit codes: 0 means done, 1 means a repo failed or auto-merge wasn't enabled, 2 means the run couldn't start.

Tests: tests/test_fleet_wave.py (51 checks) runs against a fake API and bare repos on disk standing in for GitHub. It covers dry-run read-only behaviour, master branches, refusals, no-ops, earlier-wave PRs, a bad SDLC_IMAGE, the open-vs-update path, auto-merge failure, ledger resume, the verify guards and token handling. It is wired into container.yml's unit-test step.

Dry run, converter at main (c76e864), all 70 repos

There was no GH_TOKEN on the seat, so this run did not check SDLC_IMAGE. --apply requires a token and checks it.

59 would-open · 7 refused · 4 skipped · 0 no-op · 0 failed

Refused (convert by hand, or move jobs out of ci.yml):

repo reason
deploy-mcp-server .github/workflows/ci.yml has jobs the stub does not cover; move them to their own workflow, then convert
draft-mcp-server .github/workflows/ci.yml has jobs the stub does not cover; move them to their own workflow, then convert
find-mcp-server .github/workflows/ci.yml has jobs the stub does not cover; move them to their own workflow, then convert
gatehouse .github/workflows/ci.yml: its sdlc ci step is not the pinned form this script rewrites
grype .github/workflows/ci.yml has jobs the stub does not cover; move them to their own workflow, then convert
hermes .github/workflows/ci.yml has jobs the stub does not cover; move them to their own workflow, then convert
stackrox .pre-commit-config.yaml has neither the python-sdlc pin nor both standalone hooks (gourmand, gatehouse); there is nothing this script knows to replace

Skipped:

repo reason
mcp-feed-reader open pull request from an earlier wave: crunchtools/mcp-feed-reader#75
mcp-trove open pull request from an earlier wave: crunchtools/mcp-trove#128
python-sdlc the converter's own repo, not a consumer
rotv open pull request from an earlier wave: crunchtools/rotv#911
Full plan TSV
repo	action	pr_url	reason
acquacotta	would-open		.github/workflows/gatehouse.yml, .github/workflows/test.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
ashigaru	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
claude-agent	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
constitution	would-open		.github/workflows/ci.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
data-collector	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
deploy-mcp-server	refused		.github/workflows/ci.yml has jobs the stub does not cover; move them to their own workflow, then convert
deployer	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
developer	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .github/workflows/gourmand.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
draft-mcp-server	refused		.github/workflows/ci.yml has jobs the stub does not cover; move them to their own workflow, then convert
expressvpn	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .github/workflows/gourmand.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
fhl.dc2.crunchtools.com	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .github/workflows/gourmand.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
find-mcp-server	refused		.github/workflows/ci.yml has jobs the stub does not cover; move them to their own workflow, then convert
gatehouse	refused		.github/workflows/ci.yml: its `sdlc ci` step is not the pinned form this script rewrites
gha-runner	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .github/workflows/gourmand.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
google-workspace-mcp	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .github/workflows/gourmand.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
gourmand	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .github/workflows/gourmand.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
grype	refused		.github/workflows/ci.yml has jobs the stub does not cover; move them to their own workflow, then convert
hermes	refused		.github/workflows/ci.yml has jobs the stub does not cover; move them to their own workflow, then convert
immich	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .github/workflows/gourmand.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
josui	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .github/workflows/gourmand.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
mcp-atlassian	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
mcp-cloudflare	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
mcp-feed-reader	skipped		open pull request from an earlier wave: https://github.com/crunchtools/mcp-feed-reader/pull/75
mcp-gemini	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
mcp-github	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
mcp-gitlab	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
mcp-google-search-console	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
mcp-mediawiki	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
mcp-metsuke	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
mcp-nagios	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
mcp-notebooklm	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .github/workflows/gourmand.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
mcp-pcloud	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
mcp-podman	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
mcp-request-tracker	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
mcp-rhhi	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
mcp-slack	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
mcp-syslog	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
mcp-systemd	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
mcp-trove	skipped		open pull request from an earlier wave: https://github.com/crunchtools/mcp-trove/pull/128
mcp-wordpress	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
mcp-workboard	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
memory	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .github/workflows/gourmand.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
nagios	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .github/workflows/gourmand.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
nagios-agent	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
newsletter	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
openclaw	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .github/workflows/gourmand.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
packages	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .github/workflows/gourmand.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
pbs	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .github/workflows/gourmand.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
petit	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
petit-captures	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .github/workflows/gourmand.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
postfix	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .github/workflows/gourmand.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
postiz	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .github/workflows/gourmand.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
proxy	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .github/workflows/gourmand.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
python-sdlc	skipped		the converter's own repo, not a consumer
rhel10-bootc-server	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .github/workflows/gourmand.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
rotv	skipped		open pull request from an earlier wave: https://github.com/crunchtools/rotv/pull/911
rt	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .github/workflows/gourmand.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
shiva	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
spanish	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .github/workflows/gourmand.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
stackrox	refused		.pre-commit-config.yaml has neither the python-sdlc pin nor both standalone hooks (gourmand, gatehouse); there is nothing this script knows to replace
syslog	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .github/workflows/gourmand.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
tig	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
trentina	would-open		.github/workflows/gatehouse.yml, .github/workflows/security.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
ubi10-core	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .github/workflows/gourmand.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
ubi10-httpd	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .github/workflows/gourmand.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
ubi10-httpd-perl	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .github/workflows/gourmand.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
ubi10-httpd-perl-mariadb	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .github/workflows/gourmand.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
ubi10-httpd-php	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .github/workflows/gourmand.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
ubi10-httpd-php-mariadb	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .github/workflows/gourmand.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc
ubi10-httpd-php-postgres	would-open		.github/workflows/ci.yml, .github/workflows/gatehouse.yml, .github/workflows/gourmand.yml, .pre-commit-config.yaml, .sdlc/bin/sdlc

🤖 Generated with Claude Code

https://claude.ai/code/session_01R7Y1jg3ZJ6BsAEfhrPWFRh

Runs convert_repo.py across every public, non-archived crunchtools repo
(or a --repos subset). A dry run by default: shallow clone at the default
branch the API names, convert, verify (a second converter run is a
no-op, the bootstrap is committed executable, nothing outside the
converter's files changed), and record the plan in a TSV ledger.
Preflight skips a repo whose SDLC_IMAGE the bootstrap would refuse or
that has an open chore/python-sdlc PR.

--apply pushes chore/sdlc-floating (one per repo, reused), opens or
updates one PR with a fixed body, and queues a squash auto-merge via
the REST and GraphQL APIs. The token comes from the environment
variable --token-env names (GH_TOKEN), goes in a header, and is never
printed or an argument. Sequential; a re-run skips what is done.

tests/test_fleet_wave.py runs against a fake API and bare repos on disk
standing in for GitHub, and is wired into the image's unit-test step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R7Y1jg3ZJ6BsAEfhrPWFRh

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gatehouse found 1 issues (1 high)

Full review.

8 finding(s) dropped: their evidence is not in the diff.

Comment thread scripts/fleet_wave.py
return wave


def run(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH (Documentation): The public run interface has no docstring. This orchestration function accepts several inputs and returns a count mapping, but the required contents and meaning of that mapping are undocumented.

Suggestion: Document the parameters, the ledger and retry behavior, and the action-count mapping returned by the function.

Evidence:

def run(
    wave: Wave, names: list[str], available: dict[str, str], ledger: Path, pause: float
) -> dict:
    done = read_ledger(ledger)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 63eef87

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gatehouse found no issues.

Reviewed 1 commit since c57dc21 (incremental).

@fatherlinux
fatherlinux merged commit f201e20 into main Nov 17, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant