Add a reusable cross-SDK parity check - #3
Open
brionmario wants to merge 1 commit into
Open
brionmario wants to merge 1 commit into
brionmario wants to merge 1 commit into
Conversation
A ThunderID capability has to exist in javascript-sdks, ios-sdks, android-sdks and flutter-sdks before a developer can rely on it, but nothing at review time asked whether a change landing in one of them needed to land in the others. The SDK development specification now states that the decision has to be made on every pull request; this is the check that enforces it. The gate is a label, and a label is the only thing that clears it. There is no path based exemption: "it only touched docs" is a judgement a person makes, not one a file path can be trusted to make for them. Alongside the gate the check keeps a single comment carrying a checklist of the sibling repositories, and ticks the boxes itself as port links appear in the pull request body or in replies on the thread, so nobody maintains that list by hand and a contributor who cannot edit the comment is not asked to. It lives here rather than four times over so the repositories cannot drift, and it derives the sibling list from the repository it runs in, so the caller in each SDK repository passes nothing and owns only the triggers. Signed-off-by: Brion <info@brionmario.com>
This was referenced Sep 15, 2026
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.
Purpose
A ThunderID capability has to exist in
javascript-sdks,ios-sdks,android-sdksandflutter-sdksbefore a developer can rely on it, but nothing at review time asked whether a change landing in one of them needed to land in the others. Since the SDKs moved into separate repositories, a reviewer of a change in one has no visibility into whether the equivalent work in the siblings exists, is planned, or was consciously skipped.The SDK development specification states that the parity decision is made on every pull request. This is the check that enforces it, the second half of the proposal in thunder-id/thunderid#5354.
It lives here rather than four times over, so the SDK repositories cannot drift. Each of them gets a thin caller that owns only the triggers, which a reusable workflow cannot declare for its caller.
Approach
A label is the gate, and the only thing that clears it. Every pull request must carry exactly one of
parity/prs-raisedorparity/prs-not-needed. There is no path based exemption: "it only touched docs" is a judgement a person makes, not one a file path can be trusted to make for them. Applying a label re-runs the check, so it goes green without a push.The checklist maintains itself. Alongside the gate the check keeps a single comment listing the sibling repositories, and ticks the boxes as port links appear in the pull request body or in replies on the thread. Both link styles are recognised, and a linked issue counts as well as a pull request, since a recorded deferral is a recorded deferral. Contributors cannot edit that comment, external ones especially, so nobody is asked to maintain it by hand.
No input to keep in sync. The sibling list is derived from the repository the check runs in, matched on repository name so it still excludes itself when it runs in a fork. A
siblingsinput exists for overrides but the callers pass nothing.pull_request_target, notpull_request, because the check has to comment on pull requests opened from forks, where thepull_requesttoken is read only. Nothing from the contributor's branch is checked out or executed, so the elevated token is never handed to untrusted code.Comment events never fail the run. An
issue_commentrun is not part of the pull request's check suite, so failing it there would surface a red run detached from the pull request. Replies refresh the checklist; the gate is enforced on pull request events.Testing
The workflow script was exercised against a stubbed
github-scriptenvironment, 17 cases covering each label state, the both-labels conflict, link parsing in the body and in replies, the self-comment loop guard, comment upsert and the no-op path, look-alike repository names, and the sibling exclusion rule including the fork case.It was then dry run end to end on a throwaway pull request in a fork, which turned up two things now fixed:
owner/repo, so in a fork the check listed its own upstream as a sibling. It now matches on repository name.issue_commentrun shared its concurrency group. The callers now include the event name in the group.The dry run confirmed the rest: the check blocked the pull request red with the checklist comment, went green the moment the label was applied without a push, and updated its comment in place rather than posting again.
Related Issues
Related PRs
Notes for merging
@mainhere and cannot resolve until it does.🔀 Cross-SDK Parity / 🏷️ Parity Decision. Renaming either job later breaks the protection rule.