Repository navigation
ci(sync): open consumer sync prs as drafts [TURNWRK-793] - #46
Merged
Merged
Conversation
Every consumer's ci.yml skips draft PRs and runs on ready_for_review, so bot force-pushes to bot/sync-shared start no consumer CI until a human marks the PR ready. October: 89 bot-branch CI runs, 514 private min, for 5 merged syncs. Refs: TURNWRK-793 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
practical-bot
approved these changes
Nov 1, 2026
practical-bot
left a comment
There was a problem hiding this comment.
Review
I reviewed the current body and the single-file diff against main.
What is right
- The only behavioral change is the new
gh pr create --draftpath in.github/workflows/sync-consumers.yml; the existing update path remainsgit push -fplusgh pr edit, so updates do not force a draft or ready state. The diff is+7/-1, matching the PR body. - The PR body is generated with explicit instructions to mark the sync PR ready before merge, and the implementation does not invoke
gh pr readyor otherwise alter draft state after creation. - I checked each live consumer workflow through the GitHub API.
clean,dispatch,restock, andturnwrk-cortexall includeready_for_reviewin theirpull_requesttypes and gate their pull-request jobs ongithub.event.pull_request.draft == false. This supports the claimed no-CI-while-draft behavior and the one run when a human marks the PR ready. - All three rows from
gh pr checks 46 --repo TurnWrk/sharedpassed on this head:secret scan,typecheck + unit, andfirestore rules behavior tests. Thetypecheck + unitrun executednpm ci, typecheck, unit tests, build, and vendored checks; the rules row executednpm run test:rules. - The exact shell block extracted from the changed workflow passes
bash -n, andgit diff --checkis clean.gh pr create --helpconfirms that--draftis the supported flag.
Claim ledger
- “
gh pr createnow passes--draft”: PASS — exact diff inspection showsgh pr create --repo "${{ matrix.repo }}" --draft;gh pr create --helpreports-d, --draft Mark pull request as a draft. - “Every consumer's CI skips drafts and runs on
ready_for_review”: PASS — API reads of all four consumerci.ymlfiles found the trigger and draft guards listed above. - “The update path ... neither touches draft state”: PASS — the changed workflow contains only
gh pr editfor existing PRs and no draft-state command on that path. - “Net: +7 / −1 (1 file)”: PASS —
git diff --numstat origin/main...HEADprints7 1 .github/workflows/sync-consumers.yml. - “The workflow itself can only run on a push to
main”: PASS — the workflow trigger ispush: branches: [main], plus its declared schedule andworkflow_dispatchtriggers; it has no pull-request trigger. - “yaml ok” and “actionlint ok”: UNVERIFIED — the exact commands were attempted, but this review image has neither
python3noractionlintinstalled. The changed shell block passedbash -n; the PR checks on this head were green. - “
typecheck 0,78test files and820tests passed”: VERIFIED-BY-CI — run41334496914passed the repository'stypecheck + unitjob on headf02d60d568fa18a74932eb9a6e8d71033e0d6bad; I did not rerun the full suite because CI already proved it on this exact head.
NEEDS VERIFICATION: After merge, confirm the first full comparable week in TurnWrk billing shows private hosted minutes at or below approximately 55% of the October baseline, as required by TURNWRK-793's Done-when. The ticket already carries needs:verification.
REVIEW VERDICT: approve
FINDING: No blocking findings; the draft creation path and all four consumer ready-for-review gates are verified -> DROPPED (no defect)
NEEDS VERIFICATION: First full post-merge comparable week of TurnWrk billing is at or below approximately 55% of the October baseline
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.
Why
TurnWrk billed 3,127 private hosted min in October 2026 against ~1,983 free.
sharedis public, so its own minutes are free, butsync-consumers.ymlopened every bot PR non-draft, so each force-push tobot/sync-sharedran full CI in the four private consumers.October, CI runs on
bot/sync-shared(measured from the Actions API, per-job minutes rounded up):89 runs to ship 5 merges.
What changed
gh pr createnow passes--draft(.github/workflows/sync-consumers.yml). Every consumer's CI skips drafts and runs onready_for_review, so a sync PR runs CI once, when a human marks it ready.What deliberately did NOT change
git push -fplusgh pr edit(title and body). Neither touches draft state. A draft stays a draft, and a PR a human marked ready is never pushed back into draft.gh pr ready --undoper PR on another repo, which I left to a human.Proof
Every consumer's CI skips drafts and runs on
ready_for_review. I read each default-branchci.ymlthrough the API:types:includesready_for_reviewdraft == falsetrunk)unit,e2eunit,rules,prod-build,e2e(visualis push-only)unit,e2e(e2e.ymlhas nopull_requesttrigger)unit,quote-evalNo consumer needed a fix.
The private repos accept drafts on this org's plan: dispatch already has 3 draft PRs.
Expected saving: with drafts, CI runs about once per merged sync (on
ready_for_review), so about 5 runs instead of 89. At October's per-run cost that is about 514 − 40 ≈ 470 private min/month, split across the consumers. dispatch is most of it (364 → ~30).Before and after, per trigger (consumer CI runs per sync PR):
Verification
The workflow itself can only run on a push to
main. It was not triggered from this branch.Refs: TURNWRK-793
🤖 Generated with Claude Code