Skip to content

ci: narrow native-host lane selection and reuse build caches - #2131

Merged
kaoru0822-kitauji merged 2 commits into
mainfrom
ci/narrow-lane-selection
Oct 12, 2026
Merged

kaoru0822-kitauji merged 2 commits into
mainfrom
ci/narrow-lane-selection

Conversation

@kaoru0822-kitauji

Copy link
Copy Markdown
Collaborator

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

Unowned src/ and bridge/ files no longer fall back to the full baseline.
They run the Linux suite plus the Linux x64 installed-package/Inspector
baseline. New apple and package scopes own the Apple artifact lane, the
package matrix and the Windows curated lane, including the test files those
lanes invoke. Manual-only verifier entrypoints run static checks and the
Linux suite. CHANGELOG, SECURITY, GitHub templates and the native Windows
README are documentation-only.

Pull requests omit the macOS x64 package host unless labelled ci:full.
The Windows and Apple lanes restore the shared Turbo build cache, the
Windows lane drops its duplicate typecheck, and the Linux suite uses six
shards. Main pushes keep the full baseline.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T10:17:16.220471Z d2e75e2 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

rea/scripts/ci/plan.mjs

Lines 94 to 101 in e395e8c

entries.every((entry) =>
Object.values(SCOPES).some((patterns) => patterns.includes(entry)),
)
? Object.entries(SCOPES)
.filter(([, patterns]) =>
entries.some((entry) => patterns.includes(entry)),
)
.map(([owner]) => owner)

P2 Badge Match scoped script entrypoints as globs

When a PR changes only a package.json command such as verify:keyed-archive, its concrete entrypoint is scripts/verify/apple/keyed-archive.mjs, but the new Apple scope owns it through scripts/verify/apple/**. includes(entry) performs literal equality rather than glob matching, so scriptOwners is empty and the change falls through to full(...), unnecessarily scheduling every provider and native-host lane instead of the owning Apple lane. The same affects the new glob-owned Inspector and Windows verifier commands.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Script-only package.json edits resolved their entrypoint with literal
equality, so glob-owned verifiers such as scripts/verify/apple/** and
scripts/verify/inspector/** fell back to the full baseline instead of
selecting their owning lane.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d2e75e2211

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/ci/scopes.mjs
Comment on lines +7 to +10
"src/native/Apple*",
"src/native/NativeMacOS*",
"src/native/NativeUi*",
"src/native/Lldb*",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include Mac provider dependencies in the Apple scope

When a PR changes an unlisted direct dependency such as src/native/NativeMachoInspection.ts or src/native/SignatureTargetBinding.ts, the planner treats it as generic runtime code and skips apple-artifacts. NativeMacOSProvider invokes both for inspect_macho/inspect_signature, and that lane's verifyNativeProvenance exercises those operations through the real CLI and MCP adapters, so Mac-specific regressions in them now surface only after merge. Add these Mac-provider implementation files (or an appropriate encompassing pattern) to the Apple scope.

AGENTS.md reference: AGENTS.md:L48-L48

Useful? React with 👍 / 👎.

@kaoru0822-kitauji
kaoru0822-kitauji merged commit 4f46eac into main Oct 12, 2026
96 of 106 checks passed
@kaoru0822-kitauji
kaoru0822-kitauji deleted the ci/narrow-lane-selection branch October 12, 2026 13:07
@github-actions github-actions Bot mentioned this pull request Oct 12, 2026
3 tasks done
@morluto morluto added area: build Build, CI, packaging, and publishing area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior labels Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: build Build, CI, packaging, and publishing area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants