ci: guard the compatibility epoch against silent same-number merges - #3339
Open
yihanzhu wants to merge 1 commit into
Open
ci: guard the compatibility epoch against silent same-number merges#3339yihanzhu wants to merge 1 commit into
yihanzhu wants to merge 1 commit into
Conversation
Two branches that bump RUNTIME_HOST_COMPATIBILITY_EPOCH write the same text to the same line, so git merges them without a conflict and two incompatible protocols advertise one epoch. Add a merge-base guard that runs on the PR merge result and fails when protocol files changed while the epoch still equals the merge base's, or when the epoch moves backward. This is the interim check from apache#3313; the derive-the-epoch question stays open for the dev list. Refs apache#3313 Generated-by: Claude Code (Fable 5) Co-Authored-By: Claude Fable 5 <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.
Summary
Two branches that bump
RUNTIME_HOST_COMPATIBILITY_EPOCHwrite the same text to the same line, so git's three-way merge resolves them without a conflict and two incompatible protocols end up advertising one epoch (#3313). This adds the interim merge-base guard from that issue: a Node-only CI step that runs on the PR merge result and fails when anything underpackages/runtime-host/src/protocol/changed while the epoch still equals the merge base's, or when the epoch moves backward (a revert must bump forward, not restore the old number).The derive-the-epoch-from-the-contract question stays open — per the issue that decision belongs on the dev list, so this PR refs rather than closes it.
Refs #3313
Review focus
pull_request.base.sha. After a sibling protocol change lands on main with the same epoch text, the silently merged tree still carries the base's epoch, so the second PR goes red on its next run — the case that currently has no guard at all. It still cannot see a sibling branch before one lands, and a stale green check stays green until the PR is updated; both limits are named in the issue.protocol/also demand a bump. Running it over history, it would have flagged refactor(runtime-host): retire client surface identity plumbing #3277 and refactor: retire 'fake' from the live backend surface #3249 (protocol-tolerance changes that did not bump). Notably, the open refactor: drop the unread backend field from Automation templates #3334 trips it for the same reason — I can bump the epoch there if you judge that change epoch-worthy (a new Host emitting templates withoutbackendbreaks older clients whose decoder lists the key as required), or that stays the accepted false-positive class.Verification
node --test scripts/protocol-epoch-check.test.mjs: 7 pass (declaration parsing incl. a live-file pin, and the full verdict matrix)--base a6f33c952^ --head a6f33c952(refactor(runtime-host): retire client surface identity plumbing #3277, protocol changed without bump) fails with the rebase-and-bump message;--base fd9ad4baa^ --head fd9ad4baa(feat(core,runtime,desktop): add Fast mode for OpenAI Responses relays #3309's 27→28) passes; this branch vsorigin/mainpasses with "no protocol changes"format:checkandlintpassAI use
Select exactly one:
Tool(s) and scope: Claude Code (Fable 5) — implementation and tests, under my direction and review. The commit carries a Generated-by trailer.
Checklist
Does this PR entail a change in behavior?
🤖 Generated with Claude Code