Repository navigation
ci: compile the E2E CLI once for all consumers - #23384
Conversation
|
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 configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (7)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe E2E workflow now conditionally builds shared CLI output after the relay and Electron builds, then waits for that build before artifact upload. The CLI build delegates output preparation to Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to No new merge-blocking issue is established for the shared E2E CLI build and reuse change. Normal checks can proceed. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The shared CLI build changes how E2E jobs receive executable output, but the observed workflow keeps that output within the same CI run and checks it before local use. No introduced security finding was established. Some artifact-integrity and failure behavior remains unverified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation 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 4 files. (3 skipped: 3 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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. Comment |
There was a problem hiding this comment.
ℹ️ Minor suggestions only — the shared-CLI design checks out, one coverage gap inline.
Reviewed changes
- Shared CLI build in the producer —
e2e.ymladds a backgrounde2e-clistep that compiles the CLI after Electron clearsout/main, gated by an inlineprepare:cli-outputcapability check so an older checkout ref keeps its per-consumer compile. - Consumer reuse —
global-setup.tsnow runsprepare:cli-output(permission repair + local launcher install) instead of recompiling whenSKIP_BUILDis set and the downloadedout/cliexists; a prepare failure aborts setup before the test repo is created. - Script extraction —
package.jsonsplitsbuild:cliintobuild:cli+prepare:cli-outputwith no behavior change for existing callers. - Tests and docs — new capability and global-setup unit tests, updated release dispatch contract, and the runner-efficiency benchmark note.
The capability check is genuinely load-bearing: daily-mac-build.yml dispatches e2e.yml --ref main --raw-field ref=$SHA, so the workflow YAML (new) and the checked-out package.json (possibly old) can disagree. Same-ref callers (pr.yml, release-cut.yml --ref "$TAG") stay consistent, and the error paths fail safe (producer skip → consumer rebuilds).
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
| # The CLI emits into out/main too; start only after Electron finishes clearing that tree. | ||
| - name: Build shared E2E CLI | ||
| id: e2e-cli | ||
| background: true |
There was a problem hiding this comment.
This background step lives in a job the ci-background-step-barriers.test.mjs sweep never reads (it parses pr.yml/mobile.yml/cloud-verify.yml only), so the background-step invariants — wait consumes every id, no continue-on-error or if on the wait, ≤3 pending — go unenforced for this barrier. The repo convention is to add any job with background steps to that sweep; the PR's own dispatch-contract test only pins order and background: true.
Technical details
# Background barrier not swept
## Affected sites
- `.github/workflows/e2e.yml:70-83` — new background `e2e-cli` step + `wait: e2e-cli`.
- `config/scripts/ci-background-step-barriers.test.mjs:21-48` — job list omits `e2e.yml`.
## Required outcome
- The `e2e-cli` barrier is covered by the same invariants as the other background steps.
## Suggested approach
- Parse `e2e.yml` in `ci-background-step-barriers.test.mjs` and add `e2eWorkflow.jobs.build` to the swept list. It has a single background step, so the `pending.size <= 3` bound holds.There was a problem hiding this comment.
Delta since the previous review (d858960 → b96dd2312e) is docs-only: docs/reference/ci-runner-efficiency.md now cites the four-sample final comparison and widens the modeled saving to 1.1–4.7 aggregate minutes, with the "not a measured wall-time reduction" caveat intact. No behavioral surface, no new findings. The single coverage note from the prior review (the e2e-cli background step isn't swept by ci-background-step-barriers.test.mjs) still stands.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

ELI5
E2E jobs were each compiling the same CLI after downloading the app. Compile it once with the app so every consumer can start testing sooner.
What Changed
Build the CLI alongside web projection, after Electron finishes clearing its output directory, and wait for both before uploading. Consumers run the existing permission repair and local launcher installation without recompiling. Older refs keep their existing compilation path through a preparation-script capability check.
Why
Twelve controlled Linux samples measured 4.7–21.2 seconds of repeated compilation per consumer versus under 0.1 second of preparation. Producer overhead varied from 0.2–14 seconds, paid once. This models roughly 1.1–4.7 aggregate runner minutes saved across 14 consumers, before artifact transfer overhead; it is not a measured workflow wall-time saving. Reusing the existing artifact avoids another cache and preserves fresh test repositories and all assertions.
Linked Issue
None.
Visual Proof
N/A — CI setup only.
Testing
23 focused tests and changed-code quality passed on macOS. Contracts cover reused/missing CLI output, preparation failure, old-ref fallback, build failure, and artifact upload ordering.
Eight initial hosted comparisons and four final implementation comparisons passed CLI help and byte parity for all 5,519 output files. Both implementations passed all 12 browser/CLI E2E tests. The final hosted E2E run confirms compilation was skipped and the local launcher installed after download. Subsequent commits only document the benchmark results. Final-head PR CI passed all 36 checks; three existing conditional jobs skipped. No failed tests were rerun or assertions weakened.
The standalone
typecheck:e2estill reports pre-existing broad E2E type debt and is not a CI gate; it reported no diagnostics in the modified setup files. PR CI covers the normal supported gates.Review
Reviewed sequencing, failure propagation, executable permissions, per-runner launcher installation, and older checkout compatibility.
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
No production UI, SSH protocol, platform support, test coverage, or deadline changes.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)