feat: bulk-install-standards-check.sh and the canonical caller stub (W2) - #164
Merged
twistedmelonman merged 3 commits intoSep 8, 2026
Merged
Conversation
Classifies every fleet repo and installs standards/caller-stub.yml where absent, via PR (pilots) or direct put to the default branch (fleet, per the 2026-09-08 authorization). Hermetic stub-gh tests. Claude-Session: https://claude.ai/code/session_019HDRKLQNv82SEBd4zGpcXf
This comment has been minimized.
This comment has been minimized.
Two defects in bulk-install-standards-check.sh, both observed failing first. existing_b64 discarded stderr and treated every nonzero `gh api` exit as "the file is absent". A 403, a rate limit, or a network blip therefore read as MISSING, and under --apply --mode=push the script would PUT the stub onto the default branch of a repo whose real state it never learned. It now returns 0/1/2 for content / confirmed HTTP 404 / any other failure, and the caller reports ERROR with the message and exits 1. install_pr assumed chore/standards-check-stub did not exist, so any retry after a partial run died on a duplicate git/refs POST. It now reuses an existing ref and passes the file's blob sha to the PUT when the file is already on the branch. The branch-scoped read puts the ref in the query string: `gh api` promotes any -f parameter to POST, which would have turned that read into a failing write. Also guard every step of install_push/install_pr with `|| return 1`. They run inside a command substitution in an `if`, which suspends `set -e`, so an empty default branch or a failed ref POST previously fell through to the PUT and the PR. The stub gh now reproduces real `gh api` failure output (JSON body on stdout, "gh: <reason> (HTTP <code>)" on stderr, exit 1), measured against a live 404 rather than assumed. Claude-Session: https://claude.ai/code/session_019HDRKLQNv82SEBd4zGpcXf
This comment has been minimized.
This comment has been minimized.
The `|| return 1` guards on install_push/install_pr had no test: the stub's default-branch arm could not fail, so the "install step failed -> ERROR" path was never exercised in either mode. Adds a fail-repo fixture that makes the default-branch GET return 403 and asserts the repo reports ERROR, no PUT is sent, no PR is opened, and the run exits 1. Observed failing first by removing the guards: without them the lookup's error text became the branch name and a PUT went out against it. Claude-Session: https://claude.ai/code/session_019HDRKLQNv82SEBd4zGpcXf
This comment has been minimized.
This comment has been minimized.
twistedmelonman
deleted the
claude/feat-bulk-install-standards-check-019HDRKL
branch
September 8, 2026 23:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Task 1 of the W2 fleet rollout plan (
dev-envdocs/superpowers/plans/2026-09-08-w2-fleet-rollout.md).Adds the canonical caller stub and the bulk-install classifier. Nothing is applied to any repo by this PR; the script's default mode is a dry run.
What lands
standards/caller-stub.yml— the single canonical copy of the caller. Byte-matches the README Setup block and the header comment in.github/workflows/standards-check.yml(both already agreed; verified by diff).bulk-install-standards-check.sh— classifies every repo of--ownersplus--extra-reposasMISSING/CURRENT/DIFFERS/IGNORED/ARCHIVED/ERROR. With--apply, writes the stub intoMISSINGrepos only, either through a branch and PR (--mode=pr) or a Contents-API put to the default branch (--mode=push, the mechanism authorized 2026-09-08 for this one file).DIFFERSrepos are reported and never touched..standards-check-ignore— seeded withnightowlstudiollc/networth-agent.tests/stub-gh/ghandtests/test-bulk-install-standards-check.sh— hermetic stub-ghtests, 16 assertions, picked up by the existingtests/run-tests.shglob.Verification
tests/run-tests.sh: 0 test file(s) failed (16/16 new assertions, plus the pre-existing 9 and 11).CURRENT/DIFFERScomparison was validated against a known-bad case: reintroducing the trailing-newline asymmetry makesbeta is CURRENTfail, so the assertion is load-bearing rather than vacuous.shellcheck -S infoclean on all three new shell files, no disable directives.standards/run-standards.sh --repo .exits 0.MISSING, 1DIFFERS, 1IGNORED, 3ARCHIVED, 0ERROR.smartwatermelon/github-workflowsclassifies asDIFFERSby design: its.github/workflows/standards-check.ymlis the reusable workflow itself, not a caller stub. The self-applying caller lives inself-standards-check.ymland uses a local path. That file is deliberately unchanged.https://claude.ai/code/session_019HDRKLQNv82SEBd4zGpcXf