Skip to content

threat-detection: suppress the unused setup prompt step summary on the external detector path - #50852

Merged
pelikhan merged 3 commits into
mainfrom
copilot/fix-external-path-prompt-summary
Aug 6, 2026
Merged

threat-detection: suppress the unused setup prompt step summary on the external detector path#50852
pelikhan merged 3 commits into
mainfrom
copilot/fix-external-path-prompt-summary

Conversation

Copilot AI commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

On the external detector path (features: gh-aw-detection: true), setup_threat_detection.cjs writes its rendered prompt to the job step summary, but threat-detect ignores GH_AW_PROMPT and renders its own embedded template — which, as of upstream --step-summary support, it also publishes to the summary. A single detection run therefore shows two different prompt blocks, one real and one fictional, which is actively misleading during incident review.

This implements option 2 from the issue (suppress just the summary write), leaving the setup step otherwise intact since it still exports GH_AW_PROMPT, GH_AW_DETECTION_CONTINUE_ON_ERROR, HAS_PATCH, and the workflow-context vars.

Changes

  • pkg/workflow/threat_detection_steps.gobuildThreatDetectionAnalysisStep emits GH_AW_DETECTION_SKIP_PROMPT_SUMMARY: "true" only when the gh-aw-detection feature flag is enabled. Inline path is untouched.
  • actions/setup/js/setup_threat_detection.cjs — gates the core.summary.addRaw(...).write() call on that flag, logging an info line instead. Prompt file write, GH_AW_PROMPT export, and artifact validation are unchanged.
  • Decision recorded — a comment at the step 6 call site notes that full removal of the setup step on the external path is deferred until threat-detection: workflow context and detection env vars never reach the external detector execution step #50649 and threat-detection: delegate all conclude branches to threat-detect conclude on the external path #50646 move its remaining responsibilities, at which point retirement becomes a clean deletion rather than a behavior-preserving refactor.
  • Tests — Go: flag present on the external path, absent on the inline path. Vitest: summary written by default, suppressed under the flag.
  • make recompile — 97 lock files pick up the new env var; inline-path locks are unaffected.

Generated diff on an external-detector workflow:

      - name: Setup threat detection
        env:
          WORKFLOW_NAME: "..."
          HAS_PATCH: ${{ needs.agent.outputs.has_patch }}
          GH_AW_DETECTION_CONTINUE_ON_ERROR: "true"
+         GH_AW_DETECTION_SKIP_PROMPT_SUMMARY: "true"

Note: make agent-report-progress fails in this sandbox at the eslint-factory TypeScript build (TS5108 moduleResolution=node10 has been removed) because eslint-factory/node_modules is not installed and a hoisted TypeScript 7 is resolved instead. Pre-existing and unrelated to these changes; Go and impacted JS tests pass.

Copilot AI and others added 2 commits August 6, 2026 12:43
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix unused prompt in step summary for external path threat-detection: suppress the unused setup prompt step summary on the external detector path Aug 6, 2026
Copilot AI requested a review from pelikhan August 6, 2026 12:55
@pelikhan
pelikhan marked this pull request as ready for review August 6, 2026 13:03
Copilot AI balanced review requested due to automatic review settings August 6, 2026 13:03
@pelikhan
pelikhan merged commit 67a2172 into main Aug 6, 2026
@pelikhan
pelikhan deleted the copilot/fix-external-path-prompt-summary branch August 6, 2026 13:03

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

An unrelated skill-routing behavior change should be removed or split from the focused threat-detection fix.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

Suppresses the unused setup prompt summary for external threat detection while preserving inline behavior.

Changes:

  • Adds and consumes an external-path summary-suppression flag.
  • Adds Go/JavaScript coverage and regenerates 97 workflow locks.
  • Includes an unrelated agentic-workflows skill routing change.
