Skip to content

Run mobile CI typechecks without concurrent dependency installers - #24569

Closed
nwparker wants to merge 1 commit into
mainfrom
nwparker/perf-mobile-ci-compiler-launch-20261002
Closed

nwparker wants to merge 1 commit into
mainfrom
nwparker/perf-mobile-ci-compiler-launch-20261002

Conversation

@nwparker

@nwparker nwparker commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Two type checks should read the installed tools. They should not both try to reinstall those tools at the same time.

What Changed

Two real CI attempts failed while concurrent pnpm compiler wrappers tried to modify the same dependency directories before the checks ran. The workflow now calls the same installed TypeScript compiler and unchanged test ratchet through Node. The complete frozen install, compiler arguments, test baseline, parallel execution and wait before test workers remain intact.

Why

The job has already completed its frozen dependency install. Direct entrypoints remove two installer-capable wrapper calls while keeping the compilers parallel and preserving all checks. CI logs show overlapping installs; the precise pnpm freshness trigger was not logged.

Linked Issue

Internal performance audit; no pre-existing issue.

Visual Proof

N/A — cleanup and internal work only; live UI, output and interaction behavior are unchanged.

Testing

Five root contract suites pass 84 tests; existing mobile ratchet tests pass 21. An extracted actual workflow-shell fixture verifies zero pnpm calls versus two on stock, identical arguments/cwd/Node/environment, production exit 13, test-ratchet exit 1 and the background join. Stock fails four wrapper-count contracts. Independent reviewer reproduced these results and ran both real installed compilers concurrently: both exit zero. The installed compiler shim separately gives identical empty diagnostics. Root changed-code quality, full typecheck and build pass locally.

All test launches used ORCA_BACKGROUND_LAUNCH=1.

  • Automated performance and compatibility checks added
  • Physical platform/end-to-end runs (gaps below)

Review

Independent audit_renderer review approved the frozen file hashes and reproduced the original regression and final compatibility checks.

Agent skill upstream boundary

  • Not applicable; no upstream skill material changed.

Notes

CI currently rejects three unchanged terminal write-spy fixture lines on main. #24600 repairs that separate fixture; rerun against the repaired base before merging this PR.

CI-only change: no mobile runtime, wire, SSH, workspace, credentials, dependency policy or application behavior changes. Linux ARM64 workflow remains the target; executable fixtures run on macOS, with structural checks available on Windows. A published green CI run is still required. The earlier project-matching PR has an independently reproduced installation failure; this separate fix does not silently change its head or bypass checks.

Checklist

  • Small, focused change with ELI5 and before/after evidence
  • Visual proof N/A explained
  • Independently reviewed for correctness and performance
  • Cross-platform, SSH/remote and folder-workspace impact considered
  • Full platform CI (local focused checks passed)

Invoke the installed TypeScript entrypoint and unchanged test ratchet through Node, preserving the existing compiler parallelism and background join.
@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 3a1917de-bde9-4777-bb7f-6e43809f989b

📥 Commits

Reviewing files that changed from the base of the PR and between ba9af21 and 67c7da7.

📒 Files selected for processing (2)
  • .github/workflows/mobile.yml
  • config/scripts/mobile-typecheck-read-only-workflow.test.mjs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.


📝 Walkthrough

Walkthrough

The mobile workflow now runs the production TypeScript check through Node and runs the test-typecheck ratchet script directly, replacing the pnpm commands. New tests check the workflow commands and step ordering. They also run both checks in temporary fixtures and verify exit codes, compiler arguments and environment, installer behavior, and ratchet output.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 67c7d

The mobile typecheck change is ready to merge after normal CI checks; no outstanding issue was identified.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description is detailed and relevant. It explains the change, rationale, testing, limitations, and checklist status. However, the required Linked Issue section does not provide an issue link. Add a link to the issue addressed by this pull request. If the author is a maintainer and the repository permits the exception, state that maintainer exception clearly and confirm that no issue is required.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the main change: preventing concurrent dependency installers during mobile CI typechecks.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes

  • Direct compiler entrypoints in mobile CI — .github/workflows/mobile.yml now runs node node_modules/typescript/bin/tsc --noEmit for the backgrounded Typecheck step and node scripts/check-tests-typecheck-ratchet.mjs for the typecheck ratchet, replacing two concurrent pnpm wrapper calls. Since pnpm's verifyDepsBeforeRun defaults to install on the pinned pnpm@12.0.0, each pnpm <script> performs a dependency check that can re-run install (and the mobile postinstall webview builds), so the two parallel typechecks could both mutate node_modules at once. Both direct commands target real JS entries, so no pnpm-provided PATH or env behavior is lost.
  • New workflow contract test — config/scripts/mobile-typecheck-read-only-workflow.test.mjs pins the step ordering, background flag, wait barrier, and the exact command strings, then executes both shell commands in a temp fixture with a stubbed pnpm on PATH to prove zero installer invocations, identical args/cwd/env, and the production-exit / ratchet-exit outcomes. The executable half genuinely fails against stock: the stubbed pnpm would log an installer and exit 73.

Verified locally: the new suite passes 4/4 and the related mobile/workflow suites pass 96/96; check:code-quality:changed and oxlint are clean.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@nwparker

nwparker commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #24776 (commit77ad467ebb83f16e8754abe7cfab7cb6d8078d5d): main already uses the direct Node compiler and ratchet commands and now deliberately waits for production types before the ratchet. Applying this older branch would undo that barrier and remove the restore-pnpm-verification path trigger. Closing preserves the newer main behavior; no remaining production optimization needs merging.

@nwparker nwparker closed this Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant