Skip to content

fix: restore CI portability and GC correctness - #8017

Merged
proggeramlug merged 1 commit into
mainfrom
fix/ci-green-main-20260813
Aug 13, 2026
Merged

fix: restore CI portability and GC correctness#8017
proggeramlug merged 1 commit into
mainfrom
fix/ci-green-main-20260813

Conversation

@proggeramlug

@proggeramlug proggeramlug commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR packages the current compiler/runtime worktree and the fixes needed to make its CI surfaces green locally.

  • make precise GC rooting retain every physical alloca associated with a logical root slot, with native-proof regression coverage
  • make native emission and LLVM 22 linkage portable on Windows, including COFF archive handling and cache identity inputs
  • fix CRLF/path/platform assumptions across runtime, parity, benchmark, and compiler-backed tests
  • eliminate the Linux product/host warning-gate regressions found in the latest failed main run
  • restore dark-test registration, ArkTS HIR fixtures, and generated API documentation

Local validation

  • cargo test -p perry-codegen: 949 unit tests plus all integration groups, including 264 native proofs
  • cargo test -p perry-runtime --lib -- --test-threads=1: 2,215 passed, 4 ignored
  • Windows perry-dev compiler/runtime/staticlib/UI package build
  • ArkTS release tests: 110 unit tests and 2 full-app smoke tests
  • Windows COFF regression: 1 passed
  • Windows parity smoke: 1/1, 100%
  • typed-feedback compiler/link/runtime evidence test
  • public baseline: 13 tests
  • test-registration, GC gate wiring, global-sink isolation, raw-handle debt, file-size, formatting, API-drift, whitespace, and conflict-marker checks

Notes

The broad Windows CLI unit binary still contains Unix-only tests that fail on a Windows host (printf, POSIX paths/PIDs, and Unix updater replacement semantics). The Windows CI contract runs the focused COFF test, which passes. No release action is included in this PR.

Summary by CodeRabbit

  • New Features

    • Added configurable compilation progress, heartbeat updates, completion estimates, and resource-aware parallel builds.
    • Improved Windows LLVM support and native compilation workflows.
    • Added five updater APIs to the published documentation and type declarations.
  • Bug Fixes

    • JavaScript string methods now evaluate permitted extra arguments and handle omitted optional arguments more consistently.
    • Improved Windows file URL and path handling, including UNC and verbatim paths.
    • Prevented shape-cache sibling mutations and corrected several garbage-collection and code-generation edge cases.
  • Performance

    • Improved code-generation splitting, caching, and large-module memory management.

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b9611ba1-cbe7-4708-9776-ab8cde51a310

📥 Commits

Reviewing files that changed from the base of the PR and between 2d6633f and 32b5156.

