Repository navigation
Polish threat detection error warnings - #74177
Conversation
Co-authored-by: pelikhan <[email protected]>
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Code Quality Reviewer completed the code quality review. Warning Threat detection engine error Threat detection could not complete its analysis due to a tooling error. This is not a security finding. What happenedThe threat detection engine failed to produce results. Review the workflow run logs to troubleshoot the error.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅ Warning Threat detection engine error Threat detection could not complete its analysis due to a tooling error. This is not a security finding. What happenedThe threat detection engine failed to produce results. Review the workflow run logs to troubleshoot the error.
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Design Decision Gate 🏗️Outcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Test Quality Sentinel completed test quality analysis. Warning Threat detection engine error Threat detection could not complete its analysis due to a tooling error. This is not a security finding. What happenedThe threat detection engine failed to produce results. Review the workflow run logs to troubleshoot the error. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
Warning Threat detection engine error Threat detection could not complete its analysis due to a tooling error. This is not a security finding. What happenedThe threat detection engine failed to produce results. Review the workflow run logs to troubleshoot the error. Comment MemoryPeek at saved memory (pr-code-quality-reviewer)Note This comment is managed by comment memory.Expand the saved memory block to view or edit the persistent context for this thread.
|
There was a problem hiding this comment.
Warning
Threat detection engine error
Threat detection could not complete its analysis due to a tooling error. This is not a security finding.
What happened
The threat detection engine failed to produce results.
Review the workflow run logs to troubleshoot the error.
Review summary
One non-blocking consistency issue was identified: the fallback review-PR body does not apply the updated warning presentation used by the shared template. See the inline comment for the surgical fix.
The specialist pass completed; no additional actionable findings were retained.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⊞ 1.7K
Comment /review to run again
| admonition: "WARNING", | ||
| title: "threat detection engine error", | ||
| summary: "The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.", | ||
| title: "Threat detection engine error", |
There was a problem hiding this comment.
The shared title now claims the polished presentation, but the fallback review-PR path renders this value as plain text, so it still omits the new bold emphasis (and retains its separate old log-link wording). This leaves engine-error warnings inconsistent across output surfaces.
💡 Keep fallback output aligned
Update the fallback PR-body formatter (or add a shared formatter) so it applies the same title/summary/link presentation as the template, and add an assertion against the fallback body rather than only checking a substring.
There was a problem hiding this comment.
🟡 Changes recommended
Active moderate and critical findings show that the updated warning formatting is not consistently implemented or covered by passing tests, including an unbolded agent-failure request and outdated fallback expectations.
2 open issues
What changed in this PR
This pull request improves the readability and consistency of threat-detection tooling-failure warnings while preserving warning severity and machine-readable distinctions from security findings.
Changes:
- Capitalizes and emphasizes the tooling-error title.
- Shortens the explanatory copy and makes workflow-log guidance actionable.
- Updates specifications, documentation, templates, previews, fixtures, and regression expectations.
- Two unresolved issues affect fallback review-PR formatting and activation-comment test expectations.
| File | Description |
|---|---|
docs/src/content/docs/specs/safe-outputs-specification.md |
Updates the WTD1a warning specification and expected label. |
docs/src/content/docs/reference/threat-detection.md |
Aligns reference documentation with the revised warning label. |
actions/setup/md/threat_detection_engine_error.md |
Revises the shared tooling-error warning template. |
actions/setup/js/update_activation_comment.test.cjs |
Updates activation-comment warning expectations. |
actions/setup/js/threat_detection_warning.test.cjs |
Expands regression coverage for tooling-failure reasons and revised copy. |
actions/setup/js/threat_detection_warning.cjs |
Updates centralized tooling-failure presentation fields. |
actions/setup/js/testdata/messages_preview.md |
Refreshes generated message and template previews. |
actions/setup/js/push_to_pull_request_branch.test.cjs |
Updates review-PR warning expectations; fallback formatting remains inconsistent. |
actions/setup/js/messages.test.cjs |
Verifies revised warning formatting and troubleshooting guidance. |
actions/setup/js/handle_agent_failure.test.cjs |
Updates the embedded tooling-error template fixture. |
actions/setup/js/generate_footer.test.cjs |
Updates footer warning expectations. |
This pull request requires changes.
Review effort: Lite (auto)
| }), | ||
| it.each([ | ||
| ["agent_failure", "> threat detection engine error", "<!-- gh-aw-threat-engine-error -->", "<!-- gh-aw-threat-detected -->"], | ||
| ["agent_failure", "> **Threat detection engine error**", "<!-- gh-aw-threat-engine-error -->", "<!-- gh-aw-threat-detected -->"], |
| ["warning", "agent_failure", "> [!WARNING]", "> Threat detection engine error", "<!-- gh-aw-threat-engine-error -->", "<!-- gh-aw-threat-detected -->"], | ||
| ["warning", "threat_detected", "> [!CAUTION]", "> agentic threat detected", "<!-- gh-aw-threat-detected -->", "<!-- gh-aw-threat-engine-error -->"], | ||
| // Warn-mode detection engine failure as concluded by threat-detect v0.5.2 (run 39191157830). | ||
| ["failure", "agent_failure", "> [!WARNING]", "> threat detection engine error", "<!-- gh-aw-threat-engine-error -->", "<!-- gh-aw-threat-detected -->"], | ||
| ["failure", "parse_error", "> [!WARNING]", "> threat detection engine error", "<!-- gh-aw-threat-engine-error -->", "<!-- gh-aw-threat-detected -->"], | ||
| ["failure", "agent_failure", "> [!WARNING]", "> Threat detection engine error", "<!-- gh-aw-threat-engine-error -->", "<!-- gh-aw-threat-detected -->"], | ||
| ["failure", "parse_error", "> [!WARNING]", "> Threat detection engine error", "<!-- gh-aw-threat-engine-error -->", "<!-- gh-aw-threat-detected -->"], |
There was a problem hiding this comment.
Warning
Threat detection engine error
Threat detection could not complete its analysis due to a tooling error. This is not a security finding.
What happened
The threat detection engine failed to produce results.
Review the workflow run logs to troubleshoot the error.
Skills-Based Review 🧠
Applied /codebase-design and /tdd. The copy and centralized presentation changes are consistent, but one engine-error surface was left behind.
📋 Key Themes & Highlights
Key Themes
- Incomplete surface update: The fallback review PR body in
actions/setup/js/push_to_pull_request_branch.cjs(around lines 1554-1560) is built fromgetThreatWarningPresentation(). It still interpolates an unbolded title with no blank>separator before the summary, and still says "for details". The PR goal of separating the title from the explanation is therefore not met on this path. - Title styling lives in two places: The shared
titleinthreat_detection_warning.cjsis plain text, while the markdown templates bold it. Consumers that interpolatetitledirectly (the fallback PR body) inherit the unbolded form. Decide whether the presentation should carry the emphasis, or whether each consumer should apply it. - Verification gap: JS dependencies are not installed in this environment, so I checked the changes by reading the diff and the consumers, not by running
vitest. The fixture snapshot (messages_preview.md) and string expectations look consistent with the templates.
Positive Highlights
- ✅ Warning severity and the
<!-- gh-aw-threat-engine-error -->marker are preserved, and the real-threat path stays on[!CAUTION]. - ✅ Centralizing title, summary, and marker in
getThreatWarningPresentationand loopingagent_failure/parse_errorin one test keeps the two tooling reasons in sync. - ✅ Docs (
threat-detection.md,safe-outputs-specification.md) and themessages_previewsnapshot were updated with the new wording.
@copilot please address the review comment above and bring the fallback review PR body in line with the template.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~4 AIC · ⊞ 5.4K
Comment /matt to run again
|
|
||
| it.each([ | ||
| ["warning", "agent_failure", "> [!WARNING]", "> threat detection engine error", "<!-- gh-aw-threat-engine-error -->", "<!-- gh-aw-threat-detected -->"], | ||
| ["warning", "agent_failure", "> [!WARNING]", "> Threat detection engine error", "<!-- gh-aw-threat-engine-error -->", "<!-- gh-aw-threat-detected -->"], |
There was a problem hiding this comment.
[/codebase-design] This expectation locks in an unemphasized > Threat detection engine error title in the fallback review PR body. That body is built in push_to_pull_request_branch.cjs (around lines 1554-1560), which this PR does not update: it still says "for details" and has no bold title or blank > separator, unlike the template and the other engine-error surfaces.
💡 Suggested fix
Emit > **${warning.title}** followed by a > separator line and the same troubleshooting copy as threat_detection_engine_error.md, or build the body from one shared source. Then update this expectation to > **Threat detection engine error** and assert the body does not contain for details.
@copilot please address this.
|
🎉 This pull request is included in a new release. Release: |


Generated threat detection errors use an uncapitalized title and dense, repetitive copy. This change improves readability while retaining the distinction between a tooling failure and a security finding.