Skip to content

fix(validator): truncate long stdout lines to prevent oversized reports#363

Open
xdu31 wants to merge 1 commit intoNVIDIA:mainfrom
xdu31:validation-output-truncate
Open

fix(validator): truncate long stdout lines to prevent oversized reports#363
xdu31 wants to merge 1 commit intoNVIDIA:mainfrom
xdu31:validation-output-truncate

Conversation

@xdu31
Copy link
Contributor

@xdu31 xdu31 commented Mar 12, 2026

Summary

Truncate individual stdout lines exceeding 512 characters in validation reports. Prevents oversized CTRF output from inline JSON payloads (e.g., 8.4KB single-line Prometheus metric responses from ai-service-metrics).

Changes

File Change
pkg/defaults/timeouts.go Add ValidatorMaxStdoutLineLength = 512 constant
pkg/validator/job/result.go Add filterStdoutLines() to truncate long lines; wire into ExtractResult and HandleTimeout
pkg/validator/job/result_test.go Table-driven tests for filterStdoutLines

Test plan

  • go test -race ./pkg/validator/job/... passes
  • golangci-lint run clean

🤖 Generated with Claude Code

@xdu31 xdu31 requested a review from a team as a code owner March 12, 2026 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant