Skip to content

feat(codegen): resume completed LLVM units after interrupted builds - #9997

Closed
proggeramlug wants to merge 2 commits into
mainfrom
fix/llvm-unit-checkpoints-20260908
Closed

proggeramlug wants to merge 2 commits into
mainfrom
fix/llvm-unit-checkpoints-20260908

Conversation

@proggeramlug

@proggeramlug proggeramlug commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Change

Atomically checkpoint completed native units under the driver's full object-cache identity and a fingerprint of each frozen LLVM input. Treat missing, truncated, corrupt or unwritable records as cache misses.

Independent regression

Unit tests cover input isolation, corruption, nesting, unwinding and best-effort writes. Bounded CLI regression removes one of four completed units and the final module object, then requires 3 reused/1 rebuilt and byte-identical cold/resumed/uncached objects.

The branch starts directly from main and contains its own synthetic fixtures. No proprietary application sources, credentials, account or investigation artifacts are needed.

Validation completed

All four checkpoint unit tests passed. The bounded native driver proved 3 reused units/1 regenerated unit and identical cold/resumed/uncached objects. On unchanged main it found 0 of the required 4 checkpoints.

For transparency: the local before/after native and unit validation used main 8d88e481c and an integration checkout containing the nine audited patches together. Compiler and all nine runtime/extension archives had matching source identities. Each published branch is separate and passes its own CI warnings/check compilation jobs.

Local gate run: all applicable script gates passed except the already-stale public benchmark artifact; product/host warnings and Clippy passed. The all-in-one run reached its 10-minute cap in the API-doc rebuild; both API outputs were then independently verified byte-for-byte with the matching built compiler (no drift).

Existing CI failures / landing note

Ready for the maintainer landing workflow. The full application will be rebuilt only after the required production changes are verified on main.

@coderabbitai

coderabbitai Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 8 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: defaults

Review profile: CHILL

Plan: Advanced

Run ID: f63d572f-a9c8-461e-bc82-62b11c26a2cc

📥 Commits

Reviewing files that changed from the base of the PR and between 8d88e48 and 72f1bb1.

📒 Files selected for processing (8)
  • changelog.d/9997-llvm-unit-checkpoints.md
  • crates/perry-codegen/src/lib.rs
  • crates/perry-codegen/src/native_emit.rs
  • crates/perry-codegen/src/unit_cache.rs
  • crates/perry/src/commands/compile/run_pipeline.rs
  • crates/perry/tests/llvm_unit_checkpoints.rs
  • scripts/test-codegen-unit-resume.mjs
  • tests/modules/codegen_unit_resume/main.ts

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.

@proggeramlug
proggeramlug marked this pull request as ready for review September 8, 2026 14:38
proggeramlug pushed a commit that referenced this pull request Sep 8, 2026
(cherry picked from commit 72f1bb1)
@proggeramlug

Copy link
Copy Markdown
Contributor Author

Landed via #10001 (rebase train; author commits retained). Audited head: 72f1bb166da0ef4ff1884824033fbf18fd2c085e. Post-merge main 6b92bb2ef5ffe277e5f2773bea1a2e244a58347e is byte-identical to the validated tree. Full audit, validation, and conflict/test-harness repair details are recorded in the train PR.

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