Skip to content

fix: CodeRabbit auto-fixes for PR #772 - #773

Merged
hyperpolymath merged 1 commit into
mainfrom
coderabbitai/autofix/8941c87
Oct 3, 2026
Merged

hyperpolymath merged 1 commit into
mainfrom
coderabbitai/autofix/8941c87

Conversation

@coderabbitai

@coderabbitai coderabbitai Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

This follow-up PR contains CodeRabbit auto-fixes for #772.

Files modified:

  • tests/codegen-deno/deno_scripting.harness.mjs
  • tests/codegen-deno/deno_scripting_part2.harness.mjs
  • tools/run_codegen_bun_tests.sh

Fixed 3 file(s) based on 1 failed pre-merge check.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
@coderabbitai

coderabbitai Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

Important

Review skipped

This PR was authored by the user configured for CodeRabbit reviews. CodeRabbit does not review PRs authored by this user. It's recommended to use a dedicated user account to post CodeRabbit review feedback.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: ceb44228-be43-445b-8301-3ee23aebafe1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

sonarqubecloud Bot commented Oct 3, 2026

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath merged commit 45c07de into main Oct 3, 2026
22 of 23 checks passed
@hyperpolymath
hyperpolymath deleted the coderabbitai/autofix/8941c87 branch October 3, 2026 15:10
hyperpolymath added a commit that referenced this pull request Oct 3, 2026
…ESM corpus (follow-up to #772) (#774)

Follow-up to #772 (merged as 8941c87, plus CodeRabbit's doc-comment
pass #773).

## Why main is still red

With #772's masking fixes in, `build` now reaches step 15 **Run codegen
Bun-ESM tests** and stops on one harness:

```
1 of 32 Bun-ESM harness(es) failed
  - dom_startup_error.harness.mjs
ReferenceError: h is not defined
```

Root cause is in the compiler, not the test:
`tests/codegen-deno/dom_startup_error.affine` says
`use Dom::{VNode, div, h1, p, text}`, and `stdlib/Dom.affine`'s
`div`/`h1`/`p` are one-line wrappers
around Dom's own `pub fn h(...)`. `Module_loader.flatten_imports`
inlined exactly the named decls and
left `h` out of the flattened program, so the emitted module called an
undefined `h`.
`ImportGlob`/`ImportSimple` already inline every public decl for this
reason — `ImportList` was the
odd one out. Any consumer writing `use M::{x}` where `x` delegates
internally hits this.

## What this does

* `lib/module_loader.ml` — close over the named decls' free variables to
a fixpoint, pulling the
module's own value decls (private helpers included) in dependency order.
Aliases keep their
behaviour: the closure runs on original names, renaming is applied
afterwards.
* `lib/ast.ml`, `lib/codegen.ml` — move `find_free_vars` into `ast.ml`
(re-exported from `codegen.ml`
for existing call sites) so the loader can share the walker instead of
adding a fourth private
copy. Codegen depends on Module_loader, so the loader could not reach
the copy where it lived.

## Verification

The OCaml build is the verification (no local toolchain here); the CI
run on this PR is the check.
Once step 15 passes, steps 16–18 (native Bun-ESM, face transformers,
extension.ts) execute for the
first time in this pipeline instead of being skipped behind it.

## Before merge

The temporary `[diag]` probe (`tools/ci/diag-probe.sh`,
`.github/workflows/zz-probe-*.yml`, the
`ci.yml` `[diag]` step) is still present — it came in with #772 and is
what makes this failure visible
without Actions log access. It is deleted in a follow-up commit on this
branch once the run is green,
so what merges carries no diagnostics scaffolding.

---------

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
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