refactor(coverage-floor): split seed into post-merge follow-up PR#55
Merged
Conversation
The previous seed-mode design self-committed the seeded value back to the install PR's branch via GITHUB_TOKEN. This worked in isolation but hit a documented GitHub limitation: GITHUB_TOKEN pushes do NOT re-trigger pull_request workflows. The self-commit created a new HEAD SHA with no check runs reported on it — the PR was permanently "blocked" without manual `gh pr close + reopen` and an empty user-attributed push to re-spawn workflows. This caught us on the first real-world install (whois-api-llc/wxa-jake-ai#389), where it took close+reopen + an empty user push to get the seed-commit's SHA past required-status-checks. Doesn't scale to 6+ remaining repos. New design: - Install PR ships `.coverage-floor` with current=0. - On `pull_request` with current=0: PASS, post a comment naming the would-be floor. NO self-commit. - Install PR auto-merges naturally (one HEAD SHA, one set of checks). - After merge, `push:main` with current=0 measures coverage in CI and opens a follow-up PR `chore(coverage): seed floor at X.X%` containing the seeded `.coverage-floor`. - The follow-up PR is 1-file-change, labeled `coverage-floor-seed`, safe-paths-automerge eligible — lands automatically. - After follow-up merges, future PRs run in enforce mode. Properties: - No GITHUB_TOKEN re-trigger problem (each push gets its own workflow run; seed-PR is a normal PR with its own checks) - Two-PR flow (install + seed) keeps each PR minimal and reviewable - Loop-prevention guard preserved: refuse to seed below seed_minimum (default 1.0%) — caught when test infra is broken - Idempotent: skip if a seed PR is already open Self-test on this repo (ci-workflows) unaffected: this repo's .coverage-floor stays at current=99.0 (enforce mode against 100% selftest coverage); the new seed path only fires when current==0. Companion: dotclaude installer (install-coverage-floor.sh) will be updated to no longer expect a self-commit; the install PR is now just the caller workflow + .coverage-floor with current=0. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The multi-line PR body string was breaking the YAML 'run: |' block literal because continuation lines at column 1 terminate the block. Use printf to construct the body with explicit \n escapes — single line in the YAML sense, multi-line in the rendered PR body sense. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Coverage Floor — mode:
|
|
No critical bugs found. Two minor observations below the inline-comment threshold: (1) |
topcoder1
added a commit
that referenced
this pull request
May 13, 2026
…naturally) (#56) ## Problem #55 split the seed self-commit into a post-merge follow-up PR, expecting that to bypass the GITHUB_TOKEN recursion-prevention. **It didn't.** The seed PR is also opened via GITHUB_TOKEN, which has the same problem — pull_request workflows don't spawn on GITHUB_TOKEN-opened PRs. Caught on whois-api-llc/wxa_vpn#361 (seed PR opened cleanly at 80.2%, zero check runs, merge=BLOCKED). Required manual empty-commit unblock, same friction as the original. ## Fix Forward `AUTOMERGE_PAT` (already deployed fleet-wide for `claude-author-automerge.yml`'s same recursion-prevention workaround) into the reusable. Use it to: - Push the seed branch (`git push -u $PUSH_URL $BRANCH` with PAT-embedded URL) - Open the seed PR (`gh pr create` with `GH_TOKEN=$AUTOMERGE_PAT`) PAT-attributed pushes/opens DO spawn pull_request workflows. No manual unblock needed. ## Fallback If caller doesn't forward `AUTOMERGE_PAT`, falls back to `GITHUB_TOKEN` with a clear `::warning::` that manual unblock will be needed. Install remains functional, just less smooth. ## Caller-side change required Each fleet repo's caller workflow must forward the secret: \`\`\`yaml jobs: coverage-floor: uses: topcoder1/ci-workflows/.github/workflows/coverage-floor.yml@main secrets: AUTOMERGE_PAT: \${{ secrets.AUTOMERGE_PAT }} \`\`\` Will update the dotclaude caller template in a companion PR. ## Auto-merge rationale Workflow file change in ci-workflows — risk:blocked, manual click required. ## Plan reference \`~/.claude/plans/dotclaude-2026-05-12-install-test-ratchet.md\` — Phase 3 debug iteration v2. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Problem
The seed-mode design self-committed the seeded value back to the install PR's branch via
GITHUB_TOKEN. This hits a documented GitHub limitation:GITHUB_TOKENpushes do NOT re-trigger pull_request workflows. The self-commit creates a new HEAD SHA with no check runs reported on it — the PR is permanently "blocked" without manualgh pr close + reopenand an empty user-attributed push.Caught on the first real-world install (whois-api-llc/wxa-jake-ai#389) — required close+reopen + an empty user push to unblock. Doesn't scale to 6+ remaining repos.
New design
Two-PR flow:
.coverage-floorwithcurrent=0(seed marker) + caller workflow.pull_requestwithcurrent=0: PASS. Post comment naming proposed floor. No self-commit.push:mainwithcurrent=0measures coverage and opens a follow-up PRchore(coverage): seed floor at X.X%with the seeded.coverage-floor.coverage-floor-seed, safe-paths-automerge eligible — auto-merges.Properties
seed_minimum)coverage-floor-seedPR is already opencoverage-floor-seedlabel on first runSelf-test (this repo)
ci-workflows itself stays in enforce mode —
.coverage-floorhere hascurrent=99.0against ~100% selftest coverage. The new seed path only fires whencurrent==0, so no behavior change on this PR's self-test.Companion changes (next PRs)
install-coverage-floor.sh): docs update — install PR is now passive, expect a follow-up seed PR.Auto-merge rationale
Workflow file change in ci-workflows — risk:blocked, manual click required (same as #50–#54).
🤖 Generated with Claude Code