Repository navigation
[COVAL-7325] Leave hand-reconciled weekly API parity PRs unchanged - #132
Open
callumreid wants to merge 2 commits into
Open
callumreid wants to merge 2 commits into
callumreid wants to merge 2 commits into
Conversation
The weekly parity job rebuilt chore/weekly-api-parity from main and force-pushed whenever the report changed, discarding reconciliation commits pushed onto the rolling PR. Skip the update when the branch has commits not made by the bot and comment on the PR instead, matching the MCP server's parity workflow.
Rolling PRs are squash-merged and the branch is not deleted on merge, so a merged PR leaves non-bot commits that are never ancestors of main. The guard would then skip every later weekly run with no open PR to comment on. Treat the branch as rebuildable once its PR is merged or closed.
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.
Summary
The weekly parity job runs
peter-evans/create-pull-requestonchore/weekly-api-parity. Whenever the refreshed report differs, the action rebuilds the branch frommainand force-pushes, which discards reconciliation commits pushed onto the rolling PR by hand.This ports the guard from the MCP server's identical workflow (coval-ai/mcp-server#55):
git/matching-refs, so a prefix match does not count, then counts the commits incompare/main...chore/weekly-api-paritywhose committer is notgithub-actions[bot].create-pull-request.pull-requests: readto list that PR.One addition beyond the MCP version (second commit)
Rolling PRs are squash-merged, and this repo does not delete head branches on merge. A merged PR therefore leaves
chore/weekly-api-parityholding non-bot commits that never become ancestors ofmain. The branch still points at the head of #131 today. Ported as-is, the guard would report hand commits on every later run. It would skipcreate-pull-requestand find no open PR to comment on, so the job would stop producing parity PRs without any error.The second commit treats hand commits as protective only while a rolling PR is open. Once the PR is merged or closed, the next run rebuilds the branch from
mainas before. A closed PR's commits stay reachable through its PR ref. That commit can be dropped on its own if the MCP behavior is preferred.The header comment and the README "API Coverage Audit" section describe the new behavior.
Validation
actionlint1.7.12 on all workflows: clean.shellcheck -s bashon the extracted guard script: clean.run:script, extracted from the YAML, againstcoval-ai/cliwith a realGITHUB_OUTPUTfile:chore/weekly-api-parity(#131 merged)hand_commits=true, which is the stall described abovehand_commits=falsechore/weekly(prefix of an existing ref)hand_commits=false(exact-ref filter)hand_commits=falsecomparefilter with explicit SHAs. Based3edcba...head89a66a6counts 2 non-bot commits (9c0afca,89a66a6), so the guard would have returnedtrueand left that PR intact. Base...286e1be(the bot's own refresh commit) counts 0.hand_commits=truewith the noticehas 2 commit(s) not made by the bot; leaving it unchanged.🤖 Generated with Claude Code