Repository navigation
P5 OX1: the two-build cross-minor check, e2e:cross-build, added by the plan whenever a tree and its peer are a minor apart - #222
Conversation
…p the plan adds whenever the tree and its peer are a minor apart scripts/ci-gate.sh resolves the peer (the merge base with master, or --peer) and writes it with both wires as trailers; gate-plan.mjs adds the PEER_E2E groups to a run whose wires are a minor apart; the e2e job fetches and builds the peer under RUNNER_TEMP (.github/scripts/gate-peer.sh) and stops both builds' supervisors whatever happened. e2e/cross-build.spec.ts runs each build's app against the other's supervisor on one profile, both ways. Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…ckout's does, so its main's first lines are read Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…ed leftover peer replaced, main-only read from the build's own lists, an invalid handler output counted a refusal) Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
… min 22 s, run 40495960740), 15 minutes Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…e2e/cross-build.spec.ts) Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
Codex Review SummaryThis 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6f48118810
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| alert_check='ci-gate: MAWS_GATE_IGNORE_ALERTS=1, the ci-kit alert check skipped' | ||
| else | ||
| alert_check=$(node "$(dirname "$0")/ci-gate-alerts.mjs" --gates "$gates_trailer" --runner "$runner" --class1a "$class1a" --lane "$lane" --live "$live" --git-dir "$git_dir" --sha "$sha") | ||
| alert_check=$(node "$(dirname "$0")/ci-gate-alerts.mjs" --gates "$gates_trailer" --runner "$runner" --class1a "$class1a" --lane "$lane" --live "$live" --trailers "$peer_trailers" --git-dir "$git_dir" --sha "$sha") |
There was a problem hiding this comment.
Pass the affected selection to the alert planner
For an --affected --gates static,unit,probes --class1a pool run whose tree and peer differ in wire minor, this forwards the peer trailers but omits Selection: affected. The alert planner consequently adds e2e:cross-build and requires a healthy Mac, whereas the actual pushed run excludes that group because gate-plan.mjs checks the selection trailer. If the Macs have open alerts, this incorrectly refuses a run that only needs Linux/pool jobs. Forward the affected selection to the alert check so its placement matches the eventual run.
Useful? React with 👍 / 👎.
… the alert check sees an iteration's Selection; a checkout that cannot find its merge base is refused; the peer groups join only a run with unit or an e2e group) Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…; gate-offload Decision Log 126, P5 Decision Log 58; OX1's tracker row closed, three rows added Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
The two-build cross-minor check that O1 deferred (O1's execution document M6 and residue 11; the tech-debt row "P5 OX1 … No real two-build check exists"; O6's residue 38), as a standing Mac e2e group,
e2e:cross-build. The gate builds the second commit itself and adds the group to any run that tests code (unit, unit:darwin or an e2e group) whose tree and peer are a minor apart, so p5-o6's bump, O2's, and every later one is checked without anyone asking for it.How a bump is detected
scripts/ci-gate.shresolves the peer where the history is, in the newscripts/ci-gate-peer.mjs. The peer is--peer <ref>if given, otherwise the merge base withorigin/master, fetched first.--peer nonewrites nothing.src/shared/ipc/wire-manifest.json(major.minor).wire.test.tsholds that manifest equal toWIRE_MAJORandWIRE_MINOR.Peer: <sha>,Peer-Wire: <m.n>andWire: <m.n>. A rerun therefore keeps the same peer.--peer <ref>and--peer none, in two cases: an asked-for--peerthat names no commit or has no manifest, and a checkout that cannot find its merge base (shallow, or with none againstorigin/master, such as a single-branch clone). Otherwise such a checkout would silently drop the check.gate-plan.mjsadds everyPEER_E2Egroup (gate.yml:cross-build) when the two wires share a major and differ in minor. It joins only a run whose gates includeunit,unit:darwinor an e2e group, so class 1a and the default set get it, while a static, probes or static+probes check stays quick. Even then it skips live runs, which take their live groups alone, andSelection: affectedruns, which are never landing evidence. A dispatch has no trailers.peersha. It always runs on the Mac's exclusive instance ([self-hosted, macOS, ARM64]), even on a Linux lane. It is never hosted: notHosted gives the reasonpeer,Lane: hostednames it, andHOSTED_MAC_E2Enaming it is refused. It never runs on the shared instances or in the guest.ci-gate-alerts.mjstakes the peer's trailers too (--trailers), plusSelection: affectedunder--affected. Its pre-push plan therefore adds the peer's Mac job exactly where the real plan does.ci-gate-refusals.sh) carries the peer as resolved,--peer <sha>or--peer none, so the relaunch checks the same pair.What the job does
.github/scripts/gate-peer.shdoes two things:preparefetches that one commit (git fetch --depth=1 origin <sha>) and checks it out as a worktree at$RUNNER_TEMP/maws-peer. It first removes any leftover there, registered or not. It then runspnpm install --frozen-lockfile --prefer-offlineagainst the runner's store and builds the peer with its ownscripts/e2e-build.sh plain, never from the build cache. On the mini this takes 47 s.stopis analways()step for any peer-group job that checked out, including one whose prepare was cancelled. It kills everymaws-supervisorwhose bundle is under either checkout, with its process group (its engines), and every app run from either checkout. Then it removes the worktree.What each scene asserts (
e2e/cross-build.spec.ts)The older build is the one with the lower minor. Before the scenes, the two manifests must differ only additively by
classifyWireChange.There are two scenes on one profile:
In each scene:
client connected: appPid <attaching app> build <its build> wire 3.<its minor>. The attaching main hasconnected to supervisor pid <kept> build <keeper's build> wire 3.<keeper's minor>.host.statusreadsmatches: 'build', the kept pid, one live session, exit-when-idle armed, and the update banner shows.session.events. The failure's Needs-you item appears, which only main's live derivation of the tail raises. The request raised while away is pending.exiting (exitWhenIdle)). The app connects to a supervisor of its own build:matches: 'same', the lock names it, its welcome is at the app's own minor and the banner is gone. It then serves a launch.mainOnlyCommandslists name are skipped. Anengine-hostcommand must answerunknown_commandfrom the older supervisor and something else from its own. A command of another owner (machine, served by main) must answer alike on either supervisor.The launch passes this checkout's LaunchSpec through the receiving build's own
session.launchschema, so a later LaunchSpec field does not turn the downgrade red.Proof
All runs used the merge base
5b7705914(wire 3.0) as the peer.On the head
162aeb958, after CI-opt's and the architect's four changes (relaunch peer, alert Selection, refusal without a merge base, join rule):c026ff5a3(p5-o6's M1e546d9752merged onto the head, wire 3.1). The plan still addede2e:cross-buildunder the new join rule, and both scenes passed.machine.identityansweredokon either supervisor, and neither end dropped anything.--gates staticon the same bump merge. Only plan and static ran, and the plan's summary says: "Peer: 5b77059, wire 3.0; this tree's 3.1, a minor apart, but the peer groups join only a run with unit or an e2e group."Before those changes:
f526ac529(wire 3.1, one additive engine-host commandhost.wireProbe, never lands),--gates e2e:cross-build --runner macos. Both scenes passed.host.wireProbeansweredunknown_commandfrom the older supervisor andokfrom its own.e546d9752(wire 3.1,machine.identity) merged onto this branch as7af4aad8c, run as--gates static,unit,probes --class1a pool. The plan addede2e:cross-buildby itself. Results: static, probes, unit 1/4 to 4/4 and e2e:cross-build all green. In the update scene,machine.identityansweredokon either supervisor. Neither end dropped anything.6f4811881, class 1a (--gates static,unit,probes --class1a pool). Results: static, probes and unit 1/4 to 4/4 green, no preemption. The tree's wire is master's 3.0, so the plan added no group.e2e:supervisoron27273ed2c, for the move of its Scratch helpers intoe2e/support/supervisor-scratch.ts. That tree differs from the head only in one pin in a gate test. It ran on a hosted Mac (maws-app run 40498169733), and all 10 scenes passed.Earlier runs while iterating:
51f5ded20.6f4811881.The gate scripts' tests passed 244/244 locally at that point. A doperpowers:reviewer-medium review found four P2s:
All four are fixed in
6d491437d, and the reviewer re-checked the fixes as correct.On OX1's negotiation
No cross-minor bug showed at 3.0 and 3.1, in either direction, for an engine-host command (the scratch) or a
machinecommand (O6). Three observations for the architect:HostSupervisor.peer(owner)is main's alone, andhost.statusgivesmatchesbut no minor or capabilities. While an older supervisor serves the update window (sessions started meanwhile run on it too), a newer window that calls a newer engine-host command getsunknown_command. OX1 makes that the contract, but the renderer can only react to it, not avoid it. A feature that adds an engine-host command used from a window should handle that answer, orhost.statusshould carry the peer's minor.unknown_commandand the same message text as an older supervisor that lacks the command. A caller cannot tell the two apart. The spec reads the build's main-only lists from source for that reason.f6b8c86d2(its M2), static (preload-bridge and tab types) and unit (renderer Composer tests) fail with or without this branch. The real-gap proof therefore uses its M1 head.Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)