Repository navigation
fix(config): reject report formats the runner would ignore - #410
Merged
Merged
Conversation
Walternater
requested review from
JHWang-1997,
hittyt and
zpzjzj
as code owners
November 14, 2026 18:36
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
report.formatsaccepted any string. An unknown value passed validation and the runner then skipped it without a word, while still printing✅ Reports saved to …— so a typo (formats: [htlm]) looked like a successful run that wrote a report, and wrote none. Validation now rejects values other thanjson,junit,html, and the runner returns an error if an unsupported format reaches it without going through validation.Related issues
Same class as #365 / #409 (configuration validation accepting values the runtime cannot honour). No issue tracks this one; the check is independent.
Changes
internal/config/validator.go: newvalidateReportFormats, called fromValidateEvalConfig. Blank entries reportreport.formats[%d] must not be empty; unknown entries reportreport.formats[%d] must be one of json, junit, html (got %q).internal/runner/runner.go:writeFormattedReportsgains adefaultbranch returningunsupported report format %q (supported: json, junit, html), so a library caller constructing formats in code cannot recreate the silent skip.internal/config/validator_test.go: three table cases — supported values still accepted,[json, bogus]rejected with the exact message,[""]rejected.internal/runner/runner_test.go:TestRunner_WriteResults_RejectsUnknownReportFormatrunsWriteResultswith[]string{"bogus"}and asserts the error.docs/guide/writing-evals.md,docs/zh/guide/writing-evals.md: the report block now says onlyjson/junit/htmlare accepted and why.CHANGELOG.md: entry under Unreleased/Fixed.Test plan
On a fixture with
report.formats: [bogus](engineclaude_code,environment.type: none):validateprinted✓ eval.yaml is valid;runfinished1 passedand printed✅ Reports saved, but onlyresult.json/benchmark.json/benchmark.mdexisted — noreport.json.validate→Error: validation failed: validation errors:\n - report.formats[0] must be one of json, junit, html (got "bogus");runfails with the same validation error before starting the agent.formats: [json, html]still produces bothreport.jsonandreport.html.validateReportFormatscall turns the two new validator subtests red; deleting the runnerdefaultturns the runner test red (WriteResults() accepted an unsupported report format).make testgreen;make verify→0 issues.Notes
Adjacent finding, not changed here:
report.artifactsis documented (internal/config/schema.go:294, examples useartifacts: [transcript]) but has no runtime consumer — transcripts are always captured. That one needs a decision (wire it up, validate it, or remove it) rather than a silent fix, so it stays out of this PR.Disclosure
Investigated and implemented with DeepSeek Harness (
deepseek-v4.1-flash). The fixture, before/after CLI output and negative controls above were run locally on macOS.