Repository navigation
ci: fold six CI jobs into four with parallel and background steps; cancel superseded and closed-PR runs - #3658
Conversation
Size Report
Startup median (7 runs, lower is better):
|
…k with parallel steps A cold fallow run re-resolves every import against the root tsconfig's 28 project references (~760 statx per import), which takes minutes on a hosted runner; the persisted parse cache skips unchanged files. Main pushes save the cache, every run restores it. Parallel steps let the CI workflow drop from six jobs to four without lengthening any lane: freerange runs in the background beside the other guards, and lint/format/DI-seams run beside typecheck. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The temporary probe workflow is still in this PR, so it cannot merge as is. At 365a0f5, .github/workflows/fallow-probe.yml ends every fallow step in |
The persisted cache only helps an identical tree: a PR head restored from its base still re-resolves every import (524s audit, 209s health on CI). Starting the audit beside freerange and the light guards takes it off the job's sequential path instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The earlier findings from 365a0f5 no longer apply at c7404c5, but there is no CI result for this head yet, so I cannot call it ready. All the checks are still queued, and none has failed. The diff rewrites ci.yml, so Lint, Typecheck & Package, Repo Guards & Compatibility, Coverage and Integration Tests are the real test of this change. I have not found a code problem in the diff. What is missing is a green run of Lint, Typecheck & Package and of Repo Guards & Compatibility on c7404c5. It also needs one run that shows a failing background gate turns Repo Guards red at its Not blocking, and you can take or leave these: the PR body still says "WIP" and mentions the deleted probe job and the dropped caching step, and it has no before/after job times to back "make fallow fast". The nested-vitest tmpdir-leaks-model step at ci.yml:205 now runs beside fallow and freerange on the same runner, so please watch a few runs for flakes and wait on fallow before that step if any appear. Once Repo Guards and Lint, Typecheck & Package are green on c7404c5 and the background-failure check is shown, this is ready for another look. |
|
Addressed:
|
…in the remaining PR workflows
|
This follow-up covers 249e6ed. The earlier review (#3658 (comment)) was at c7404c5. The probe job is gone and the job layout is simpler: one background gate instead of two. I found nothing wrong in the diff. The change is not ready to merge yet because the CI evidence is missing. All 10 non-skipped checks for 249e6ed are queued and none has failed, so I have no timings or results for the new layout. Please show a run where a failing background fallow audit turns Repo Guards red at the "wait: fallow-audit" step and the job concludes failure. A throwaway commit that adds a deliberate violation, then gets reverted, would prove it, and the same run should show a failing foreground step cancelling the background step. Also please show a green Repo Guards run at 249e6ed with step timings, so we can see the job still fits the 20 minute timeout now that freerange runs after the guards. No conflicts are known. Once that evidence is in, the next step is to merge. Not blocking, and you can take or leave these: if the freerange move pushes the job past about 15 minutes, move it back before the guards or raise the timeout, and the PR body still says "WIP" and mentions a probe job that the diff no longer has. The branch has since moved to a096d79, which adds a pr-cancel-on-close job and concurrency settings in other CI files. This review does not cover those, and the evidence above is still needed. |
|
I found no blocking problems at a096d79. The earlier concern is fixed: a096d79 now has the timings and green runs on the restructured ci.yml jobs. Lint, Typecheck & Package, Repo Guards & Compatibility and Coverage pass, and so do the Analyze runs for actions, java-kotlin and javascript-typescript. Analyze (python) is still pending and covers no file in this diff. I found no conflicts. Not blocking, and you can take or leave these: the workflow-level concurrency in test-app-build-cache.yml seems to cancel PR runs on the next push. Does the job-level |
… cancel of a running run
There was a problem hiding this comment.
All reported issues were addressed
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
|
The changes since a096d79 look good at 01992b3, and I found no new problems. The close-time cancel filter now matches the PR number from the event, so a branch shared with another PR no longer matches. I checked this by reading the workflow and the live runs API output. I did not run the cancel workflow end to end, because it only fires when a PR closes. It will first run on this PR's own close. Of the two earlier inline threads, the shared-branch match is fixed at this head and can be resolved. The ref suffix check is already resolved and holds, because live API paths carry no The timings and the The only check not passing is Smoke Tests, which is still queued and has no log. The new changes touch only |
|
…ctions-1 * origin/main: feat(react-devtools): inspect React components and profile renders through the Metro inspector (#3613) refactor(daemon-contracts): drop the registration and claims fixture exports (#3689) refactor(test-kit): drop the daemon-contracts dependency (#3686) refactor(test-kit): drop command-registry by making the replay-script generator a root fixture (#3687) fix(ios): handle delayed launch confirmations without stopping XCTest (#3682) refactor(test-kit): move the dispatch-disclosure harness out of contracts (#3690) refactor(test-kit): host the target classification capture fixture (#3691) ci: fold six CI jobs into four with parallel and background steps; cancel superseded and closed-PR runs (#3658) build(typescript): move root project references into tsconfig.typecheck.json (#3688) chore(daemon): declare @agent-device/proxy as a devDependency, since only a test imports it (#3685) refactor(settings): declare settings once and admit them per setting (#3662) # Conflicts: # packages/platform-android/src/alert.ts # website/docs/docs/limrun.md
Restructures
ci.ymlto use the new step-levelparallel:andbackground:/wait:keywords (changelog). The CI workflow goes from six jobs to four, which takes two runner slots per PR off the queue.Why fallow got slow
Since #3370 (fallow 2.104 → 3.32), "Run Fallow audit" takes 440–800s on CI instead of 6–9s. Bisected locally on the
resolve importsrow offallow --performance: 3.19.0 takes 0.6s and 3.20.0+ takes 8.2–8.7s (206s on a 4-vCPU runner). Since 3.20, fallow walks all 28 root-tsconfigreferencesfor every import, stats each one and rebuilds aGlobSeteach time: ~1.5M glob builds and 20Mstatxper run. Removingreferencesgives identical findings, so the fix belongs upstream in fallow.Dead ends, measured:
.fallow: a PR head restored from a cache built at its base still took 524s for the audit and 209s for health. The cache only helps an identical tree, so I removed the caching steps.ignoreFindingsunsupported, 79 production-export findings).Layout
parallel:groupbackground:step beside the guards;wait: fallow-auditcomes before production-exports, which shares the.fallowcache dirscripts/gate/workflows.tsnow opensparallel:groups, so the gate manifest still credits each gate inside a group to its lane (new test inworkflows.test.ts).Failure semantics
Checked on a throwaway branch (run 38764903724, deleted since):
background: truestep fails the job at itswait:step, and the steps after the wait are skipped. This holds for a plainrun:step and for a composite action such asrun-gate.Timings (ran time; queue time excluded)
Trade-off: each PR now uses 4 runner slots instead of 6, and about 12% fewer runner-seconds (~2250s → ~1990s). With an ~80-minute queue, throughput is what counts. But on an idle queue, wall time is about 2.5 minutes worse, because the merged guards job (~16 min) is now the critical path. Parallel steps buy almost nothing on a 4-vCPU runner. A cold fallow audit already uses every core, so the work beside it just takes turns: freerange took 562s beside the audit, against ~250s alone. The real speedup needs the fallow fix upstream.
Also in this PR: run cancellation
pr-cancel-on-close.yml: onpull_request: closed, it cancels the PR's unfinished runs (same-repo PRs only, because a fork PR's token is read-only). A refused cancel fails the job, unless the run had already finished.agent-guidance.ymlanddocs.ymlgain theci.ymlconcurrency group, so a new push replaces the PR's older run (main pushes still never cancel each other).test-app-build-cache.ymlkeeps its job-levelcancel-in-progress: false.