ci: harden LLM output validation - #1565
Merged
Benoît Cortier (CBenoit) merged 2 commits intoAug 7, 2026
Merged
Conversation
Normalize quoted empty-string artifacts across automation validators and publish neutral classification checks with actionable failure reasons. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Benoît Cortier (CBenoit)
temporarily deployed
to
llm-providers
August 7, 2026 14:20 — with
GitHub Actions
Inactive
Benoît Cortier (CBenoit)
enabled auto-merge (squash)
August 7, 2026 14:21
Contributor
There was a problem hiding this comment.
Pull request overview
Hardens LLM output normalization and improves classification-failure diagnostics.
Changes:
- Canonicalizes literal
""artifacts while rejecting empty required prose. - Publishes neutral, SHA-bound checks for classification failures.
- Adds regression tests and documentation.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
.github/pr-automation/write-state.js |
Supports configurable check conclusions. |
.github/pr-automation/validation.js |
Normalizes quoted empty strings. |
.github/pr-automation/validate-reviewer.js |
Rejects empty finding rationales. |
.github/pr-automation/resolve-state.js |
Adds neutral failure diagnostics. |
.github/pr-automation/automation.test.js |
Covers normalization and check publication. |
.github/PR_AUTOMATION.md |
Documents failure behavior. |
Suppressed comments (1)
.github/pr-automation/resolve-state.js:132
- When the classification gate itself is unavailable,
labeler.yml:481-484still invokes this resolver while the classifier and semver jobs are skipped (labeler.yml:247-248,345-346).classifieris therefore"", so this branch publishesinvalid classifier object, incorrectly diagnosing a prerequisite outage as malformed model output. Pass the gate status/reason into this resolver and handle it before classifier validation so the advertised diagnostic is precise.
if (!classifierResult?.ok || classifierResult.value?.head_sha !== expectedSha) {
const reason = classifierResult?.reason || "classifier output unavailable";
return failedClassification(expectedSha, deterministic, reason, rateLimit, semverStatus);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Carry deterministic-analysis and classification-gate diagnostics into neutral classification checks instead of reporting generic or misleading failures. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Benoît Cortier (CBenoit)
temporarily deployed
to
llm-providers
August 7, 2026 14:25 — with
GitHub Actions
Inactive
Benoît Cortier (CBenoit)
disabled auto-merge
August 7, 2026 14:36
Benoît Cortier (CBenoit)
deleted the
cbenoit-harden-pr-classifier-output
branch
August 7, 2026 14:36
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.
A valid classifier result for PR #1564 was discarded because structured output represented an empty string as the literal text
"". That left the PR atrisk/unknownand hid the concrete validation failure from maintainers.This change canonicalizes that exact empty-string artifact in the shared text normalizer used by classifier, protocol-analysis, and reviewer outputs. Required prose still fails closed, while optional empty fields normalize consistently. Classification failures now publish a neutral SHA-bound
AI classificationcheck containing the precise validator or prerequisite reason, without opening the automated review gate.Regression coverage includes the PR #1564 payload, reviewer and protocol text behavior, and neutral diagnostic check publication.