fix(core): count sectioned outputs as outputs - #257
Merged
Conversation
CompiledReport.OutputCount returned Outputs.Count, excluding SectionedOutputs, and OutputFormats listed only the plain outputs' formats. Both collections produce a delivered artifact, so a report with one plain and one sectioned output looked single-output. The API's sync mode supports single-output reports only and guards on OutputCount, so it accepted such a report; the runner then wrote both files and the endpoint streamed artifacts[0] — the caller silently received one of the two, and which one depended on directory-enumeration order. GET /reports under-reported the same report's formats. Count and list both kinds, so the guard rejects what its own message says it rejects. Covered by a test verified to fail against the old accessor.
|
|
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.



What
CompiledReport.OutputCountreturnedOutputs.Count, excludingSectionedOutputs;OutputFormatslisted only the plain outputs' formats. Both collections produce a delivered artifact, so a report with one plain and one sectioned output looked single-output.Consequences:
OutputCount, so it accepted such a report. The runner then wrote two files and the endpoint streamedartifacts[0]— the caller silently received one of the two, and which one depended on directory-enumeration order.GET /reportsandGET /reports/{name}under-reported the same report's formats.Counting and listing both kinds makes the guard reject exactly what its own message already claims it rejects: "Synchronous mode supports single-output reports only."
Verification
Sectioned_outputs_are_counted_and_listed_alongside_plain_ones— verified to fail against the old accessor.Found by the API-layer bug hunt; the remaining findings are in
docs/STATUS-AND-BACKLOG.md§6.