Repository navigation
gate: mini copies, a mini run of each run's own e2e groups whose specs the diff touches - #646
Merged
Merged
Conversation
…he run hosts them The architect's ruling: a landing that adds or edits an e2e spec, or anything under e2e/support, runs the groups reaching it once on the Mac mini too, because scenes went green on GitHub's hosted Macs and red on the mini. Sessions picked those groups by hand; the gate now does it. ci-gate.sh reuses the spec-import graph (ci-gate-e2e-coverage.mjs --mini-copy): each e2e group the call asks for (for `all`, the tested commit's CLASS1_E2E) whose specs reach a changed path under e2e/ gets a `MiniCopy: <group> <paths>` trailer, computed before the alert check, the label and the pool hint, whose plans the copies change. --no-mini-copy <reason> writes `MiniCopy: none (<reason>)` instead, for a head whose copies already stand on an earlier one (a re-merge of master). gate-plan.mjs runs a copy only where the original is off the mini (hosted, or on EC2): in the guest for a guest-eligible group, else pinned to the exclusive host; none for a LAUNCHD_E2E group outside the guest, a group already on the mini, or one never on a Mac. Host copies join e2e_host as `e2e:<group> (mini copy)`. Guest copies share jobs, since each guest job boots a VM of its own: e2e-copy runs up to three groups one after another, each in a slot with its own bound, continue-on-error and upload under `<slug>-mini`, and a verdict that fails the job and names each group. A job stays within 90 minutes (ci-kit's 100-minute VM job bound less its 10): the uplink margin once, then 15 minutes a group (the slowest hosted-eligible guest groups' test steps took 7 minutes hosted, 5 in the guest), or its E2E_MINUTES. The summary names each copy, its runner and paths, each candidate kept off and why, or the opt-out's reason; a Lane: vm run now also names the groups it leaves off the mini. Refused or red copies relaunch as their plain groups on the mini alone (--lane vm or no-hosted), under a label of their own. Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
no-unused-vars on the copies' paths dropped by destructuring, and no-useless-assignment on the CLI's output, which both branches assign. Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
Host copies take the mini's home label, [self-hosted, macOS, ARM64, ci-kit-mac-home]: today's three labels alone match the EC2 Mac too, where a copy would pass without touching the mini, and the alert check would accept it. LAUNCHD_E2E groups still get none. No ci-gate flag reaches that label (--lane no-hosted leaves an unlisted group on the three), so a refused or red host copy now joins the main relaunch under the run's lane, whose plan hosts the original and copies it home again. A guest slot's command runs in a process group of its own. Actions' step timeout ends the step's shell alone, so a group cut at its bound went on running (pnpm, Playwright, Electron) beside the next slot, sharing its reports and out/. Each later slot and the verdict stop what a slot left (TERM, then KILL), sweep the LaunchAgents under LAUNCHD, and the verdict line says the slot was cut and whether its processes had to be stopped. A guest copy whose own bound passes a guest job's 90 minutes (35 + its E2E_MINUTES) no longer opens a job over ci-kit's VM bound: it takes the home host, or no copy when it is LAUNCHD_E2E, the reason in the summary. The alert refusal's push-anyway line shell-quotes the call's arguments, so a --no-mini-copy reason with spaces or a leading # survives a paste. Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
… that is confirmed The re-review's three gaps in reaping a slot cut at its bound. A private host or supervisor spawns detached, in a session and group of its own (detached-transport.ts), and the worker's exit hook that ends it does not run after a SIGKILL, so killing the slot's group left it running. No existing sweep runs from the shell (processes.ts's needs the profile), so a cut slot's reap also stops each process working in the checkout or naming it or an e2e scratch root in its argv, but the script's own ancestry. The record holds the group leader's pid and start time; a live leader of another start is a reused pid and is never signalled. KILL follows TERM only while the group is still there, and is confirmed within 5 s: what outlives it fails the reap, so the next slot does not start and the verdict is red, and its record stays for every later reap. Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Nov 14, 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.
The architect's R1: a landing that adds or edits an e2e spec, or anything under e2e/support, runs each group that reaches it once on the mini. Two scenes had gone green on hosted Macs and red on the mini (#639). Until now the wave picked those groups by hand; the gate now does it itself.
Selection:
scripts/ci-gate.sh.ci-gate-e2e-coverage.mjs --mini-copyreuses the coverage import graph (discoverGroups,importGraph). A candidate is one of the run's own requested groups whose specs reach a path the merge-base diff changes undere2e/. For--gates all, it is the tested commit's CLASS1_E2E. Each candidate becomes one trailer line,MiniCopy: <group> <path>, … (+n more), cut at 508 bytes.--no-mini-copy <reason>writesMiniCopy: none (<reason>)instead, for a run whose copy already stands on an earlier head.Placement:
.github/scripts/gate-plan.mjs. The plan reads the trailer on pushes only. A group gets a copy only when its original runs off the mini (on a hosted Mac or EC2):e2e-copyjobs, namede2e: mini copy (<groups>). A job holds 3 slots and stays within 90 minutes, under ci-kit's 100-minute VM lane bound. Each slot is bounded at 15 minutes, or the group's own E2E_MINUTES.[ci-kit-mac-home], ase2e:<group> (mini copy). That label is never EC2's. A guest copy too long for a guest job goes there as well.The summary names each copy, its runner, and the changed paths that pulled it in. It also gives the opt-out reason, and, under
Lane: vm/vm-trial, each group it leaves off the mini and where it went.The shared guest job:
.github/scripts/gate-copy.sh. Each slot has its owntimeout-minutes,continue-on-error, and artifacts namede2e-<slug>-mini. Each out/ variant is downloaded once.Consumers.
vmand a host copy ashome.--lane vmline. A host copy joins the main line, whose plan copies it again.Review. reviewer-medium found four P2s (host copies could reach EC2, a cut slot could overlap the next, an oversized guest job, the quoting). A re-review of those fixes found three more in the reaping (detached descendants, pgid ownership, confirming the KILL). All are fixed and tested.
Evidence.
--gates e2e:to-human,e2e:c12: 43526195746 at 3aeb505, and 43540931777 at 2c512b9. In both, the originals ran on hosted Macs, ande2e: mini copy (to-human, c12)ran both groups in one VM, green; each slot restored its own variant.e2e:lane-a (mini copy)onci-kit-mac-home(17 passed).node --test: gate-plan 124/124, gate-copy 5/5, refusals 23/23, alerts 37/37, pool-demand 20/20, identity 9/9, peer-held 23/23, ci-gate 37/37.Limits.
COPY_STEP_MINUTESif a group outgrows it.Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)