Skip to content

fix(sdk): report the OpenTofu diagnostics that fit in an error - #14420

Merged
cv merged 3 commits into
v1from
cv/diagnostics-that-fit
Nov 11, 2026
Merged

cv merged 3 commits into
v1from
cv/diagnostics-that-fit

Conversation

@cv

@cv cv commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

The error of a failed OpenTofu command now lists the whole diagnostics that fit in its 16 KiB, the next one's summary, and how many it left out, instead of replacing them all with child output exceeds the supported limit, so nemoclaw plan and apply show the errors of a large plan or of several failed managed services.

Problem

crates/nemoclaw-sdk/src/process.rs joined each diagnostic's summary and detail into one message; once the next text would pass 16384 bytes, the whole message became child output exceeds the supported limit. A 31-sandbox plan with no gateway running reported only that, and several managed services whose stop details carry up to 4 KiB of vLLM output (#14397) can cross the limit together.

Resolves #14399.
Part of #14403: this is its diagnostics change; the sandbox cap and the per-sandbox attachment count are separate changes, and the live apply of 256 sandboxes is still to be recorded.

Change

  • The error keeps whole diagnostics, in order, while they and the final marker fit in 16 KiB.
  • The first diagnostic that doesn't fit keeps its summary, so a late error still shows after many warnings. Its detail is cut only when the diagnostic is longer than 16 KiB: then it keeps the whole lines that fit, or, for a single long line, as much of the line as fits.
  • One marker ends a shortened error, such as [rest of this diagnostic and 2 more diagnostics left out to keep this error within 16 KiB; fix these and rerun to see the rest]. NemoClaw has no option that prints the rest, so the marker gives only the count.
  • Each diagnostic is redacted before it is measured or cut, so a cut can't leave the start of a credential, and credentials that grow to [redacted] still fit. Diagnostics past the cut aren't redacted, since they aren't shown. The short-credential rule is unchanged.
  • Child output cut at its capture limit, stderr past 16 KiB or stdout past 64 MiB, still reports child output exceeds the supported limit: cut stderr can end inside a credential.
  • The CLI renders the message unchanged: line by line in text, and as error.message in JSON.
  • docs/resources/limits.md lists both bounds as design limits; docs/agents-inference/models.md and the release notes describe the new error.

Errors aren't listed before warnings; diagnostics keep OpenTofu's order.

Past 16 KiB of OpenTofu diagnostics, the SDK replaced them all with
"child output exceeds the supported limit". It now keeps the whole
diagnostics that fit, in order, and counts the rest; a diagnostic longer
than the limit keeps its summary and the whole lines of its detail that
fit. Each diagnostic is redacted before any cut.

Part of #14403; resolves #14399.

Signed-off-by: Carlos Villela <[email protected]>
@cv

cv commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator Author
Authoring session — opening
Field Status Value Evidence or limit
Harness partial pi 1.5.0 (session format 3) Session header gives the format; the version comes from the harness install path in the injected instructions, not from session metadata
Skills recorded test-driven-development (complete read); write-tests (complete read); terminal-ux (complete read); nemoclaw-contributor-create-pr (complete read) Tool results to cutoff
Instruction files recorded AGENTS.md (injected); WRITING.md (complete read); .github/PULL_REQUEST_TEMPLATE.md (complete read); .github/SESSION_REPORT_TEMPLATE.md (complete read) Startup injection and tool results to cutoff; internal-docs/contributing/testing.md and documentation-build.md were read only in part
Tool calls partial typescript: 44 (1 failed) Wrapper calls to cutoff; nested workspace, shell, and git calls inside each program are not recorded separately
Session window recorded 2026-11-11T18:43Z to 2026-11-11T19:07Z; 24 min First event to cutoff, including idle time; a helper session started for this task only
Compactions recorded 0 Complete record to cutoff
Models recorded azure/anthropic/claude-opus-5-5 (nvidia-internal) Model change at session start; no later changes
Reasoning levels recorded high Thinking-level change at session start; no later changes

@github-actions

Copy link
Copy Markdown
Contributor

Review follow-up: the first diagnostic that doesn't fit keeps its
summary, a single-line oversized detail is cut inside the line, a cut
that would keep nothing counts the diagnostic instead, and one marker
ends the error. Captured-output overflow is checked first, and each
diagnostic is redacted only when reached.

Signed-off-by: Carlos Villela <[email protected]>
@cv

cv commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator Author
Authoring session — review follow-up at db4bc26
Field Status Value Evidence or limit
Harness partial pi 1.5.0 (session format 3) Session header gives the format; the version comes from the harness install path in the injected instructions, not from session metadata
Skills recorded test-driven-development (complete read); write-tests (complete read); terminal-ux (complete read); nemoclaw-contributor-create-pr (complete read) Tool results to cutoff; no further skills read after the opening report
Instruction files recorded AGENTS.md (injected); WRITING.md (complete read); .github/PULL_REQUEST_TEMPLATE.md (complete read); .github/SESSION_REPORT_TEMPLATE.md (complete read) Startup injection and tool results to cutoff; internal-docs/contributing/testing.md and documentation-build.md were read only in part
Tool calls partial typescript: 78 in the session (2 failed), 34 since the opening report (1 failed) Wrapper calls to cutoff; nested workspace, shell, and git calls inside each program are not recorded separately
Session window recorded 2026-11-11T18:43Z to 2026-11-11T19:34Z; 51 min First event to cutoff, including idle time; the review findings arrived at 19:18Z
Compactions recorded 0 Complete record to cutoff; two harness context edits removed entries without a summary
Models recorded azure/anthropic/claude-opus-5-5 (nvidia-internal) Model change at session start; no later changes
Reasoning levels recorded high Thinking-level change at session start; no later changes

The mix test ran over its time budget at 16 KiB. It now runs at 256 and
512 bytes and sweeps the first diagnostic from one that leaves no room
for the next. The sweep found a cut that kept only the summary's line
break; trailing whitespace is now dropped from a cut.

Signed-off-by: Carlos Villela <[email protected]>
@cv
cv enabled auto-merge (squash) November 11, 2026 19:53
@cv
cv merged commit b094027 into v1 Nov 11, 2026
64 checks passed
@cv
cv deleted the cv/diagnostics-that-fit branch November 11, 2026 20:02
cv added a commit that referenced this pull request Nov 11, 2026
Brings in #14420 without conflicts. The schema and the intent record's
fingerprint are unchanged by it; the record stays version 21.

Signed-off-by: Carlos Villela <[email protected]>
@wscurran wscurran added area: observability Logging, metrics, tracing, diagnostics, or debug output area: security Security controls, permissions, secrets, or hardening bug-fix PR fixes a bug or regression v1 NemoClaw v1 branch labels Nov 12, 2026
@cv cv added this to the Roadmap: GTC DC 2026 milestone Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: observability Logging, metrics, tracing, diagnostics, or debug output area: security Security controls, permissions, secrets, or hardening bug-fix PR fixes a bug or regression v1 NemoClaw v1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants