Skip to content

ci: reuse immutable package setup across shutdown checks - #20368

Merged
nwparker merged 1 commit into
mainfrom
nwparker/ci-reuse-package-setup
Sep 12, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/ci-reuse-package-setup

Conversation

@nwparker

@nwparker nwparker commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​144 $\color{#cf222e}{\Huge{\mathbf{−}}}$​16 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​128
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​60 $\color{#cf222e}{\Huge{\mathbf{−}}}$​51 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​9

ELI5

Extract the packaged app once, then reuse its read-only bytes for all six shutdown checks.

What Changed

  • Add --all-entrypoints to run app, extracted launcher, and AppImage cases with both INT and TERM.
  • Share Docker image setup, the original-artifact startup oracle, artifact SHA-256, and immutable extraction.
  • Retain fresh containers and writable state per case, existing signal targeting, legacy individual invocations, failure attribution, and cleanup.
  • Replace three PR workflow invocations with one matrix invocation; retain the separate Linux CLI launch contract.

Why

The three existing invocations repeat image setup, startup validation, and extraction of the same package. Sharing immutable preparation removes that duplicate work while preserving isolation and all six signal cases.

Linked Issue

Part of #20366. This PR is independent and targets main.

Visual Proof

N/A — this changes CI or test synchronization only; no application UI or interaction behavior changes.

Testing

  • Five mocked-Docker matrix tests passed, covering one-time setup, six isolated cases, signal semantics, failures, cleanup, and legacy invocations.

  • Workflow contracts passed in the combined 189-test integration run on macOS.

  • Workflow syntax, lint, formatting, and script syntax checks passed.

  • Automated checks run locally; scope and limitations listed above.

  • Automated tests added/updated, or existing targeted E2E tests exercised.

Review

Self-reviewed for scope, failure handling, cross-platform effects, and compatibility. No application execution-host, SSH, folder-workspace, or wire behavior changes.

Agent skill upstream boundary

  • Not applicable; no upstream skill-installer content is copied.

Notes

No packaged AppImage was available locally, so the real Docker shutdown matrix still needs the Linux package CI job. No post-change hosted timing claim is made.

Checklist

  • Scope is focused and the change is explained.
  • Visual proof is N/A with a reason.
  • Cross-platform and SSH/remote impact considered.
  • Local validation and remaining CI checks are documented above.

Measured impact before merge

Compared the original three invocations with --all-entrypoints using identical released v1.4.200/orca-linux-arm64.AppImage bytes in Docker Linux ARM64 on macOS. Warmed Docker image layers before timing; alternated base/head/head/base. No other local benchmark ran concurrently.

Version Complete six-case elapsed seconds Median
Base: three invocations 26.36, 25.08 25.72s
PR: shared preparation 17.62, 17.54 17.58s

Measured reduction: 8.14 seconds / 31.7%. All 24 signal cases passed, including app, launcher, and AppImage INT/TERM, startup oracles, CLI registration, and cleanup. Artifact SHA-256: 3eb0ff9b111b8384eb9b8fe98d809aef3546f6954817759c882877b471604144.

This validates the runner orchestration against a real released artifact; it is not an x86 hosted-CI timing claim. The x86 artifact could not execute under local Docker emulation, so that attempt was discarded rather than counted. Raw timing and signal reports remain in /tmp/orca-ci-impact/package-arm64-* in the measurement workspace.

No required checks are configured/reported and no review blockers were present at head 565919245e06b1c5db5c19dc88277aea70749753. The hosted Linux package check was still queued at merge; completed local matrix and contract checks are the merge evidence.

@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 13 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: ed23ae5f-0f9b-486a-b19a-d6fcffa0bede

📥 Commits

Reviewing files that changed from the base of the PR and between 923858e and 5659192.

📒 Files selected for processing (4)
  • .github/workflows/pr.yml
  • config/scripts/headless-serve-shutdown-matrix.test.mjs
  • config/scripts/headless-serve-shutdown-workflow.test.mjs
  • config/scripts/run-headless-serve-shutdown-docker.mjs

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.

@nwparker
nwparker merged commit de8e542 into main Sep 12, 2026
27 of 28 checks passed

@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.

ℹ️ Minor suggestions only.

Reviewed changes

  • Single CI matrix invocation — .github/workflows/pr.yml drops the separate launcher and AppImage shutdown steps and runs the existing step with --all-entrypoints, so one Docker build, startup oracle, and extraction now serve all three entrypoints.
  • Shared preparation in the runner — config/scripts/run-headless-serve-shutdown-docker.mjs adds --all-entrypoints, builds the app/launcher/appimage case matrix, runs the entrypoint-agnostic setup once, and still runs each of the six cases in a fresh --rm container with the /artifacts volume read-only. Per-case flag combinations are rejected, and failure ids are now entrypoint:signal:status.
  • Matrix unit tests — the new config/scripts/headless-serve-shutdown-matrix.test.mjs pins one build/startup/extraction, six isolated signal containers with the expected env/mounts/names, per-case SHA-256 evidence, aggregate failure attribution, cleanup after failed extraction, the preserved individual --launcher-exec-overlay path, and rejection of ambiguous flag combinations.
  • Workflow contract test — config/scripts/headless-serve-shutdown-workflow.test.mjs now asserts the workflow has exactly one runner step and pins its exact --all-entrypoints command.

The signal semantics are unchanged (each case still gets its own container, and the shared artifact volume remains :ro), and running the startup oracle once is sound given the AppImage bytes are identical across cases. I ran the two affected suites locally (17 tests passed).

ℹ️ Reliability-gate manifest still describes the old three-invocation shape

config/reliability-gates.jsonc's runtime.headless-serve-graceful-signal-exit gate is the coverage record for exactly this oracle, and it was not updated. Its runtimeBudget.scope still reads "three AppImage startup/extraction matrices", its commands still invoke the runner without --all-entrypoints, and its testFiles/assertionRefs omit the new matrix test that now guards the shared-preparation behavior. CI won't catch this (the manifest check does not cross-reference tests or the workflow), but the gate's declared evidence no longer names the path PR CI actually runs.

Technical details
# Reliability gate not synced with the new oracle shape

## Affected sites
- `config/reliability-gates.jsonc:18370` — `runtimeBudget.scope` describes "three AppImage startup/extraction matrices", which the single shared-preparation invocation replaces.
- `config/reliability-gates.jsonc:18279` — `commands` only exercise the default `app` case; neither command passes `--all-entrypoints`.
- `config/reliability-gates.jsonc:18286` — `testFiles` / `assertionRefs` (18293) list `config/scripts/headless-serve-shutdown-workflow.test.mjs` but not `config/scripts/headless-serve-shutdown-matrix.test.mjs`.

## Required outcome
- The gate's declared scope and evidence commands match the oracle PR CI now runs, and the new matrix test is either registered in the gate or deliberately excluded.

## Suggested approach (optional)
- Add the matrix test to the gate's vitest command and to `testFiles`, with an `assertionRefs` entry, then refresh `runtimeBudget.scope` to reflect one shared startup/extraction feeding three entrypoints × INT/TERM.

## Open questions for the human (optional)
- Is the reliability-gates manifest expected to track changed CI oracle shapes, or only the invariant-level commands?

Pullfrog  | Fix it ➔ | View workflow run | Using openrouter/deepseek/deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

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