File summaries
File Description
pkg/workflow/threat_detection_steps.go Emits suppression flag externally.
pkg/workflow/threat_detection_test.go Tests path-specific flag emission.
actions/setup/js/setup_threat_detection.cjs Gates prompt summary output.
actions/setup/js/setup_threat_detection.test.cjs Tests default and suppressed output.
.github/skills/agentic-workflows/SKILL.md Adds unrelated designer mapping route.
.github/workflows/typist.lock.yml Regenerates suppression environment.
.github/workflows/test-quality-sentinel.lock.yml Regenerates suppression environment.
.github/workflows/prompt-clustering-analysis.lock.yml Regenerates suppression environment.
.github/workflows/pr-sous-chef.lock.yml Regenerates suppression environment.
.github/workflows/pr-description-caveman.lock.yml Regenerates suppression environment.
.github/workflows/pr-code-quality-reviewer.lock.yml Regenerates suppression environment.
.github/workflows/mattpocock-skills-reviewer.lock.yml Regenerates suppression environment.
.github/workflows/issue-monster.lock.yml Regenerates suppression environment.
.github/workflows/impeccable-skills-reviewer.lock.yml Regenerates suppression environment.
.github/workflows/github-remote-mcp-auth-test.lock.yml Regenerates suppression environment.
.github/workflows/github-mcp-structural-analysis.lock.yml Regenerates suppression environment.
.github/workflows/example-workflow-analyzer.lock.yml Regenerates suppression environment.
.github/workflows/duplicate-code-detector.lock.yml Regenerates suppression environment.
.github/workflows/docs-noob-tester.lock.yml Regenerates suppression environment.
.github/workflows/detection-analysis-report.lock.yml Regenerates suppression environment.
.github/workflows/design-decision-gate.lock.yml Regenerates suppression environment.
.github/workflows/daily-token-consumption-report.lock.yml Regenerates suppression environment.
.github/workflows/daily-testify-uber-super-expert.lock.yml Regenerates suppression environment.
.github/workflows/daily-repo-chronicle.lock.yml Regenerates suppression environment.
.github/workflows/daily-rendering-scripts-verifier.lock.yml Regenerates suppression environment.
.github/workflows/daily-reliability-review.lock.yml Regenerates suppression environment.
.github/workflows/daily-performance-summary.lock.yml Regenerates suppression environment.
.github/workflows/daily-observability-report.lock.yml Regenerates suppression environment.
.github/workflows/daily-news.lock.yml Regenerates suppression environment.
.github/workflows/daily-multi-device-docs-tester.lock.yml Regenerates suppression environment.
.github/workflows/daily-model-resolution.lock.yml Regenerates suppression environment.
.github/workflows/daily-model-inventory.lock.yml Regenerates suppression environment.
.github/workflows/daily-mcp-concurrency-analysis.lock.yml Regenerates suppression environment.
.github/workflows/daily-max-ai-credits-test.lock.yml Regenerates suppression environment.
.github/workflows/daily-issues-report.lock.yml Regenerates suppression environment.
.github/workflows/daily-hippo-learn.lock.yml Regenerates suppression environment.
.github/workflows/daily-graft-intelligence.lock.yml Regenerates suppression environment.
.github/workflows/daily-geo-optimizer.lock.yml Regenerates suppression environment.
.github/workflows/daily-function-namer.lock.yml Regenerates suppression environment.
.github/workflows/daily-formal-spec-verifier.lock.yml Regenerates suppression environment.
.github/workflows/daily-file-diet.lock.yml Regenerates suppression environment.
.github/workflows/daily-fact.lock.yml Regenerates suppression environment.
.github/workflows/daily-experiment-report.lock.yml Regenerates suppression environment.
.github/workflows/daily-evals-report.lock.yml Regenerates suppression environment.
.github/workflows/daily-elixir-credo-snippet-audit.lock.yml Regenerates suppression environment.
.github/workflows/daily-doc-updater.lock.yml Regenerates suppression environment.
.github/workflows/daily-doc-healer.lock.yml Regenerates suppression environment.
.github/workflows/daily-credit-limit-test.lock.yml Regenerates suppression environment.
.github/workflows/daily-compiler-threat-spec-optimizer.lock.yml Regenerates suppression environment.
.github/workflows/daily-compiler-quality.lock.yml Regenerates suppression environment.
.github/workflows/daily-community-attribution.lock.yml Regenerates suppression environment.
.github/workflows/daily-code-metrics.lock.yml Regenerates suppression environment.
.github/workflows/daily-cli-tools-tester.lock.yml Regenerates suppression environment.
.github/workflows/daily-cli-performance.lock.yml Regenerates suppression environment.
.github/workflows/daily-choice-test.lock.yml Regenerates suppression environment.
.github/workflows/daily-caveman-optimizer.lock.yml Regenerates suppression environment.
.github/workflows/daily-cache-strategy-analyzer.lock.yml Regenerates suppression environment.
.github/workflows/daily-byok-ollama-test.lock.yml Regenerates suppression environment.
.github/workflows/daily-awf-spec-compiler-surfacing.lock.yml Regenerates suppression environment.
.github/workflows/daily-aw-cross-repo-compile-check.lock.yml Regenerates suppression environment.
.github/workflows/daily-astrostylelite-markdown-spellcheck.lock.yml Regenerates suppression environment.
.github/workflows/daily-assign-issue-to-user.lock.yml Regenerates suppression environment.
.github/workflows/daily-architecture-diagram.lock.yml Regenerates suppression environment.
.github/workflows/daily-ambient-context-optimizer.lock.yml Regenerates suppression environment.
.github/workflows/daily-agentrx-trace-optimizer.lock.yml Regenerates suppression environment.
.github/workflows/daily-agent-of-the-day-blog-writer.lock.yml Regenerates suppression environment.
.github/workflows/craft.lock.yml Regenerates suppression environment.
.github/workflows/copilot-session-insights.lock.yml Regenerates suppression environment.
.github/workflows/copilot-pr-prompt-analysis.lock.yml Regenerates suppression environment.
.github/workflows/copilot-pr-nlp-analysis.lock.yml Regenerates suppression environment.
.github/workflows/copilot-pr-merged-report.lock.yml Regenerates suppression environment.
.github/workflows/copilot-opt.lock.yml Regenerates suppression environment.
.github/workflows/copilot-cli-deep-research.lock.yml Regenerates suppression environment.
.github/workflows/copilot-agent-analysis.lock.yml Regenerates suppression environment.
.github/workflows/contribution-check.lock.yml Regenerates suppression environment.
.github/workflows/constraint-solving-potd.lock.yml Regenerates suppression environment.
.github/workflows/commit-changes-analyzer.lock.yml Regenerates suppression environment.
.github/workflows/code-scanning-fixer.lock.yml Regenerates suppression environment.
.github/workflows/cloclo.lock.yml Regenerates suppression environment.
.github/workflows/cli-version-checker.lock.yml Regenerates suppression environment.
.github/workflows/cli-consistency-checker.lock.yml Regenerates suppression environment.
.github/workflows/claude-code-user-docs-review.lock.yml Regenerates suppression environment.
.github/workflows/ci-doctor.lock.yml Regenerates suppression environment.
.github/workflows/ci-coach.lock.yml Regenerates suppression environment.
.github/workflows/chaos-pr-bundle-fuzzer.lock.yml Regenerates suppression environment.
.github/workflows/changeset.lock.yml Regenerates suppression environment.
.github/workflows/breaking-change-checker.lock.yml Regenerates suppression environment.
.github/workflows/blog-auditor.lock.yml Regenerates suppression environment.
.github/workflows/aw-failure-investigator.lock.yml Regenerates suppression environment.
.github/workflows/avenger.lock.yml Regenerates suppression environment.
.github/workflows/auto-triage-issues.lock.yml Regenerates suppression environment.
.github/workflows/audit-workflows.lock.yml Regenerates suppression environment.
.github/workflows/artifacts-summary.lock.yml Regenerates suppression environment.
.github/workflows/archivx-agentic-workflows-analyzer.lock.yml Regenerates suppression environment.
.github/workflows/architecture-guardian.lock.yml Regenerates suppression environment.
.github/workflows/archie.lock.yml Regenerates suppression environment.
.github/workflows/approach-validator.lock.yml Regenerates suppression environment.
.github/workflows/api-consumption-report.lock.yml Regenerates suppression environment.
.github/workflows/agentic-token-trend-audit.lock.yml Regenerates suppression environment.
.github/workflows/agent-persona-explorer.lock.yml Regenerates suppression environment.
.github/workflows/agent-performance-analyzer.lock.yml Regenerates suppression environment.
.github/workflows/ab-testing-advisor.lock.yml Regenerates suppression environment.
Review details
  • Files reviewed: 102/102 changed files
  • Comments generated: 1
  • Review effort level: Balanced

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

- `.github/aw/debug-agentic-workflow.md`
- `.github/aw/dependabot.md`
- `.github/aw/deployment-status.md`
- `.github/aw/designer-mappings.md`
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.86.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

threat-detection: external path writes an unused prompt to the step summary, duplicating the detector's real one

3 participants