Repository navigation
fix(automation): read probe counts from a JSON file, never parsed logs - #109
Merged
Merged
Conversation
The health-check workflow derived its dead/degraded counts by keeping everything from the first line that opened a brace in the probe's stdout. The probe prints its summary lines after the JSON object, so the captured file ended with prose and the annotation step failed to parse it — which turned an otherwise healthy run red. The probe now writes the same object to the path given by --json-output, so the workflow reads a bare JSON document. The annotation step also treats an unreadable or non-numeric count as zero instead of failing the job: an annotation must never decide the run's status.
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.
Follow-up to #108: the first dispatched health-check run on
mainwent red in the annotation step.Cause
The workflow kept everything from the first line beginning with
{in the probe's stdout. The probe prints its degraded-model summary lines after the JSON object, so the captured file was JSON followed by prose andJSON.parsefailed. The probe step itself passed (exit 0, no dead model), and the annotation step turned a healthy run into a failure.Fix
--json-output <file>; the workflow reads that bare file and no longer parses logs.--json-outputis set (real daemon, stubbed upstream).Verification
npx tsc --noEmitclean; targeted suites 29/29 pass.dead=0,degraded=2(longcat402 retried → unavailable,flint-40bone probe-cap timeout → inconclusive), annotation reads2from the JSON file.