Repository navigation
Include error-only groups in JSON reports - #6149
Closed
derekxmartin wants to merge 2 commits into
Closed
derekxmartin wants to merge 2 commits into
derekxmartin wants to merge 2 commits into
Conversation
derekxmartin
marked this pull request as ready for review
October 20, 2026 01:41
stamparm
added a commit
that referenced
this pull request
Oct 20, 2026
Member
|
Thank you for the report. We made our own version. Each target in the report now carries its URL, so failed targets show up with their errors instead of as anonymous error-only groups. |
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.
writeReportJson collects target IDs from data, but errors can be stored under an active target ID with no data rows. That leaves the target out of the report. For example, if target 1 has results and target 2 has only an error, the report includes target 1 and drops target 2.
This change collects IDs from both data and errors, so both groups are included. Ordering, deduplication, report assembly, and the empty-report fallback are unchanged. The docstring clarifies the existing format. One group produces a flat report; multiple groups use targets. Recovering an omitted group can therefore change a report from flat to targets.
Error-only groups still have no URL identity, and global errors under ID 0 are not reassigned to another target.
The patch makes one functional query change in api.py and adds 10 tests in test_report.py. On native Windows, all 17 existing report tests passed. Before the fix, four new tests failed and six passed. Afterward, all 27 passed. Testing used synthetic in-memory SQLite data and temporary JSON files, with network and subprocess calls blocked. No scans or full-project CI were run.