📒 Files selected for processing (95)
  • .github/actions/setup-llvm22/action.yml
  • benchmarks/public_baseline.py
  • crates/perry-codegen-arkts/src/tests.rs
  • crates/perry-codegen-arkts/tests/phase2_full_app_smoke.rs
  • crates/perry-codegen/Cargo.toml
  • crates/perry-codegen/build.rs
  • crates/perry-codegen/src/codegen/artifacts.rs
  • crates/perry-codegen/src/codegen/closure.rs
  • crates/perry-codegen/src/codegen/helpers.rs
  • crates/perry-codegen/src/codegen/mod.rs
  • crates/perry-codegen/src/collectors/loop_bounded_i32.rs
  • crates/perry-codegen/src/dialect/mod.rs
  • crates/perry-codegen/src/expr/index_set_guarded.rs
  • crates/perry-codegen/src/expr/property_get/tests.rs
  • crates/perry-codegen/src/expr/write_barrier.rs
  • crates/perry-codegen/src/ext_registry.rs
  • crates/perry-codegen/src/function/precise_roots.rs
  • crates/perry-codegen/src/gc_map.rs
  • crates/perry-codegen/src/linker.rs
  • crates/perry-codegen/src/linker_tests.rs
  • crates/perry-codegen/src/lower_call/console_promise.rs
  • crates/perry-codegen/src/lower_string_method.rs
  • crates/perry-codegen/src/module.rs
  • crates/perry-codegen/src/native_emit.rs
  • crates/perry-codegen/src/opt_report/render.rs
  • crates/perry-codegen/src/root_reload.rs
  • crates/perry-codegen/src/rooting/mod.rs
  • crates/perry-codegen/src/statepoint_report.rs
  • crates/perry-codegen/src/stmt/let_stmt.rs
  • crates/perry-codegen/src/stmt/let_stmt_facts.rs
  • crates/perry-codegen/tests/native_proof_regressions.rs
  • crates/perry-hir/src/lower/expr_misc.rs
  • crates/perry-runtime/src/abi_trampoline.rs
  • crates/perry-runtime/src/arena/promote.rs
  • crates/perry-runtime/src/arena/tests_promoted_runs.rs
  • crates/perry-runtime/src/array/indexing.rs
  • crates/perry-runtime/src/child_process/output.rs
  • crates/perry-runtime/src/child_process/sync_run.rs
  • crates/perry-runtime/src/eh_walker.rs
  • crates/perry-runtime/src/fs/mod.rs
  • crates/perry-runtime/src/gc/mod.rs
  • crates/perry-runtime/src/gc/policy.rs
  • crates/perry-runtime/src/gc/promote_in_place.rs
  • crates/perry-runtime/src/gc/roots/stack_maps.rs
  • crates/perry-runtime/src/gc/roots/stack_maps_walker_agreement.rs
  • crates/perry-runtime/src/gc/shape_install.rs
  • crates/perry-runtime/src/gc/tests/buffer_bound_method_name.rs
  • crates/perry-runtime/src/gc/tests/copying/all_pointer_elements_7469.rs
  • crates/perry-runtime/src/gc/tests/global_sink_isolation.rs
  • crates/perry-runtime/src/gc/tests/rooted_define_property.rs
  • crates/perry-runtime/src/gc/trace.rs
  • crates/perry-runtime/src/json_tape.rs
  • crates/perry-runtime/src/map.rs
  • crates/perry-runtime/src/native_handle.rs
  • crates/perry-runtime/src/node_submodules/test.rs
  • crates/perry-runtime/src/object/arguments.rs
  • crates/perry-runtime/src/object/class_registry.rs
  • crates/perry-runtime/src/object/class_registry/builtin_alias_construct.rs
  • crates/perry-runtime/src/object/field_get_set/ic_miss.rs
  • crates/perry-runtime/src/object/mod.rs
  • crates/perry-runtime/src/object/object_ops/keys_array.rs
  • crates/perry-runtime/src/object/tests.rs
  • crates/perry-runtime/src/os.rs
  • crates/perry-runtime/src/path/value_args.rs
  • crates/perry-runtime/src/plugin.rs
  • crates/perry-runtime/src/process/credentials.rs
  • crates/perry-runtime/src/process/ipc.rs
  • crates/perry-runtime/src/regex.rs
  • crates/perry-runtime/src/set.rs
  • crates/perry-runtime/src/string/concat.rs
  • crates/perry-runtime/src/string/split.rs
  • crates/perry-runtime/src/string/tests.rs
  • crates/perry-runtime/src/symbol.rs
  • crates/perry-runtime/src/tui/tree.rs
  • crates/perry-runtime/src/typed_feedback.rs
  • crates/perry-runtime/src/update_notify.rs
  • crates/perry-runtime/src/url/node_compat.rs
  • crates/perry/src/commands/compile/build_cache.rs
  • crates/perry/src/commands/compile/object_cache.rs
  • crates/perry/src/commands/compile/object_cache/object_cache_tests.rs
  • crates/perry/src/commands/compile/run_pipeline.rs
  • crates/perry/src/commands/progress.rs
  • docs/api/perry.d.ts
  • docs/src/api/reference.md
  • run_parity_tests.sh
  • scripts/gc_gate_wiring_check.py
  • scripts/gc_pin_sites.py
  • scripts/global_sink_isolation.py
  • scripts/raw_handle_debt.py
  • scripts/regen_api_docs.sh
  • test-files/test_issue_3987_string_tail.ts
  • test-parity/gc_repsel_corpus.txt
  • tests/test_benchmark_peer_fallback.sh
  • tests/test_public_baseline.py
  • tests/test_typed_feedback_runtime_evidence.py

📝 Walkthrough

Walkthrough

The change adds Windows LLVM setup, resource-aware codegen scheduling, IR-based unit partitioning, native parallel compilation, string argument compatibility, Windows path normalization, runtime portability fixes, cache updates, cross-platform scripts, and updater API documentation.

Changes

LLVM codegen pipeline

Layer / File(s) Summary
LLVM platform setup
crates/perry-codegen/Cargo.toml, crates/perry-codegen/build.rs, .github/actions/setup-llvm22/action.yml
LLVM linking and Windows validation now use platform-specific configuration. LLVM binaries are added to later process paths.
Codegen partitioning and native compilation
crates/perry-codegen/src/module.rs, crates/perry-codegen/src/native_emit.rs, crates/perry-codegen/src/linker.rs, crates/perry-codegen/src/codegen/helpers.rs
IR-size estimates, owned function partitions, reachable metadata, target-specific globals, native worker queues, and platform-specific object merging are added.
Codegen progress and lowering validation
crates/perry-codegen/src/codegen/*, crates/perry-codegen/src/function/precise_roots.rs, crates/perry-codegen/src/expr/write_barrier.rs, crates/perry-codegen/src/gc_map.rs, crates/perry-codegen/tests/*
Codegen phases report progress. Closure metadata is scoped to relevant locals. Root, barrier, stack-map, and IR assertion tests are updated.

Language and runtime behavior

Layer / File(s) Summary
String and path semantics
crates/perry-codegen/src/lower_string_method.rs, crates/perry-hir/src/lower/expr_misc.rs, crates/perry-runtime/src/url/node_compat.rs, test-files/*
String methods evaluate surplus arguments. Windows verbatim paths and file URLs are normalized. Regression tests cover both behaviors.
Runtime object and closure behavior
crates/perry-runtime/src/node_submodules/test.rs, crates/perry-runtime/src/object/object_ops/keys_array.rs, crates/perry-runtime/src/update_notify.rs, crates/perry-runtime/src/path/value_args.rs
Closure arity is recorded, shared keys arrays use shape flags, environment values use broader truthy parsing, and path assertions normalize separators.

Runtime portability and build hygiene

Layer / File(s) Summary
Runtime platform and feature gates
crates/perry-runtime/src/gc/*, crates/perry-runtime/src/process/*, crates/perry-runtime/src/string/*, crates/perry-runtime/src/regex.rs, crates/perry-runtime/src/typed_feedback.rs
Test-only, Unix-only, architecture-specific, and feature-specific declarations are narrowed. Internal re-export visibility is reduced.
Runtime cleanup and test maintenance
crates/perry-runtime/src/*
Unused fields, imports, helpers, unsafe scopes, comments, and test extraction logic are removed or corrected.

Build tooling and documentation

Layer / File(s) Summary
Build scheduling and cache inputs
crates/perry/src/commands/compile/run_pipeline.rs, crates/perry/src/commands/compile/*cache*, crates/perry/src/commands/progress.rs
Module compilation uses configurable worker budgets and exclusive permits for oversized modules. Progress output separates detail lines from heartbeats. Cache inputs include codegen and LLVM settings.
Cross-platform scripts and baseline handling
run_parity_tests.sh, scripts/*, benchmarks/public_baseline.py, tests/test_public_baseline.py
Python selection, newline handling, UTF-8 reads, path separators, Windows binaries, and benchmark fingerprints now work across supported platforms.
Updater API documentation
docs/api/perry.d.ts, docs/src/api/reference.md
Five updater methods are added to generated declarations and API reference manifests.

Estimated code review effort: 5 (Critical) | ~120 minutes

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ci-green-main-20260813

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 merged commit 81a88de into main Aug 13, 2026
13 of 59 checks passed
@proggeramlug
proggeramlug deleted the fix/ci-green-main-20260813 branch August 13, 2026 07:14
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