[PR #2131] [MERGED] ci: narrow native-host lane selection and reuse build caches #5050

Closed
opened 2026-10-31 01:00:48 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/2131
Author: @kaoru0822-kitauji
Created: 10/12/2026
Status: ✅ Merged
Merged: 10/12/2026
Merged by: @kaoru0822-kitauji

Base: main ← Head: ci/narrow-lane-selection


📝 Commits (2)

  • e395e8c ci: narrow native-host lane selection and reuse build caches
  • d2e75e2 ci: match package script entrypoints against scope globs

📊 Changes

5 files changed (+413 additions, -45 deletions)

View changed files

📝 .github/workflows/ci.yml (+11 -4)
📝 docs/testing.md (+44 -22)
📝 scripts/ci/plan.mjs (+43 -15)
📝 scripts/ci/scopes.mjs (+104 -2)
📝 tests/boundary/filesystem/ciChangeScope.test.ts (+211 -2)

📄 Description

Why

Replaying scripts/ci/plan.mjs over the last 120 first-parent commits on main showed that 93/120 (77.5%) selected the full baseline. That means the 4-host package matrix, the Windows curated lane, the Apple macOS lane, NativeAOT and all 8 real-provider lanes. The main cause was the Unclassified input fallback: almost every src/ file without an owner landed there.

Changes

  1. Owned scopes replace the full fallback for runtime sources.
    • New apple and package scopes in scripts/ci/scopes.mjs. They own the Apple artifact lane and the package matrix plus Windows curated lane (Windows native, Inspector, setup/config, packaging entrypoints).
    • The test files those lanes invoke explicitly now select their lane.
    • An unowned src/** or bridge/** file selects the Linux suite plus the Linux x64 installed-package/Inspector baseline. .agents/skills/** does the same and also selects docs.
    • Shared boundaries, dependencies, unknown top-level files and the planner itself still select full.
  2. Manual-only verifier entrypoints are code-only. MANUAL_VERIFIERS lists real Ghidra/Hopper/IDA/Electron, client, JEB/apktool/ADB, packaged-Ghidra-Windows and WASM verifiers. No automatic lane runs them. A new test fails if an automatic workflow (ci.yml, workflow_call or pull_request workflows) ever reaches one through npm run or node scripts/....
  3. macOS x64 runs on PRs only with ci:full. Main pushes, schedule and dispatch keep it.
  4. More doc-only paths: CHANGELOG.md, SECURITY.md, .github/ISSUE_TEMPLATE/**, .github/pull_request_template.md, native/windows/README.md.
  5. Windows curated lane: drops the duplicate npm run typecheck, which the Linux static job already runs, and restores rea-build-cache before build:cached.
  6. Apple artifact lane restores rea-build-cache before its build:cached verifiers.
  7. Linux test shards go from 4 to 6. The timing-balanced sequencer already handles any count.

Main pushes keep the full baseline. CI required and all job names are unchanged.

Replay (same 120 commits, PR event)

full baseline package (4-host + Windows) apple runtime code
before 93 (77.5%) 93 93 101 115
after 33 (27.5%) 43 35 100 115
  • Every file owned by a provider scope (336 occurrences), the Apple scope (14) or the package scope (59) still selected its lane.
  • No lane that was selected without the full fallback was lost.
  • The one commit that lost runtime had been full only because it touched a manual verifier.

Coverage tradeoffs

  • Change 1: a change to unowned shared runtime code (src/application, src/domain, src/artifacts, …) can fail only on arm64, macOS, Windows, the Apple lane, or a provider lane that does not own the file. Such a failure is no longer caught on the PR; the main-push full baseline reports it after merge. Ownership globs do not follow imports. Use ci:full when a change may have effects on other hosts or providers.
  • Change 4: PRs no longer verify the darwin x64 installed package and Inspector unless labelled ci:full. Main pushes still do.
  • Cost increase: editing a test file that the Windows or Apple lane lists now selects that lane. For Windows tests this includes the package matrix, because package implies runtime.

Validation

  • npm run test:focused -- tests/boundary/filesystem/ciChangeScope.test.ts tests/process-global/curatedWindowsLane.test.ts: 80 passed
  • npm run check:fast, npm run docs:check: pass
  • actionlint 1.7.7 (-shellcheck= -pyflakes=): pass
  • No real-provider verification is involved; this changes CI selection only.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/2131 **Author:** [@kaoru0822-kitauji](https://github.com/kaoru0822-kitauji) **Created:** 10/12/2026 **Status:** ✅ Merged **Merged:** 10/12/2026 **Merged by:** [@kaoru0822-kitauji](https://github.com/kaoru0822-kitauji) **Base:** `main` ← **Head:** `ci/narrow-lane-selection` --- ### 📝 Commits (2) - [`e395e8c`](https://github.com/morluto/rea/commit/e395e8c797b8323b72cc7e2ada178ec1ed54c0f6) ci: narrow native-host lane selection and reuse build caches - [`d2e75e2`](https://github.com/morluto/rea/commit/d2e75e22115621cc0a2a89aa24904635fc93134f) ci: match package script entrypoints against scope globs ### 📊 Changes **5 files changed** (+413 additions, -45 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/ci.yml` (+11 -4) 📝 `docs/testing.md` (+44 -22) 📝 `scripts/ci/plan.mjs` (+43 -15) 📝 `scripts/ci/scopes.mjs` (+104 -2) 📝 `tests/boundary/filesystem/ciChangeScope.test.ts` (+211 -2) </details> ### 📄 Description ## Why Replaying `scripts/ci/plan.mjs` over the last 120 first-parent commits on main showed that **93/120 (77.5%)** selected the full baseline. That means the 4-host package matrix, the Windows curated lane, the Apple macOS lane, NativeAOT and all 8 real-provider lanes. The main cause was the `Unclassified input` fallback: almost every `src/` file without an owner landed there. ## Changes 1. **Owned scopes replace the full fallback for runtime sources.** - New `apple` and `package` scopes in `scripts/ci/scopes.mjs`. They own the Apple artifact lane and the package matrix plus Windows curated lane (Windows native, Inspector, setup/config, packaging entrypoints). - The test files those lanes invoke explicitly now select their lane. - An unowned `src/**` or `bridge/**` file selects the Linux suite plus the Linux x64 installed-package/Inspector baseline. `.agents/skills/**` does the same and also selects docs. - Shared boundaries, dependencies, unknown top-level files and the planner itself still select full. 2. **Manual-only verifier entrypoints are code-only.** `MANUAL_VERIFIERS` lists real Ghidra/Hopper/IDA/Electron, client, JEB/apktool/ADB, packaged-Ghidra-Windows and WASM verifiers. No automatic lane runs them. A new test fails if an automatic workflow (ci.yml, `workflow_call` or `pull_request` workflows) ever reaches one through `npm run` or `node scripts/...`. 3. **macOS x64 runs on PRs only with `ci:full`.** Main pushes, schedule and dispatch keep it. 4. **More doc-only paths:** `CHANGELOG.md`, `SECURITY.md`, `.github/ISSUE_TEMPLATE/**`, `.github/pull_request_template.md`, `native/windows/README.md`. 5. **Windows curated lane:** drops the duplicate `npm run typecheck`, which the Linux `static` job already runs, and restores `rea-build-cache` before `build:cached`. 6. **Apple artifact lane** restores `rea-build-cache` before its `build:cached` verifiers. 7. **Linux test shards go from 4 to 6.** The timing-balanced sequencer already handles any count. Main pushes keep the full baseline. `CI required` and all job names are unchanged. ## Replay (same 120 commits, PR event) | | full baseline | package (4-host + Windows) | apple | runtime | code | |---|---|---|---|---|---| | before | 93 (77.5%) | 93 | 93 | 101 | 115 | | after | **33 (27.5%)** | 43 | 35 | 100 | 115 | - Every file owned by a provider scope (336 occurrences), the Apple scope (14) or the package scope (59) still selected its lane. - No lane that was selected without the full fallback was lost. - The one commit that lost `runtime` had been full only because it touched a manual verifier. ## Coverage tradeoffs - **Change 1:** a change to unowned shared runtime code (`src/application`, `src/domain`, `src/artifacts`, …) can fail only on arm64, macOS, Windows, the Apple lane, or a provider lane that does not own the file. Such a failure is no longer caught on the PR; the main-push full baseline reports it after merge. Ownership globs do not follow imports. Use `ci:full` when a change may have effects on other hosts or providers. - **Change 4:** PRs no longer verify the darwin x64 installed package and Inspector unless labelled `ci:full`. Main pushes still do. - **Cost increase:** editing a test file that the Windows or Apple lane lists now selects that lane. For Windows tests this includes the package matrix, because `package` implies `runtime`. ## Validation - `npm run test:focused -- tests/boundary/filesystem/ciChangeScope.test.ts tests/process-global/curatedWindowsLane.test.ts`: 80 passed - `npm run check:fast`, `npm run docs:check`: pass - `actionlint` 1.7.7 (`-shellcheck= -pyflakes=`): pass - No real-provider verification is involved; this changes CI selection only. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:00:48 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#5050
No description provided.