Skip to content

fix(harness-ops): split bundle module spans so Bun's bootstrap stub parses in the parser reader #12278

Closed

Description

@kyle-sexton

Refs: #5901

The 2026-11-01 run on #5901 (#5901 (comment)) found that Explore and Plan still read partial on Claude Code 2.1.316 because one bundle module does not parse: span 0, Bun's // @bun bootstrap stub, fails with Unexpected token (4:7), so keys_used("sY") reads every name. Pointer from that run, UNVERIFIED: string-table text is joined onto the stub, so the fix is in read_bundle span splitting.

Done when

  • A fixture reproducing span 0 (a // @bun stub with string-table text joined after it, from the 2.1.316 shape) is split by read_bundle so that every JavaScript span parses. A test asserts the parser reports no unparsed module for it.
  • A test asserts that a genuinely unparseable module still makes keys_used read every name (the soundness rule in parser_reader.py is unchanged).
  • Parser-reader tests pass in CI with acorn required (INVENTORY_REQUIRE_ACORN: '1').
  • Host-run follow-up (label host-run on a separate check, not this PR): inventory.py --reader compare --self-check on the current build reports all modules parsing, and Explore/Plan disallowed_tools read literal with 9 names, or the comment names the next blocker.

This was generated by AI.

Activity

  1. added
    agent-ready
    on Nov 2, 2026
  2. added
    needs-triage
    on Nov 2, 2026
  3. github-actions commented on Nov 2, 2026

    @github-actions
    Contributor
    No description provided.
  4. github-actions commented on Nov 2, 2026

    @github-actions
    Contributor

    Proposed work class: work-class: scoped
    Basis: automated intake triage; the lanes App applied this class.

    Size: Small
    Complexity: Low
    Uncertainty: Known
    Flags: none
    Blocked by: none

    Decision recorded.

    PR #12293 delivered the first three done-when items. read_bundle leaves Bun's // @​bun stub out of the module spans when it sits outside the decoded module graph. It does not split the span: the issue marked the split pointer UNVERIFIED, and the PR explains that a trial-parse split would break the soundness rule.
    [quote truncated; the full decision is at the link]

    #12278 (comment)

    The decision settles the open questions. The first three done-when items were delivered in #12293. The only item left is the host-run check, which needs Claude Code on a host. That is routed to host-run, so nothing further is asked here.

    Automated triage, applied by the lanes App.

  5. added and removed
    needs-triage
    on Nov 2, 2026
  6. added
    status: ready
    on Nov 2, 2026
  7. github-actions commented on Nov 2, 2026

    @github-actions
    Contributor
    No description provided.
  8. melodic-automation-lanes commented on Nov 2, 2026

    @melodic-automation-lanes
    Contributor

    The lanes App's pull request #12293 merged with Refs:, so this issue stays open and nothing starts the lane on it again. work-unblock removed status: ready and agent-ready, so the hourly triage sweep sends it back to intake triage. Admission then parks it at status: confirmed for a check of what that pull request left, until a **Decision recorded.** comment says what is left or someone closes it.

  9. removed
    status: ready
    agent-ready
    on Nov 2, 2026
  10. 6 remaining items

  11. melodic-automation-lanes commented on Nov 2, 2026

    @melodic-automation-lanes
    Contributor

    The latest triage verdict holds nothing: admission moved the issue to status: confirmed; its comment says why.

  12. added
    host-run
    on Nov 2, 2026
  13. kyle-sexton commented on Nov 2, 2026

    @kyle-sexton
    MemberAuthor

    Decision recorded.

    PR #12293 delivered the first three done-when items. read_bundle leaves Bun's // @bun stub out of the module spans when it sits outside the decoded module graph. It does not split the span: the issue marked the split pointer UNVERIFIED, and the PR explains that a trial-parse split would break the soundness rule. test_the_parser_reports_no_unparsed_module asserts that no module is left unparsed, and test_an_unparsable_module_still_reads_every_name keeps the soundness rule. Both ran in the PR's CI with INVENTORY_REQUIRE_ACORN: 1 (test-python job: test_parser_reader.py 74 passed, pytest exit 0). Only the host-run check is left. It needs Claude Code installed on a host, and no comment shows its output.

    Route: host-run

    Acceptance criteria:

    • inventory.py --reader compare --self-check on the current build reports all modules parsing, and Explore/Plan disallowed_tools read literal with 9 names, or the comment names the next blocker.

    Posted by the issue-triage session. This was generated by AI.

  14. added
    needs-triage
    and removed
    status: confirmed
    needs-triage
    on Nov 2, 2026
  15. added
    status: ready
    on Nov 2, 2026
  16. added
    status: confirmed
    and removed
    status: ready
    on Nov 2, 2026
  17. kyle-sexton commented on Nov 2, 2026

    @kyle-sexton
    MemberAuthor

    Host run (Lane 5): every module now parses. Explore and Plan still read partial, and the next blocker is named below. Done-when met under its "or the comment names the next blocker" clause.

    Run: Claude Code 2.1.316 (~/.local/share/claude/versions/2.1.316) on melo-lap-001 WSL. The scripts came from origin/main at 2f177e3. The command was inventory.py --reader compare --self-check, which exited 3 (DEGRADED):

    reader compare: ok, 2615 of 2615 modules parse
    lane builtin_agents: degraded
    

    #12293's fix holds: no module is left unparsed. Explore and Plan both report "disallowed_tools": ["Agent","ExitPlanMode","Edit","Write","NotebookEdit"] with "disallowed_tools_source": "partial". That is 5 names, against 9 expected.

    Next blocker: the ...sY spread's elements do not resolve. Both agents declare the same list in the bundle:

    disallowedTools:[mt,...sY,my,at,Xt,Pi]
    

    The five plain identifiers resolve. sY is bound at offset 7677511 inside a single var statement: var jt="Artifact",…,Xp="ArtifactComments",Ku="ArtifactData",QH="ArtifactCheck",sY=[jt,Xp,Ku,QH]. Its four elements would make the list the expected 9 names. A second, unrelated sY=p(()=>…) binding sits at offset 8182124, in another module.

    What I checked on this build:

    • _spread_array(src, braces, "sY", use) returns the [ of [jt,Xp,Ku,QH] (7677514) for all four ...sY uses, and _written_elsewhere is False. The spread lookup itself is sound.
    • The failure is therefore in resolving that array's elements on the recursive _array_names call (inventory.py:3996-4003), where jt, Xp, Ku and QH are string constants. UNVERIFIED: which gate in resolve_tool_ident refuses them. My direct probe built its index with build_const_index, which is not necessarily the one the live run uses, so its None results are not proof.

    Pursuing this on #5901, which owns the goal of reading Explore and Plan literal.

    This was generated by AI.

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

    host-runstatus: confirmed

    Type

    Fields

    Work status

    confirmed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions