Repository navigation
ci: reuse test fixtures, native builds, and package images - #23291
Conversation
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Cached Linux package fixtures. New
prepare-linux-package-fixturecomposite action restores a fixture tar,docker loads it and emits the local tag the package jobs consume as--cache-from; the main-branch warmer is the only writer. A miss leaves the output empty, so the existing build path runs unchanged. - Localization extraction is now conditionally skipped.
pr.ymlcomputes changed paths withgit diff --name-only --no-renames -z --merge-baseand only skips whenlocalization-extraction-change-scope.mjssays no extraction input changed; any detection error falls back to the full check. - Native addon reuse on Windows.
bun-profile-tests.ymldrops the explicit addon build and relies onnative-runtime: node;stageOrcadWindowsProcessTreereuses the host install and throws if it is absent or unpatched. - Dockerfile base pin. The CLI contract digest moves from an inline
--build-arg BASE_IMAGEinto the Dockerfile default so the warmer and the runner build the same base. - Test refactors for the orcad ARM64 path, SSH relay stage fixtures, and the copying agent-status oracle (early return on empty aliases).
The changes are CI/test-only and the fallbacks are conservative: a cache miss or a diff/scope-detection failure both degrade to the pre-PR behavior rather than skipping a check. I verified the scope predicate covers every input the extractor actually reads (src/** plus config/i18next.config.ts, extractor scripts, lockfiles, tsconfig, install action, patches), the Dockerfile default matches the removed constant exactly, and the orcad staging path validates target, machine, and patch so the removed build step cannot ship silently.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 📝 WalkthroughWalkthroughThe pull request adds a composite action to restore or build Linux package fixture images and wires those images into CI checks and cache warmups. It adds changed-path detection to control localization extraction verification. It also updates native addon workflow coverage, SSH stage test setup, and an empty-input path in a test fixture helper. Priority: ⬇️ Low Merge Risk: 🔵 Low · up to Package checks can still complete, but a bad fixture cache causes repeated builds and slower CI until its key is replaced or invalidated. The PR is mergeable with that cost understood. Security Architecture ReviewSecurity architecture risk: 🟡 Moderate · up to The package checks still build against the current files and fall back to normal builds when a cache cannot be used. The remaining risk is that a shared fixture image can influence those builds, while its origin is checked only indirectly. Who can populate the shared cache has not been established. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 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 8 functions across 12 files. (5 skipped: 5 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.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 76336d23-4e61-46ac-b4b6-a65535dfcd51
📒 Files selected for processing (17)
.github/actions/prepare-linux-package-fixture/action.yml.github/workflows/bun-profile-tests.yml.github/workflows/ci-cache-warmup.yml.github/workflows/pr.ymlconfig/docker/cli-launch-contract/Dockerfileconfig/scripts/ci-cache-warmup-workflow.test.mjsconfig/scripts/headless-serve-shutdown-matrix.test.mjsconfig/scripts/linux-package-fixture-cache.test.mjsconfig/scripts/localization-extraction-change-scope.mjsconfig/scripts/localization-extraction-change-scope.test.mjsconfig/scripts/orcad-windows-process-tree.test.mjsconfig/scripts/pr-code-change-scope.mjsconfig/scripts/pr-code-change-scope.test.mjsconfig/scripts/run-headless-serve-shutdown-docker.mjsconfig/scripts/run-linux-cli-launch-contract-docker.mjssrc/main/ssh/ssh-relay-upload-stage-commands.test.tssrc/shared/agent-status-store-copying-oracle.test-fixture.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
| echo 'built=true' >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Save fixture image | ||
| if: inputs.save-cache == 'true' && steps.cache.outputs.cache-hit != 'true' && steps.image.outputs.built == 'true' |
There was a problem hiding this comment.
🚀 Performance & Scalability | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
sed -n '1,115p' .github/actions/prepare-linux-package-fixture/action.yml
sed -n '86,112p' .github/workflows/ci-cache-warmup.yml
sed -n '878,908p' .github/workflows/pr.ymlRepository: stablyai/orca
Length of output: 5076
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '--- action call sites ---'
rg -n -C 4 'prepare-linux-package-fixture|ORCA_(SHUTDOWN|CLI)_FIXTURE_CACHE_IMAGE|run-(headless-serve-shutdown|linux-cli-launch-contract)-docker' .github config
printf '%s\n' '--- warmup workflow structure ---'
rg -n -C 8 'warm-linux-package-fixtures|schedule:|workflow_dispatch|push:|pull_request:|workflow_call|needs:' .github/workflows/ci-cache-warmup.yml
printf '%s\n' '--- PR package workflow structure ---'
rg -n -C 8 'package|shutdown-fixture-cache|cli-fixture-cache|ORCA_(SHUTDOWN|CLI)_FIXTURE_CACHE_IMAGE|run-(headless-serve-shutdown|linux-cli-launch-contract)-docker' .github/workflows/pr.yml
printf '%s\n' '--- consumer scripts ---'
for f in config/scripts/run-headless-serve-shutdown-docker.mjs config/scripts/run-linux-cli-launch-contract-docker.mjs; do
if [ -f "$f" ]; then
echo "--- $f ---"
sed -n '1,260p' "$f"
fi
done
printf '%s\n' '--- focused diff ---'
git diff --stat 46907de6022dde8b511d6015ac83915bf62de49a 497d3410d3f4bf0ff9295f51d044407b34b15a98
git diff -- .github/actions/prepare-linux-package-fixture/action.yml .github/workflows/ci-cache-warmup.yml .github/workflows/pr.yml 46907de6022dde8b511d6015ac83915bf62de49a 497d3410d3f4bf0ff9295f51d044407b34b15a98Repository: stablyai/orca
Length of output: 41909
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '--- warmup workflow ---'
sed -n '1,125p' .github/workflows/ci-cache-warmup.yml
printf '%s\n' '--- PR package job ---'
sed -n '820,915p' .github/workflows/pr.yml
printf '%s\n' '--- cache action tests ---'
sed -n '1,150p' config/scripts/linux-package-fixture-cache.test.mjs
printf '%s\n' '--- warmup workflow tests ---'
rg -n -C 8 'warm-linux-package-fixtures|save-cache|schedule|pull_request|package fixture' config/scripts/ci-cache-warmup-workflow.test.mjsRepository: stablyai/orca
Length of output: 14419
Invalidate an unusable fixture cache before saving its replacement.
When docker load or docker image inspect fails, the warmup builds a replacement but still skips actions/cache/save because cache-hit remains true. The scheduled warmup repeats this build, and PR package jobs discard the unusable archive before building without --cache-from. This does not block the package checks, but it removes cache acceleration and adds build and network cost.
Invalidate the bad exact key or use a new cache generation for the replacement. Ensure all restores use that new generation; removing the cache-hit condition alone cannot overwrite an existing cache entry.

ELI5
CI repeats work that does not change what is tested: empty oracle queries scan tombstones, some SSH fixtures launch extra PowerShell processes, unrelated changes re-extract every translation, Windows rebuilds an already validated native addon, and package checks reinstall Docker fixture dependencies. This reuses that work while retaining the existing tests.
What Changed
Why
These changes remove repeated setup instead of reducing test coverage or adding competing workers. Native reuse follows existing ABI, patch and architecture validation. Docker cache keys include fixture contents, action code and platform; PRs restore shared caches without creating redundant copies.
Linked Issue
None; requested directly. No issue created.
Visual Proof
N/A — CI and test fixtures only.
Testing
Review
No product behavior changed. Local Electron windows were not launched. Linux glibc floors, platform coverage, test retries and worker counts are unchanged. The cold PR run also verified that cache misses preserve all checks. An unusable immutable entry falls back to a normal build; replacing such an entry requires eviction or a cache-key change.
Agent skill upstream boundary
Checklist
Cache timing evidence
The temporary validation workflow was kept off the PR branch and checks out the exact candidate SHA. It was necessary because GitHub did not expose manually seeded feature-branch caches to the PR merge-ref scope. Main-branch warming supplies the shared cache after merge. These are one-run observations, not guaranteed savings for every runner.