Skip to content

fix(core): count sectioned outputs as outputs - #257

Merged
thiagoluga merged 1 commit into
masterfrom
fix/sectioned-outputs-not-counted
Aug 3, 2026
Merged

fix(core): count sectioned outputs as outputs#257
thiagoluga merged 1 commit into
masterfrom
fix/sectioned-outputs-not-counted

Conversation

@thiagoluga

Copy link
Copy Markdown
Owner

What

CompiledReport.OutputCount returned Outputs.Count, excluding SectionedOutputs; 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.

Consequences:

  • The API's sync mode supports single-output reports only and guards on OutputCount, so it accepted such a report. The runner then wrote two 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 and GET /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

  • New Sectioned_outputs_are_counted_and_listed_alongside_plain_onesverified to fail against the old accessor.
  • Core 299 passed, AspNetCore integration 148 passed; full solution builds clean.

Found by the API-layer bug hunt; the remaining findings are in docs/STATUS-AND-BACKLOG.md §6.

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.
@sonarqubecloud

sonarqubecloud Bot commented Aug 3, 2026

Copy link
Copy Markdown

@sonarqubecloud

sonarqubecloud Bot commented Aug 3, 2026

Copy link
Copy Markdown

@thiagoluga
thiagoluga merged commit a39a140 into master Aug 3, 2026
5 checks passed
@thiagoluga
thiagoluga deleted the fix/sectioned-outputs-not-counted branch August 3, 2026 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant