Skip to content

ci: scope orcad smoke and parallelize Linux packages - #23314

Merged
OrcaWin merged 2 commits into
mainfrom
ci/smoke-scope-package-parallel
Sep 27, 2026
Merged

OrcaWin merged 2 commits into
mainfrom
ci/smoke-scope-package-parallel

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

ELI5

CI skips the terminal smoke when a change cannot affect it, and builds Linux package formats concurrently to reduce waiting.

What Changed

The terminal smoke uses the existing dependency collector plus explicit runtime, CLI, native, resource, and toolchain inputs. Missing change evidence or failed analysis runs the smoke. Linux packaging prepares the app once with all existing hooks, then builds AppImage, deb, and rpm in separate private copies. All builders finish before cleanup, and packages are exposed only after all formats succeed.

Why

The smoke currently takes about 29–45 seconds even for unrelated changes. Paired hosted measurements reduced Linux packaging from 157.356 to 96.318 seconds and from 178.851 to 112.518 seconds (37–39%). Private copies preserve format-specific package markers and existing artifact validation while allowing compression to overlap. Both execution orders passed package validation and produced identical app.asar hashes. Timings include preparation and private copies.

Linked Issue

None; no issue created.

Visual Proof

N/A — CI only; application UI and behavior are unchanged.

Testing

  • 133 focused tests passed locally, including real dependency graph cases, independent package metadata, failure cleanup, workflow contracts, and change classification.
  • Changed-code quality gate and formatting checks passed.
  • Automated tests added/updated.
  • Hosted comparison: both execution orders passed, app.asar SHA256 matched, deb/rpm markers passed, and every existing package smoke passed.
  • 221 packaging, copy, and workflow contract tests passed in the packaging workstream.
  • Copy-helper changes trigger Linux packaging CI (40 classification tests passed).
  • All final-head PR checks passed, including eight unit shards, Linux/Windows packaging, static analysis, the actual orcad terminal smoke, mobile verification, and cross-platform persistence. The benchmark used f1e5292; d40d5ce only adds the copy-helper change trigger and its regression case; packaging code is identical.

Review

No application execution behavior, SSH boundary, or folder-workspace behavior changes. Packaging concurrency is limited to Linux x64 PR builds; release builds are unchanged.

Agent skill upstream boundary

  • Not applicable; no upstream skill source copied.

Checklist

  • This PR is focused on two CI bottlenecks.
  • Explained the change, mechanism, and alternatives.
  • N/A visual proof explained.
  • Self-reviewed correctness, platform scope, and failure handling.
  • Hosted CI and packaging benchmark pass.

@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

This CI-only PR makes two independent changes, both covered by new contract tests that pass locally.

  • Orcad terminal smoke is now input-scoped. static_analysis computes the merge-base diff into $RUNNER_TEMP/orcad-smoke-changes, feeds it to the new orcad-terminal-smoke-change-scope.mjs, and skips pnpm run smoke:orcad-terminal only when the classifier returns false. Any diff or analysis failure falls through to running the smoke, so the skip is fail-closed.
  • The classifier reuses the Bun scope machinery. It shares collectBunProfileInputs/classifyBunProfileChanges, adds explicit forced inputs for the orcad entry points, build/smoke scripts, .cjs probes, src/cli/**, src/shared/**, and resources/**, then defers to the dependency graph and the Bun classifier's always-run rules. The new test exercises the real esbuild graph, so the entry points genuinely cover the runtime, CLI, and worker deps.
  • Linux packaging is prepared once and built concurrently. electron-builder --linux dir runs every hook into dist/linux-unpacked, then package-linux-formats.mjs copies that tree into three private per-format trees and runs AppImage/deb/rpm builds in parallel with --prepackaged, publishing artifacts only after all three succeed.
  • The isolation is real. With --prepackaged, electron-builder's doPack returns early (no beforePack/afterPack/native rebuild), computeAppOutDir returns the prepackaged copy, and FpmTarget writes resources/package-type into that copy. So deb/rpm get their own markers and the AppImage copy keeps the dir build's AppImage marker — matching the old shared-tree invocation's per-artifact markers while removing the shared-tree mutation ordering.
  • Artifact contract is preserved. Names, dist/ locations, and the downstream Verify root-package marker payloads / AppImage shutdown-oracle expectations are unchanged; headless-serve-shutdown-workflow.test.mjs and pr-code-change-scope.test.mjs were updated to match.

I also verified locally that all pr.yml-parsing contract tests plus the four changed/new test files pass (97 + 285 + 40 tests), and confirmed the electron-builder internals above against the installed 26.15.3 source. The hosted packaging benchmark and CI run noted as pending in the PR body are the remaining unknowns; nothing in the code review blocks merge.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@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

Delta against the prior review (f1e5292b04 → d40d5ce01a), covering only the follow-up commit d40d5ce01a ci: validate packaging when its copy dependency changes.

  • Classifier gap closed. config/scripts/space-sharing-copy.mjs was added to LINUX_PACKAGE_PREFIXES in pr-code-change-scope.mjs. This is the right fix: package-linux-formats.mjs imports copyPrivateTree from that module, so a change to it now runs Linux packaging instead of silently skipping it. The matching assertion in pr-code-change-scope.test.mjs was updated in the same commit, and the test passes locally.

No other files changed in the delta, and nothing in the prior review's findings is invalidated.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@coderabbitai

coderabbitai Bot commented Sep 27, 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: f8d421ff-c603-4277-960c-d8ea8b851ad5

📥 Commits

Reviewing files that changed from the base of the PR and between 3eb1ade and d40d5ce.

📒 Files selected for processing (9)
  • .github/workflows/pr.yml
  • config/scripts/headless-serve-shutdown-workflow.test.mjs
  • config/scripts/orcad-terminal-smoke-change-scope.mjs
  • config/scripts/orcad-terminal-smoke-change-scope.test.mjs
  • config/scripts/package-linux-formats.mjs
  • config/scripts/package-linux-formats.test.mjs
  • config/scripts/pr-code-change-scope.mjs
  • config/scripts/pr-code-change-scope.test.mjs
  • config/scripts/script-child-process.mjs

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


📝 Walkthrough

Walkthrough

The PR adds changed-path classification for the Orcad terminal smoke, with workflow and test updates. Linux packaging now builds an x64 unpacked app, then uses a new script to create AppImage, deb, and rpm packages. The packaging script validates and stages outputs, and the Linux packaging change-scope rules now include its supporting scripts.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to d40d5

The smoke remains enabled for relevant changes, and Linux packages retain the required preparation and format markers. The PR is mergeable after normal checks.

Security Architecture Review

Security architecture risk: 🟡 Moderate · up to d40d5

The new checks fail safely when change detection errors, and Linux formats are built in separate copies. The main remaining risk is that a successful change analysis could overlook an input removed from the current dependency graph, allowing a relevant PR to skip the terminal smoke check.

Retained concerns

  • Medium · security · inferred: The new smoke gate can report no relevant change when a changed path is outside its forced selectors and absent from the current dependency graph. Coverage of deleted or dynamically loaded runtime inputs is not established, so a relevant change could skip a check that previously always ran.
Security review details

Security Blast Radius

  • inferred — A PR author controls the changed paths considered by the new CI gate. The demonstrated effect is potential loss of terminal-smoke validation for that PR, not added application runtime privilege or direct publication of packages.

Security Findings and Attack Paths

  • inferred — If a runtime-affecting changed path is neither forced nor present in the successful current-build input set, the classifier returns false and the formerly unconditional smoke is skipped. The inspected evidence does not establish a specific exploitable path.

Trust Boundaries and Controls

  • observed — Diff failure, empty change evidence, and dependency-analysis failure preserve smoke execution; the tested removed CLI path is also explicitly selected. These controls do not prove coverage for every deleted or dynamically loaded input.

Resilience and Maintainability Implications

  • inferred — Interrupted package publication can leave a partial output directory, but the inspected PR workflow runs marker checks only after the packaging step succeeds. No path consuming failed-job outputs was established.

Hardening Proposals

  • proposed — Establish explicit coverage for removed and dynamically loaded runtime inputs before allowing a successful graph analysis to skip the smoke.
  • proposed — If package outputs will be consumed independently of a successful PR job, use a recoverable or atomic publication boundary for the complete format set.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

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 6 functions across 8 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 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 summarizes both primary changes: scoping the OrCAD terminal smoke test and parallelizing Linux package builds.
Description check ✅ Passed The description is detailed and covers the required change summary, rationale, testing, scope, visual proof, review notes, and checklist. The Linked Issue section states that no issue was created, whi…
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 6 functions across 8 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

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.

@OrcaWin
OrcaWin merged commit 1882458 into main Sep 27, 2026
41 checks passed
archidoge0 added a commit to archidoge0/orca that referenced this pull request 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