Skip to content

fix: flush ci --json output before exiting - #153

Merged
asamassekou10 merged 1 commit into
asamassekou10:mainfrom
AlvaroBalbin:false-positive-benchmark-fails-fix
Aug 15, 2026
Merged

asamassekou10 merged 1 commit into
asamassekou10:mainfrom
AlvaroBalbin:false-positive-benchmark-fails-fix

Conversation

@AlvaroBalbin

Copy link
Copy Markdown
Contributor

The ci command wrote its --json report with console.log and then called process.exit() right after, but on a piped stdout large writes flush asynchronously, so exit could fire before the write finished and truncate the JSON - this is what broke the false-positive benchmark against the Hermes corpus. I changed it to wait for the pending write to actually complete before exiting, and added a regression test that scans a project with thousands of findings and confirms the JSON output parses in full.

Fixes #147.

I pushed this to my fork first and the project's own CI workflows pass on the commit.

@asamassekou10
asamassekou10 force-pushed the false-positive-benchmark-fails-fix branch from cf8ad10 to bf7da0b Compare August 15, 2026 08:46
@asamassekou10
asamassekou10 merged commit 63403a1 into asamassekou10:main Aug 15, 2026
@asamassekou10

Copy link
Copy Markdown
Owner

Thanks for the contribution, Alvaro. I rebased this onto the current main, kept your large-output regression test, and merged it with the bounded stdout handling already in place

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.

False-positive benchmark fails on truncated scanner JSON

2 participants