Enforce cross-SDK feature parity with an SDK development spec and a PR check #5354
Replies: 1 comment
Update (Phase 01)The SDK development spec from this proposal is in, and the four SDK repositories now point at it. #5367 adds, under
The draft that existed before was not ported as is. Every claim in it was checked against the four SDK repositories as they stand today and the parts that no longer held were rewritten: the repository topology after the split, the explicit The same
On parity specifically, the spec now states the delivery rule: a capability is delivered once it exists in every SDK where it applies, or its absence is recorded with a reason; a pull request changing an SDK's public surface either links the sibling pull requests or says why they are not needed; "no time" is a deferral recorded as a tracked issue, not a reason; dependency, CI, docs, test and refactor changes are exempt; and existing divergences go through the normal backlog rather than being reconciled retroactively. Tracking issue: #5305. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Problem
A ThunderID feature is almost never a single SDK change. The same capability has to exist in
javascript-sdks,ios-sdks,android-sdksandflutter-sdksbefore a developer can rely on it,but nothing in the current process forces that to happen.
In practice features land first in the SDK that is under active use (usually React in
javascript-sdks), and the sibling SDKs fall behind silently. There is no artifact that says whatan SDK must implement, and no signal at PR time asking "does this need to ship in the other SDKs
too?". Parity gaps are discovered reactively, by a developer hitting a missing capability on
Mobile, long after the feature shipped on web.
Now that the SDKs live in separate repositories, a reviewer of a
javascript-sdksPR has novisibility into whether the equivalent iOS, Android and Flutter work exists, is planned, or was
consciously skipped. Tracking this by convention alone has not worked.
Related to spec driven development proposal in #3292.
Corresponding feature:
Proposal
Two parts: write the contract down, then enforce it with a check.
1. An SDK development spec in
docs-internalsFollowing the design workflow introduced in
docs-internals, add:The spec defines what every ThunderID SDK must honour and what "done" means for an SDK change:
lifecycle, error taxonomy, naming conventions, and the platform specific deviations that are
allowed.
equivalent PR exists in every SDK repo where the capability applies, or the omission is
recorded with a reason.
Mobile, or a platform that has no equivalent primitive yet.
are visible without reading four changelogs.
Since specs now live in
docs-internals, the SDK spec is reviewed as its own pull request in theproduct repo before the implementation work starts, and updates to it follow the same path.
2. A static check that enforces cross SDK PRs
Add a required check to every SDK repo, ideally as one reusable workflow in
thunder-id/.githubcalled by
javascript-sdks,ios-sdks,android-sdksandflutter-sdks.How it behaves on a PR that touches SDK source:
The check reads a dedicated section of the PR body, for example:
If the section contains at least one linked SDK PR, or a written reason why the other SDKs do
not need one, the check passes and applies a single label:
sdk-parity-reviewed.If neither is present, the check fails and the bot posts a comment naming the sibling repos,
linking the spec, and explaining that the author must either link the corresponding PRs or
state why they are not needed.
The check re-runs on
editedand on label changes, so the author clears it by editing the PRbody rather than pushing an empty commit.
One label keeps this legible.
sdk-parity-reviewedmeans "somebody has answered the parityquestion on this PR", nothing more, and its absence on a merged PR is the thing worth auditing.
A maintainer applying it by hand is also the escape hatch when the heuristics get a PR wrong.
Beyond that, skip the check entirely for PRs labelled
chore,ci,docsordependencies.Benefits
searchable reason why not.
someone remembered.
Adopt Spec-Driven Development for ThunderID #3292 is aiming for.
sdk-parity-reviewedis an easyquery and becomes the backlog for the next parity pass.
Open questions
per capability?
it required?
not get flagged?
keep that manual?
All reactions