Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,12 @@ jobs:
# blob:none still fetched every HEAD blob (488 MB) to fill the working tree, and that
# checkout alone took 3m20s of the 5 minutes on a loaded runner (runs 41688746026,
# 41702153229). The scripts read only scripts/ and each kit.json: about 20 MB.
# packages/runtime-native/scripts holds the desktop build profile that per-job carry imports;
# without it every run printed "per-job reuse unavailable" and carried nothing (PRD-903).
sparse-checkout: |
scripts
packages/create-threenative/templates
packages/runtime-native/scripts
# Until protected develop exists, retain the qualified-main scheduled flow.
ref: ${{ github.event_name == 'schedule' && vars.TN_DEVELOP_CI_ENABLED == 'true' && 'develop' || github.sha }}
- id: classify
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/native-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ concurrency:
# superseded proof is a few minutes of one runner, where running them beside each other was the
# whole pool.
#
# `cancel-in-progress: false` is unchanged and load-bearing: every cancellation in this
# workflow's history was a proof run killed by the next push to its own branch, and a
# candidate-keyed result is still valid for the SHA it was produced from.
# PRD-903: a new commit on a proving pull request (`synchronize`) cancels the proof in progress.
# The tag run reuses only the proof of its own tree, so a superseded head's proof is never read,
# and 43 develop proofs in 5 days ran back to back for 50 minutes each. A tag, a dispatch and a
# `labeled` event still never cancel: a label on the same head must not kill its running proof.
#
# PRD-629: a release tag run has a group of its own. A main proof run (a duplicate dispatch
# or a `release-proof` label) held `native-release-proof` once and delayed the tag run until it
Expand All @@ -46,7 +47,7 @@ concurrency:
# workflow (its `gates` job then refuses it), and in one shared group those no-op runs would queue
# behind a real proof and replace a pending one, since a group keeps a single pending run.
group: ${{ github.ref_type == 'tag' && 'native-release-tag' || (github.event_name != 'pull_request' || github.event.pull_request.base.ref == 'main' || contains(github.event.pull_request.labels.*.name, 'release-proof')) && 'native-release-proof' || format('native-release-skip-{0}', github.run_id) }}
cancel-in-progress: false
cancel-in-progress: ${{ github.event_name == 'pull_request' && github.event.action == 'synchronize' }}

jobs:
validate-tag:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/npm-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ jobs:
GH_TOKEN: ${{ github.token }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
SHA: ${{ github.event.workflow_run.head_sha }}
# PRD-903: the `pnpm build` above built this commit; the proof and publish runs reuse it.
TN_RELEASE_PREBUILT: ${{ github.event.workflow_run.head_sha }}
TN_PLAYTEST_ALLOW_SOFTWARE: "1"
# A rerun leaves out `--auto`, so a failed clean room cannot turn green with no new check.
run: pnpm release:ship --yes --sha "$SHA" ${{ github.run_attempt == 1 && '--auto' || '' }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ jobs:
# The root build includes the examples on the default engine, which stop at
# TN_WASM_ENGINE_MISSING without the web Wasm engine (release run 42296982894).
- uses: ./.github/actions/native-engine-wasm
- name: Build the workspace packages before comparing published bytes
run: pnpm build
# PRD-903: no workspace build here. The gate builds once, on the first package npm already
# serves, because only a resumed release compares published bytes with the workspace.
- name: Write the request and workflow-derived availability
env:
CANDIDATE_REQUEST: ${{ inputs.candidate_request }}
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# PRD-904 — Android conformance runs in two shards on one APK, and the tiny integration lanes share one setup

**Status:** NOT STARTED
**Priority:** P2 — the Android emulator parity job (34–44 min) is the wall-time floor of every full board, and neither box below is started.
**Complexity:** 6 (MEDIUM); risk override: HIGH — changes a required native receipt.
**Owner:** CI tooling
**Depends on:** [PRD-903](../BLOCKED/requires-next-release/PRD-903-cut-release-deploy-and-ci-time-by-fixing-carry-and-cutting-duplicate-and-junk-tests.md)

## Context

Split out of PRD-903 Phase 3 on 2026-11-21 (owner chose "review lane only" for PRD-903, and this work needs native CI runs to prove).

- `android-emulator-parity` in `.github/workflows/native-platforms.yml` builds the APK and then runs all 110 active conformance cases serially at about 14.5 s each (26.5 min of the 34–44 min job, run `44878180530`).
- `run-conformance.mjs --only-tests` already selects a subset.
- Two shards cannot each build their own APK: `scripts/ci-native-receipts.mjs` requires every executed row's `runtimeLibraries.x86_64` to equal one `artifactSha256`, and it validates the report against the full `conformance/registry.json`.
- Six `integration/*` web lanes (`csg`, `ik`, `playstation`, `decals`, `fluid-collision`, `exposure`) run 0.5–1.5 min each and each pay full checkout, install and queue setup.

## Solution

1. One job builds the APK and uploads it. Two shard jobs download it, boot the emulator and run `--only-tests` halves of the registry. A merge job joins the two partial reports into one full report, then runs the existing parity ledger, `check-lane-blocks.mjs` and the receipt writer on it, so the receipt contract does not change.
2. The six small integration lanes run as steps of one job, and `scripts/ci-integration-scope.mjs` keeps one receipt key per lane.

## Acceptance Criteria

- [ ] AC-1 [shared]: A full board's Android parity wall time is 25 min or less (baseline 34–44 min), with the same 110 executed cases and a valid native receipt. proof: a `native-platforms` run ID and `pnpm ci:speed record && pnpm ci:speed show` — Evidence: pending.

## Execution Phases

#### Phase 1: Shard Android conformance on one APK
**Status:** NOT STARTED

- [ ] The APK producer, two shard jobs and the report merge pass `ci-native-receipts.mjs` with one `artifactSha256`. proof: `pnpm exec vitest run scripts/__tests__/ci-native-chain.spec.ts scripts/__tests__/ci-native-profile.spec.ts scripts/__tests__/ci-structure.spec.ts` and one green `native-platforms` run — covers AC-1.

#### Phase 2: One setup for the tiny integration lanes
**Status:** NOT STARTED

- [ ] The six small `integration/*` lanes run in one job and every lane keeps its receipt key. proof: `pnpm exec vitest run scripts/__tests__/ci-integration-scope.spec.ts` and one green `integration` run — covers AC-1.
Loading
Loading