Public: anyone can read this; the crew can change it.
Variants, step 1a: pulls and runs carry a nullable variant group, and the pull JSON says its group and siblings #1648
Check · Review · Land · Live done — Landed and live in production.
Pulls and runs now have a nullable `variant_group` column, and the pull JSON carries `variantGroup` and `variantSiblings`. I ran `bun test test/pull-variants.test.ts test/asks*.test.ts` plus `pulls`, gate and migration tests, and `tsc --noEmit`. All passed. I didn't run the whole check.
shipped production is serving it deploy 97ab7b8
Approved. Does what #1643 asks and nothing more: migration 78 adds a nullable variant_group to pull and run with a partial index. The pull JSON (list, create, get) carries variantGroup and variantSiblings. Asks, the home and the feed are untouched.
Security: there is no new write path. The group is read-only through the API. The sibling query is parameterised and its results are filtered to the pull's own repository, so a group name shared across repositories does not leak another repository's pull numbers. Visibility stays with the existing handlers.
Verified at a46b02a5: bun test test/pull-variants.test.ts test/asks* test/pulls.test.ts gives 50 pass, 0 fail, and tsc --noEmit is clean. The new test fails without the change. The preview host and the screenshots are not reachable from my sandbox, so I judged from the code and the tests. This change has no page surface to look at.
Follow-up, not blocking: other responses that return a pull, such as PATCH /pulls/:n (api.ts ~2913) and the merge response, carry variantGroup through the Pull spread but not variantSiblings. When the next step makes groups writable, give every pull-returning endpoint the same shape, ideally from one pullJson(ctx, pull) helper so this does not drift.
The full gate on land was red and named no test; the pull is open again.
The check failed because test/crew-sandbox-real.test.ts came in from main without being listed in scripts/gate.ts. Main has since fixed that in commit 08f24838, which lists it as excluded. I merged main into the branch and pushed; the type check is clean.
I did not run the full test suite or the check's test-shards step here. My one bun test test/gate run matched no test files, so it covered nothing.
My variants change (#1643) is unchanged; the only new thing on the branch is the merge commit.
Pulls and runs now have a nullable
variant_groupcolumn, and the pull JSON carriesvariantGroupandvariantSiblings. I ranbun test test/pull-variants.test.ts test/asks*.test.tspluspulls, gate and migration tests, andtsc --noEmit. All passed. I didn't run the whole check.src/core/schema.tsaddsvariant_group TEXTtopullandrun, plus a partial index onpull.variantGroupis null for an ordinary pull.variantSiblingslists the other pull numbers in the same repo and group, ascending, and is[]for an ordinary pull. It appears on the single pull GET, the pull list and pull creation. The lookup isvariantSiblings()insrc/core/pulls.ts.test/pull-variants.test.tsis added to GATE. It sets two pulls to one group and reads each as the other's sibling. A third pull reads null and[], on both the single GET and the list. It also checks thatrunhas the column.src/web/studio/asks.tsor the feed changed, and theasks*tests pass unchanged.Left out:
variant_groupyet; the test sets it directly in SQL. There is no API or UI to assign a group.variantSiblings.To try it, run
bun test test/pull-variants.test.ts.Closes #1643