Skip to content

fix(dev): route the dev-version bump through a pull request - #1234

Merged
potiuk merged 3 commits into
apache:mainfrom
potiuk:fix/bump-workflow-draft-pr
Sep 15, 2026
Merged

potiuk merged 3 commits into
apache:mainfrom
potiuk:fix/bump-workflow-draft-pr

Conversation

@potiuk

@potiuk potiuk commented Sep 15, 2026

Copy link
Copy Markdown
Member

Summary

  • bump dev version cannot work as merged. feat(dev): add a maintainer-run workflow that moves the dev stamp #1233 landed the version that commits straight to main, and run #1 was refused outright:

    gh: protected branch 'main' check failed:
      3 of 3 required status checks are expected.
    

    main requires three status checks, and a commit arriving through the API carries none — GitHub enforces branch protection there exactly as it does on a push. The workflow on main today fails every time it is run.

  • Routes the bump through a pull request instead, and checks the candidate with the same workflows a PR runs before offering it.

  • Opens that PR as a draft, which is what makes its required checks startable at all.

These are the commits that were already on #1233's branch when it was merged early — the merge took the first commit only.

Type of change

  • Skill change (.claude/skills/<name>/) — eval fixtures updated below
  • Tool / bridge contract (tools/<system>/*.md)
  • Python package (tools/*/ with pyproject.toml)
  • Groovy reference impl
  • Cross-cutting (RFC, AGENTS.md, sandbox, privacy-LLM)
  • Documentation (docs/, README.md, CONTRIBUTING.md)
  • Project template (projects/_template/)
  • CI / dev loop (prek, workflows, validators)
  • Other:

Test plan

  • prek run --all-files passes
  • For Python packages touched: uv run pytest / ruff check / mypy passes
  • For Groovy bridges touched: command-line invocation tested end-to-end
  • For skill changes: eval suite passes for the affected skill
  • For skill behaviour changes: a new or updated eval fixture is included in this PR
  • Other:
    • prek run --files clean over every touched path.
    • zizmor --persona regular clean on all five workflows.
    • The failure this fixes is observed, not predicted — the log is quoted above and now in the workflow header.

⚠️ The workflow still has not completed a successful run, for the same reason as before: workflow_dispatch runs whatever is on main. The next run after this merges is the first test of the PR path.

RFC-AI-0004 compliance

  • HITL — any new mutation is gated on explicit user confirmation
  • Sandbox — no new host access.
  • Vendor neutrality — placeholders used in all skill / tool prose
  • Conversational + correctable — agentic-override path documented if behaviour is adopter-tunable
  • Write-access discipline — the bump now lands through review rather than bypassing it.
  • Privacy LLM — private content does not reach a non-approved LLM

Linked issues

Follow-up to #1233.

Notes for reviewers

  • The checks are reused, not copied. pre-commit.yml, tests.yml, rat.yml and zizmor.yml each gain a workflow_call trigger and an optional ref input, and the bump workflow uses: them against the candidate branch. The input is empty on every other trigger, leaving actions/checkout on its normal behaviour. A copy of their steps would drift; a call cannot.
  • Why the PR is a draft, and the one trigger change to look at. GitHub raises no pull_request events for anything GITHUB_TOKEN does, so a PR opened by a workflow starts no checks and would sit forever on the same "N of N required status checks are expected". Marking a draft ready raises ready_for_review — a real event, because a human does it — so the four check workflows now list that activity type explicitly. It is not in the default opened / synchronize / reopened set. Side effect worth agreeing to: every draft PR in this repo now starts its checks when marked ready.
  • uses: $/... rather than ./... is zizmor's self-repository audit at High confidence with an auto-fix, which I applied rather than suppressed. If you would rather not depend on the newer syntax, the alternative is ./ plus a # zizmor: ignore[self-repository], matching asf-allowlist-check.yml.
  • A failed check deletes the candidate branch, so a bad bump leaves nothing behind rather than a broken PR.

🤖 Generated with Claude Code

…it as a draft

The bump commit never met a gate. A commit created through GitHub's API raises
no events, and a direct push to `main` is not a pull request, so nothing would
have checked what this workflow produces — and a bump is not "only a version
string": it regenerates fourteen manifests and the lockfile, any of which can
come out wrong.

The candidate is now built on its own branch, put through the *same* four check
workflows a pull request runs, and only then offered as a pull request. A failed
check deletes the branch instead of leaving a broken PR behind.

`pre-commit.yml`, `tests.yml`, `rat.yml` and `zizmor.yml` each gain a
`workflow_call` trigger and an optional `ref` input, and the bump workflow
`uses:` them. They are called, not copied, so they cannot drift from what a PR
gets; the input is empty on every other trigger, leaving `actions/checkout` on
its normal behaviour.

The pull request opens as a **draft**, which is what makes it usable. GitHub
raises no `pull_request` events for anything `GITHUB_TOKEN` does, so a ready PR
opened from here would sit forever on "N of N required status checks are
expected", and the checks this workflow ran are attached to its own run rather
than to the PR head. Marking a draft ready raises `ready_for_review`, which is a
real event because a human does it — so the four check workflows now list that
type explicitly (it is not in the default set) and pressing *Ready for review*
starts the required checks against the PR head, exactly as an ordinary PR gets
them.

Reusable-workflow calls use GitHub's `$/` self-repository syntax rather than
`./`, per zizmor's `self-repository` audit.

Generated-by: Claude Opus 5
`CONTRIBUTING.md` listed every CI workflow except the one a human starts by
hand, which is also the only one that writes to the repository — so the job
graph, the signed-commit path and the draft-PR behaviour existed only as
comments inside the YAML.

Adds a *Bumping the dev version* section covering the six jobs, why the checks
are `uses:` of the real workflows rather than copies of their steps, and why
the pull request opens as a draft: GitHub raises no `pull_request` events for
anything `GITHUB_TOKEN` does, so marking the draft ready is what starts the
required checks against the PR head. Notes the side effect that every draft PR
in this repo now behaves that way, and gives the one-liner for reviewing a bump
diff — every changed line should be the version string and nothing else.

Also realigns `docs/setup/marketplace.md` § *How to bump*, which still described
the workflow committing straight to `main`.

Generated-by: Claude Opus 5
Run apache#1 of `bump dev version` failed, and the reason is worth keeping rather
than rediscovering:

    gh: protected branch 'main' check failed:
      3 of 3 required status checks are expected.

`main` requires three status checks, and a commit arriving through the API
carries none — GitHub enforces branch protection there exactly as it does on a
push. The preceding commit already routes the bump through a pull request; this
records the evidence for why, in the workflow header and in CONTRIBUTING, so the
direct-push shape is not proposed again.

Generated-by: Claude Opus 5
@potiuk
potiuk force-pushed the fix/bump-workflow-draft-pr branch from bdd0baf to fc05131 Compare September 15, 2026 16:37
@potiuk
potiuk merged commit 1fd23a7 into apache:main Sep 15, 2026
45 checks passed
@potiuk potiuk added family:ci .github workflows, prek, validators family:docs Docs, MISSION.md, READMEs family:setup setup-* skills labels Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

family:ci .github workflows, prek, validators family:docs Docs, MISSION.md, READMEs family:setup setup-* skills

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant