Repository navigation
fix(#5705): run the post-script when the scan was the only failure - #2
Closed
andrewevansrh wants to merge 1 commit into
Closed
andrewevansrh wants to merge 1 commit into
andrewevansrh wants to merge 1 commit into
Conversation
… failure A failed output scan fails the run, and the gate that decides whether to run the post-script treated every scan failure as fatal to posting, so a completed review was thrown away because one unrelated file somewhere else under the run directory could not be sanitized. The gate now runs the post-script when a scan failure is the run's only failure and the harness result file survived the scan and still holds a JSON object. Causes are kept apart rather than flattened into one join: the scan and chain outcomes are carried in a postScanArtifactsError and the terminal outcome in a postScanError, so a run that also timed out, broke its audit chain or reported a transcript error keeps that cause's outcome, and a broken chain vetoes posting regardless of the scan. A result file the scan replaced with a fail-closed marker, or one the scan failed on and could not quarantine, is never posted. At quiet, the printed log counts the paths a failed scan could not handle instead of naming them (ADR 0163), and the completion comment does the same, since an output file name is the agent's to choose and Actions log masking does not apply to a comment. The run error and telemetry keep the path at every level. Signed-off-by: anevans <anevans@redhat.com>
3 tasks done
|
The agent could not start because of a token mint failure. |
Owner
Author
|
Moved to fullsend-ai#10085 so the stack lands upstream in order. Note: Generated with assistance from DeepSeek V4.1 Flash |
This branch was successfully deployed
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.
Summary
Part 3 of 3 split out of fullsend-ai#9699 (part 1: fullsend-ai#10082, part 2:
#1).
A failed output scan fails the run, and the gate that decides whether to run the
post-script treated every scan failure as fatal to posting, so a completed review
was thrown away because one unrelated file somewhere else under the run directory
could not be sanitized.
Base:
agent/5705-spanning-private-keys(part 2). Review the diff againstthat branch; only that delta is this PR. It is opened in the fork because a
stacked PR's base branch has to live in the repository the PR is opened in. This
one will be retargeted to
mainonce the two below it land.What changed
internal/cli/run.go: the gate runs the post-script when a scan failure isthe run's only failure and the harness result file (
agent-result.jsonbydefault) survived the scan and still holds a JSON object. Causes are kept apart
instead of flattened into one joined error —
postScanArtifactsErrorcarriesthe scan and chain outcomes and
postScanErrorthe terminal outcome — so a runthat also timed out, broke its audit chain or reported a transcript error keeps
that cause's outcome, and a broken chain vetoes posting regardless of the scan.
A result file the scan replaced with a fail-closed marker, or one the scan
failed on and could not quarantine, is never posted.
quiet: the printed log counts the paths a failed scan could not handleinstead of naming them (ADR 0163), and the completion comment does the same,
since an output file name is the agent's to choose and Actions log masking does
not apply to a comment. The run error and telemetry keep the path at every
level.
Verification
go test ./internal/cli(one unrelated pre-existing failure,TestPrepare_LocallyPresentImageSkipsPullButRunsPreflight, fails onmaintoo)go test ./internal/security/make lintNote: Generated with assistance from DeepSeek V4.1 Flash