Skip to content

Align conclude warn-mode tooling failures with gh-aw policy - #1328

Merged
davidslater merged 3 commits into
mainfrom
fix/conclude-warn-mode-tooling-failures
Oct 23, 2026
Merged

davidslater merged 3 commits into
mainfrom
fix/conclude-warn-mode-tooling-failures

Conversation

@davidslater

@davidslater davidslater commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

When detection execution fails, threat-detect conclude currently hard-fails tooling errors even in warn mode. This prevents direct consumers from receiving the warning conclusion required by gh-aw’s configured safe-output policy.

Update TD-20b, the corresponding usage clauses U-05a/U-19/U-20 and README environment guidance, and concluder.fail so warn-mode agent_failure and parse_error results emit conclusion=warning, preserve the reason and success=false, and exit 0. Strict mode continues emitting failure and exiting 1. Threat verdicts, mandatory validation, and status-to-reason mapping retain their existing behavior.

Update existing contract/unreadable-file expectations and add CLI parity coverage for default/explicit warn mode and strict mode, both execution outcomes, missing and malformed results, status-derived parse errors, threat verdicts, annotations, and exported environment values.

Validation: make fmt lint build test passed on main and on this branch; git diff --check passed. The branch validation was rerun with build-cache access after a sandbox permission error blocked test setup.

A detector release and separate gh-aw version/digest pin bump are follow-up work. This PR leaves the host compatibility wrapper and workflow locks unchanged.

Fixes #1326

Copilot AI max review requested due to automatic review settings October 22, 2026 21:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The normative usage specification and README still require the hard-failure behavior removed by this change.

1 open issue
What changed in this PR

Aligns threat-detect conclude with gh-aw’s warn-mode safe-output policy for direct consumers, addressing #1326.

Changes:

  • Warn-mode tooling failures now emit warnings and exit 0, preserving the reason and success=false; strict mode remains unchanged.
  • Updates TD-20b to match the revised conclusion policy.
  • Expands regression coverage for execution outcomes, reason classification, annotations, outputs, and exported environment values.
File Description
specs/​threat-detection-spec.md Defines warning behavior for failed execution in warn mode.
cmd/​threat-detect/​conclude.go Removes the execution-failure override from warn-mode conclusions.
cmd/​threat-detect/​conclude_test.go Updates expectations and adds environment-driven policy parity tests.

Review effort: Max

Comment thread specs/threat-detection-spec.md Resolved
@davidslater
davidslater merged commit 76da4b4 into main Oct 23, 2026
10 checks passed
@davidslater
davidslater deleted the fix/conclude-warn-mode-tooling-failures branch October 23, 2026 21:48
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.

Parity: align TD-20b and conclude with gh-aw warn-mode tooling failures

2 participants