Repository navigation
gate: the Mac's shared instances, inert until listed (ci-kit mac-lane concurrency, M2) - #103
Merged
Merged
Conversation
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. |
… concurrency, M2) The plan sends the groups on gate.yml's new MAC_SHARED_E2E (and unit:darwin, when listed) to [ci-kit-mac-shared], the only label ci-kit's shared runner instances carry; every other Mac job asks for today's [self-hosted, macOS, ARM64], which only the exclusive instance carries. A MEASURED_E2E or foreground group (its script sets MAWS_E2E_FOREGROUND=1) stays exclusive whatever the list says, and the summary names it. The list is empty, so every run places its jobs as before. Timeouts carry the waits of ci-kit's job-started hook: an exclusive Mac job +10 (30 -> 40, measured 45 -> 55; the plan job on the Mac and packaged too), a shared one +60. The plan writes them (`timeouts`, each e2e entry's `timeout`) and unit:darwin's runner (`unit_darwin_runner`). The shared state the audit found (H1, H3, H6, H7): - the e2e build cache is one directory per runner ($RUNNER_NAME); - the clipboard lock is /tmp/maws-e2e-clipboard.lock, not $TMPDIR's; - under CI_KIT_SHARED_DESKTOP=1 a launch's first window goes to a corner of the display its runner's instance number (RUNNER_NAME's -<n>) picks, the mini's two shared instances opposite (e2e/support/window-origin.ts); - the latency budget counts CI_KIT_SHARED_DESKTOP=1 as loaded, and the raw bounds of panel, agent-tools, scm, browser and browser-comment go through it (latencyWait for panel's, whose wait is the bound). Unset, the flag changes nothing: the window stays, the budget's verdicts are today's (its tests unchanged and passing). Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
… for it gate.yml's unit-darwin job now runs where the plan's unit_darwin_runner says (the exclusive instance, or the shared label when MAC_SHARED_E2E names it); the test reads that wiring, and counts either label set as a Mac. Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
…i-kit mac-lane concurrency, M2) ci-kit's job-started hook refuses a job by failing its start, which does not abort it: a later step whose condition holds after a failure still runs, on the last job's workspace, beside the jobs the hook kept it from. ci-kit's contract: such a step of a Mac job is an artifact upload, or waits on a step only an admitted job runs. gate-plan.test.mjs walks every job whose runs-on can resolve to a Mac (the plan's outputs read from plans that put every gate on a Mac, exclusive and shared) and holds each of those steps to it. The e2e, unit, unit:darwin and packaged steps already held. static's four wait steps (typecheck, lint, build and the gate scripts' tests, each reading its check from gate-bg.sh; `!cancelled()`, on a Mac under --class1a macos) did not: its checkout now has `id: checkout` and those four wait on its success. In an admitted job each still runs whatever the check before it did; they no longer run when checkout itself failed, where they would have failed anyway. Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
…mma expression (lint) Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
…f:, success(), || over &&) Review found three steps that would run after ci-kit's hook refused their job's start, yet the walk passed: an `if: >-` read as `>-` (its id counted as admitted too); `!success()`, since success() drops the implicit `success() &&` like any status check; and `failure() || x && steps.checkout.outcome == 'success'`, whose guard holds one alternative only. The walk is now a function over the workflow's text, and fails closed. A condition is the whole `if:` value, a block scalar's lines or a plain one's continuation; any of success(), failure(), always() or cancelled() lets it run after a failed start. Such a step passes only as an upload, or when every top-level || alternative has a top-level && conjunct that guards: an admitted-only step's outcome compared with success or failure, or a parenthesized || of those alone. Parentheses come off only when the opening one closes at the very end, and string literals are skipped. What the walk cannot read fails: an unbalanced or negated guard, a quoted, tagged or interpolated value, a step key that is no plain `key:`, a job it cannot read, and a runs-on other than a literal list or label or fromJSON over a plan output or the matrix runner, which now counts as a Mac (a label set is a Mac's when the exclusive or the shared instances carry every label, case aside). A second test rewrites today's gate.yml in memory, each rewrite matched once: static's typecheck wait with its guard dropped (a bare !cancelled()); its lint wait's `if:` as a folded always(), as !success() and as the || slip; verify:fuses taking a skipped build; e2e's build behind always(); static's checkout behind always(), which leaves all four of its waits unguarded; packaged's runs-on as an expression over a variable. Each such step comes back unsafe, and the Mac jobs stay the seven. Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Oct 21, 2026
…7 (the Mac's shared runner instances wired, inert until listed; the Mac set at the head standing for the merge), the tracker's row for e2e:side case 12's one miss Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Oct 21, 2026
…oks) The one conflict: gate.yml keeps this branch's MEASURED_E2E line with presentations-drag beside master's new MAC_SHARED_E2E. Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Oct 21, 2026
… desk #112) Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
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.
M2 of ci-kit's mac-lane concurrency spec (SSFSKIM/ci-kit
docs/doperpowers/specs/2026-10-21-mac-lane-concurrency-design.md): MAWS's side of running proven-safe Mac jobs two at a time on the mini, on separate runner instances, while every other Mac job keeps running alone. Nothing shares until a later PR puts a group onMAC_SHARED_E2Eon trial evidence (the spec's M4).Routing (gate-plan.mjs, gate.yml).
MAC_SHARED_E2E(empty here) names e2e groups, andunit:darwin, that ask for[ci-kit-mac-shared], the only label ci-kit's shared instances carry. Every other Mac job asks for today's[self-hosted, macOS, ARM64], which only the exclusive instance carries, so an unlisted group, an old commit's run or a rerun never shares.MEASURED_E2Egroup, or a foreground one (its script setsMAWS_E2E_FOREGROUND=1: default, widgets, to-human, document-app), stays exclusive whatever the list says; the run's summary names it. A static test holds the committed list to class-1 Mac groups that are neither.unit_darwin_runner).Timeouts. ci-kit's job-started hook may wait before a job starts, and the wait counts against
timeout-minutes. Exclusive Mac jobs get +10 (30 → 40, measured 45 → 55; class 1a under--class1a macos, unit:darwin, packaged and the plan job on the Mac too). Shared jobs get +60. The plan writes these (timeouts, each e2e entry'stimeout); Linux and pool jobs keep 30.Steps past a refused start. ci-kit's hook refuses a job by failing its start, which does not abort it. A later step whose condition holds after a failure still runs, on the last job's workspace, beside the jobs the hook kept it from. ci-kit's contract is that such a step of a Mac job is an artifact upload, or waits on a step only an admitted job runs.
--class1a macosits lint, build and gate-script tests ran on!cancelled(). They now also wait onsteps.checkout.outcome == 'success'.Shared state (the spec's audit, H1/H3/H6/H7).
~/Library/Caches/maws-e2e-build/$RUNNER_NAME, one directory per runner./tmp/maws-e2e-clipboard.lockinstead of$TMPDIR's, so it holds across instances.CI_KIT_SHARED_DESKTOP=1, a launch's first window moves to a corner of the primary display's work area. The corner comes from the instance number that endsRUNNER_NAME(ci-kit-mac-<machine>-<n>), so the mini's two shared instances sit opposite (e2e/support/window-origin.ts). Main windows the app opens later followwindow.main. Without the flag, nothing moves.CI_KIT_SHARED_DESKTOP=1as loaded. The raw bounds the audit names now go through it: panel's 1 s change line (latencyWait, since the wait is the bound), agent-tools' stop settle, scm's 150 msgit.changed, browser's 200 ms palette, and browser-comment's 200 ms disarm.Unchanged with the list empty and the flag unset.
timeoutsandunit_darwin_runnerkeys and the entries'timeout.One behaviour change: static's lint, build and gate-script tests no longer run when checkout itself failed. They would have failed anyway.
Two deliberate differences in the routed bounds:
≤where the old checks used<.Mac-set proof (scheduled by CI-opt). One full Mac set at the head on the exclusive instance. Check that:
e2e-build: … built and stored in …/maws-e2e-build/<runner name>/…, and the later onesrestored fromthat path;latency bound loosenedannotation appears unless the load read ≥ cores.Not done here.
STILL_SETTLE_MS, not a test bound, so it cannot go through the budget without voiding the case. The M4 trial has to settle it.--maxWorkersis not halved when shared (the audit suggests it).scripts/ci-gate-alerts.mjswill read a shared runnerci-kit-mac-mini-2as a machinemini-2. This needs folding before M3 enables the shared instances.Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)