Skip to content

CI red on main: 2 vscode E2E + 1 walker test failing (pre-existing, blocks all PR auto-merges) #426

Description

@hyperpolymath

Summary

The CI / build workflow has been red on main since at least 2026-05-28 10:09Z (commit c871f7f). Three tests fail consistently:

1. E2E Node-CJS Codegen #4test_vscode_extension_adapter_override

Test in test/test_e2e.ml:3056. Asserts: when ~vscode_extension_adapter:"../local/adapter.cjs" is passed, the emitted CJS should not contain require("@hyperpolymath/affine-vscode").

The check currently fails because the embedded adapter source (packages/affine-vscode/mod.js, embedded at compile time per #380) contains literal require("@hyperpolymath/affine-vscode") strings in documentation comments / example usage that aren't actual require sites.

2. E2E Node-CJS Codegen #5test_vscode_extension_no_lc

Test in test/test_e2e.ml:3069. Same class of issue — asserts require("vscode-languageclient/node") is NOT present when no_lc:true, but the embedded adapter source has a delimiter comment mentioning that specifier.

Likely fix: either tighten the assertion to look for require(...) function-call form not the bare string (parse as JS rather than substring-match), or strip documentation comments from the embedded adapter source before substring assertions.

3. walker-phase2c-parity #2test_walker_finds_untyped_exception

Test in tools/res-to-affine/test/test_walker.ml:148. Walker reports lines 19 and 28 as having untyped-exception but misses line 22 (| Js.Exn.Error(_) => None in a catch-arm).

Root cause identified at tools/res-to-affine/walker.ml:434-440: the developer-comment-acknowledged fallback for catch-arm Js.Exn.* patterns only matches leaf nodes (node.children = []), but tree-sitter parses Js.Exn.Error(_) as a compound node with children, so the fallback never fires.

Likely fix: extend the fallback to recurse into compound nodes' leaves looking for Js.Exn-prefixed text, OR add a typed branch for tree-sitter's catch-arm constructor pattern node type.

Impact

Surfaced by

Suggested follow-up

Three small surgical fixes (one per test). Probably 1 PR per fix to keep history clean, or one bundled fix-ci PR.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions