Skip to content

feat(parity): reuse verified build artifacts - #7064

Open
TheHypnoo wants to merge 1 commit into
mainfrom
feat/parity-build-reuse
Open

feat(parity): reuse verified build artifacts#7064
TheHypnoo wants to merge 1 commit into
mainfrom
feat/parity-build-reuse

Conversation

@TheHypnoo

@TheHypnoo TheHypnoo commented Jul 30, 2026

Copy link
Copy Markdown
Member

Summary

  • add explicit fixture-only reuse of a verified Perry compiler and matching runtime archives
  • keep the default release build path unchanged
  • reject invalid reuse configuration and document artifact freshness responsibility

Changes

  • run_parity_tests.sh: add PERRY_SKIP_BUILD=1, validate PERRY_BIN plus one native runtime/stdlib pair, and force the existing no-auto archive path
  • tests/test_parity_build_reuse.sh: cover invalid configuration, incomplete artifacts, caller binary preservation, runtime binding, and runner-owned Cargo suppression
  • CONTRIBUTING.md: document fixture-only reuse and rebuild boundaries

Related issue

Closes #7062

Test plan

  • bash -n run_parity_tests.sh tests/test_parity_build_reuse.sh
  • shellcheck -S warning run_parity_tests.sh tests/test_parity_build_reuse.sh
  • tests/test_parity_build_reuse.sh
  • git diff --check
  • verified the default path still invokes the original Cargo build command
  • ./scripts/pre-tag-check.sh --quick — existing main failures remain in workspace architecture, public benchmark freshness, file-size, GC store-site, and address-classification audits; none touch this PR's files

Checklist

  • I have NOT bumped the workspace version or edited CLAUDE.md / CHANGELOG.md
  • My commit follows the repository's conventional prefix style
  • I've read CONTRIBUTING.md

Summary by CodeRabbit

  • New Features

    • Added support for running parity tests with prebuilt compiler and runtime artifacts, skipping compilation when configured.
    • Added validation and clear errors for missing or invalid prebuilt artifacts.
  • Documentation

    • Documented how to run fixture-only parity tests and when a rebuild is required.
  • Tests

    • Added coverage for prebuilt artifact reuse, validation failures, platform-specific archives, and ensuring builds are skipped.

@TheHypnoo TheHypnoo added enhancement New capability or improvement tooling Developer tooling, CI, tests, or release infrastructure labels Jul 30, 2026
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 34654bee-3936-4e8f-b8be-39b6fc979076

📥 Commits

Reviewing files that changed from the base of the PR and between 788a757 and 666be4d.

📒 Files selected for processing (3)
  • CONTRIBUTING.md
  • run_parity_tests.sh
  • tests/test_parity_build_reuse.sh

📝 Walkthrough

Walkthrough

The parity runner now supports PERRY_SKIP_BUILD=1 to validate and reuse a supplied compiler plus matching runtime and stdlib archives. Cargo builds are skipped in this mode, with regression coverage and contributor documentation added.

Changes

Parity artifact reuse

Layer / File(s) Summary
Prebuilt artifact validation
run_parity_tests.sh
Validates PERRY_SKIP_BUILD, PERRY_BIN, and platform-specific runtime/stdlib archives, then configures the runtime directory and disables auto-optimization.
Build gating and status reporting
run_parity_tests.sh
Skips compiler and optional WebAssembly host builds in reuse mode and reports whether artifacts were built or verified.
Reuse regression coverage and documentation
tests/test_parity_build_reuse.sh, CONTRIBUTING.md
Tests invalid configurations and successful reuse without Cargo invocation, and documents the reuse command and rebuild conditions.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Contributor
  participant run_parity_tests.sh
  participant PrebuiltArtifacts
  participant FixtureSuite
  Contributor->>run_parity_tests.sh: set PERRY_SKIP_BUILD=1
  run_parity_tests.sh->>PrebuiltArtifacts: validate PERRY_BIN and runtime/stdlib archives
  run_parity_tests.sh->>FixtureSuite: run parity fixtures without Cargo builds
  FixtureSuite-->>Contributor: report parity results
Loading

Possibly related PRs

  • PerryTS/perry#6891: Both changes modify parity runner archive and build gating logic involving PERRY_NO_AUTO_OPTIMIZE.

Suggested labels: parity

Suggested reviewers: proggeramlug, andrewtdiz

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: enabling reuse of verified build artifacts for parity runs.
Description check ✅ Passed The PR description covers summary, changes, related issue, test plan, and checklist, so it is mostly complete.
Linked Issues check ✅ Passed The changes implement the requested opt-in reuse mode, validation, default-path preservation, and docs/tests for #7062.
Out of Scope Changes check ✅ Passed All listed file changes support the artifact-reuse feature; no unrelated code changes are apparent.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/parity-build-reuse

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New capability or improvement tooling Developer tooling, CI, tests, or release infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tooling: allow explicit parity artifact reuse

1 participant