Repository navigation
ci: develop cache warm + tower-defense handshake fix - #414
Merged
Merged
Conversation
… develop reads `ci.yml` ran on `push: main` only, so nothing ever ran on develop and no base-branch cache was ever published. GitHub scopes a pull request's cache to `refs/pull/N/merge`, which no other pull request reads, so every pull request into develop missed `native-build-*` and rebuilt the native host (199 s of host plus ~120 s of V8/QuickJS contract executables) and missed `workspace-dist-*` and built the workspace itself. Only a base-branch run publishes a key every pull request can read. `ci.yml` now listens to `push: develop`, and `classify` turns a push whose target is develop into the new `warm` selection: `build-artifacts` and `test-native` run — they are the only two jobs whose product is those caches — and every other job is skipped and not required. `scope`, `ci-required` and `run-summary` read `warm` as an ordinary selection, so the verdict is `build-artifacts` + `test-native` green. A push to main, a pull request, a merge group, the nightly, a dispatch and `TN_CI_FORCE_FULL` all keep their existing selection. No save step had to change: the shared workspace-dist action publishes on a cache miss with `save-bundles` left true in its one producer, and `test-native`'s three `actions/cache` steps save in the action's own post step, which no selection gates. Both jobs' `if:` now also accept `warm`, and nothing else changed about them — `runs-on` included. A warm run verifies nothing, so it is never reuse evidence: `findReusableRun` skips it and keeps looking for the run that really tested the tree, and `sourceVerdict` refuses one as a source. Concurrency is untouched — every push run gets its own group and `cancel-in-progress` is true only for a pull request, so a second push to develop cannot kill the first one mid-save. Evidence: `pnpm exec vitest run scripts/__tests__/ci-needs.spec.ts scripts/__tests__/ci-structure.spec.ts scripts/__tests__/ci-efficiency.spec.ts scripts/__tests__/ci-local.spec.ts` — 238 passed, 0 failed, across the four files; the nine new cases were red first (5 failures, then the two existing push-policy cases once the classifier changed). `pnpm lint` exits 0. The PRD-481 phase 2 cache box stays unticked: its proof is a hosted `test-native` log with a restore from a develop-warmed key, which nothing here can produce.
…ter rejections say why tower-defense failed about half its runs with "Bridge operation 'ready' exceeded 15000ms": the handshake had the same 15 s budget as the first-use shader compile bound. describe/ready now use bridgeWaitTimeoutMs, as advance and wait already do. requestAdapter rejections keep their reason in TN_PLAYTEST_CAPTURE_PROVENANCE_MISSING (rain lane), so the next failure names its cause. bridge specs green locally; provenance.spec needs the CI browser lane (3 baseline cases fail the same way here).
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.
TL;DR: two CI speed and reliability fixes, one PR.
ci.ymlnow also runs on pushes todevelop, as awarmselection that runs onlybuild-artifactsandtest-native. Before this, nothing ran on develop, so no PR could read a base-branch cache and every PR rebuilt the native host (~3.3 min) and V8/QuickJS (~2 min) from cold. A warm run is never a reuse source.describe/readyhandshake had the same 15 s budget as the first-use shader compile, so it lost the race about half the time (Bridge operation 'ready' exceeded 15000ms, frames 0). It now usesbridgeWaitTimeoutMs, asadvanceandwaitalready did.requestAdapterrejections now keep their reason inTN_PLAYTEST_CAPTURE_PROVENANCE_MISSING.Evidence: ci-needs, ci-structure, ci-efficiency, ci-local, ci-fast: 266 passed; bridge specs 19 passed; lint clean.
provenance.spec.tsneeds the CI browser lane (3 baseline cases fail the same way locally).Hold: do not merge until #400 (develop→main) lands.