Skip to content

[Provider diagnostics] Preserve both process streams on batch failure #169

Description

@samchon

Problem

BatchGraphSession drops a batch producer's stdout whenever stderr contains
any text. Build wrappers legitimately divide their output across both streams,
so a benign notice on stderr can hide the only actionable failure on stdout.

The Gson index-time cell in run 33377586947 is the concrete reproduction.
javac-graph exited with code 1. The retained message consists only of three
Picked up JAVA_TOOL_OPTIONS notices from stderr, although scip-java runs a
real Maven build whose failure summary is written to stdout. The current
failureDetail returns stderr immediately when it is non-empty and consults
the bounded stdout tail only when stderr is empty.

Consequence surface

The shared session owns every one-shot SCIP, sidecar, Go, Lua, and Java process.
The defect affects CLI errors, strict-provider fallback warnings, resident
retry diagnosis, experiment artifacts, and index-time logs. It is not specific
to Gson or Maven.

Stdout can also be an artifact channel and both streams may be large. A fix
must retain bounded diagnostic tails without embedding an artifact or allowing
failure output to grow without limit.

Approach

Preserve separately attributed, bounded tails for both non-empty streams. A
stderr-only or stdout-only failure remains concise. When both are non-empty,
include both labels and tails under one fixed total diagnostic budget, favoring
the end of each stream because build tools print their verdict last.

Acceptance and verification

  • A producer with a benign stderr notice and a stdout failure retains both and
    identifies which stream supplied each text.
  • Existing stderr-only, stdout-only, silent, short-output, long-output,
    cancellation, output-limit, and process-tree cleanup behavior remains
    covered.
  • Truncation is explicit only when bytes were omitted, and the combined message
    has a fixed upper bound.
  • Successful artifact stdout is never copied into a diagnostic.
  • The next Gson run exposes the actual Maven cause if the route still fails.
  • The focused BatchGraphSession/SCIP tests, pnpm build, pnpm test, and
    pnpm coverage pass on the same head.

Coordination

This issue improves the evidence needed to finish #74 but does not close Java's
semantic, fixture, JDT, or performance acceptance items by itself.

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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions