Skip to content

analyze-javascript-application: unreadable_output '/label (too_small)' on a Vite bundle containing SheetJS (xlsx) #861

Closed

Description

@DariuszCiesielski

Summary

analyze-javascript-application on a plain Vite/React production build (dist/, 2.9 MB, ~25 JS chunks) fails deterministically with:

"code": "unreadable_output", "reason": "Result schema rejected 1 issue at /label (too_small)"

The analysis completes (~16 s), but REA builds a graph node with an empty label and then rejects its own result against the output schema (min(1) on label). No partial output, no hint which file caused it.

Reproduction

  • npx -y rea-agents@4.1.0 analyze-javascript-application ./dist --artifact-format directory --format json
  • macOS (Apple Silicon), Node 25.6.1 (outside the supported range ^22.19 || ^24.11 || >=26 — noted; the failure looks logical, not version-dependent, but I could not verify on Node 22/24).
  • Target: Vite 5 build of a React SPA. Same result via MCP (rea-agents mcp wired into Codex CLI).

Bisection over the chunks (5 steps, running REA on subsets) isolates one file: a ~1 MB chunk that bundles SheetJS (xlsx). Remove that single chunk and the /label error disappears (the remaining large chunk then hits #623 instead). Any Vite project that imports xlsx should reproduce this; I cannot share the exact bundle (client code), but the offending content is the public xlsx library.

Expected

Either (a) the graph builder never emits an empty label (fallback like <anonymous> / unknown), or (b) the schema violation is reported with the file/node that produced it, so the user can exclude it, or (c) the result is returned with the offending node dropped and a warning — anything but a total failure on one third-party library.

Observed side note

On the 12 small chunks (312 KB) where analysis succeeds, the JSON result is 254 MB (~800× input), 50 968 nodes, 6 853 unknowns. A 4-line test file yields 106 KB. This makes the tool hard to use on ordinary web bundles even when it does not fail.

Activity

  1. kaoru0822-kitauji commented on Oct 7, 2026

    @kaoru0822-kitauji
    Collaborator

    This looks fixed on main by #839, which is not in a release yet. A single empty string literal, such as fetch("") or x.getItem(""), became an empty graph label and failed validation at /label. SheetJS has many such literals. main now shows that label as "" and keeps the exact empty value in the observation properties.

    I checked with the public xlsx@0.18.5 package bundled by Vite (import * as XLSX from "xlsx"; window.XLSX = XLSX;, 425 KB chunk). main returns a schema-valid result with no /label error. That result is about 78M tokens, so the output-size side note (#623) is still open.

  2. kaoru0822-kitauji commented on Oct 7, 2026

    @kaoru0822-kitauji
    Collaborator

    Closing as fixed on main by #839, after 4.1.0, as confirmed above with a Vite-bundled xlsx@0.18.5 chunk. An empty string literal, such as fetch(""), gets the display label "". The exact empty value stays in the observation properties, so the result now passes schema validation at /label.

    The output-size side note is tracked in #623. This fix ships in the next release (release PR #771).

  3. added
    enhancement
    area: mcp
    on Oct 12, 2026
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

    area: mcpenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions