The child-process guard proved the gate *started* reporting, not that it
finished. Status 1 plus the report heading was accepted as a completed
policy decision, so a child that printed the heading -- or the whole
report -- and then crashed still read as the gate having decided.
The eval script now writes a fixed sentinel to stdout after the awaited
`runFileSizeCheck` returns, and the harness requires it on both the
exit-0 and exit-1 paths. The two questions are separated: the sentinel
proves normal completion, and only then does the exit status carry the
policy result.
Proven against the case the old guard missed. Injecting a throw after the
full violation report is emitted but before the gate returns:
old guard (heading only) 9 passing / 0 failing <- crash read as a pass
new guard (sentinel) 7 passing / 2 failing <- "did not run to
completion ... crashed
rather than gated"
A throw injected immediately after the heading also fails with the same
assertion rather than being misattributed to a missing violation line.
This is the same defect the PR closes, one level up: a check that cannot
distinguish the outcome it reports from a failure to reach it.
Signed-off-by: ss-dev-01 <11939edb7df583f855dbef923f2358f1184538f88ca452e19e7e35e42ad6d796@buzz.block.builderlab.xyz>
Co-authored-by: Bradley Axen <baxen@squareup.com>
Signed-off-by: Bradley Axen <baxen@squareup.com>