Skip to content

fix: guard conclude_threat_detection.sh so threat-detect never runs when RUN_DETECTION=false#47019

Merged
pelikhan merged 11 commits into
mainfrom
copilot/aw-fix-guard-line-41
Jul 22, 2026
Merged

fix: guard conclude_threat_detection.sh so threat-detect never runs when RUN_DETECTION=false#47019
pelikhan merged 11 commits into
mainfrom
copilot/aw-fix-guard-line-41

Conversation

Copilot AI commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

When RUN_DETECTION=false (detection skipped), conclude_threat_detection.sh fell through to the unconditional threat-detect conclude call on line 41. Since threat-detect is not installed on the skipped-detection path, this exited 127, marking otherwise-successful runs as failed.

Changes

  • actions/setup/sh/conclude_threat_detection.sh — add early-exit guard: when RUN_DETECTION != true, emit conclusion=skipped to GITHUB_OUTPUT/GITHUB_ENV and exit 0 before reaching the threat-detect invocation. Refactored the downstream missing-result block to drop its now-redundant RUN_DETECTION=true check.
if [ "${RUN_DETECTION:-false}" != "true" ]; then
  echo "conclusion=skipped" >> "${GITHUB_OUTPUT}"
  echo "GH_AW_DETECTION_CONCLUSION=skipped" >> "${GITHUB_ENV}"
  exit 0
fi
  • pkg/workflow/threat_detection_conclude_script_test.go — add TestConcludeThreatDetectionScript_SkippedWhenRunDetectionFalse: runs the script with RUN_DETECTION=false, no result file, and threat-detect absent from PATH; asserts exit 0 and conclusion=skipped outputs.

Run: https://github.com/github/gh-aw/actions/runs/29816999996

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • pi.dev

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "pi.dev"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · 12.4 AIC · ⌖ 6.12 AIC · ⊞ 5.5K ·
Comment /souschef to run again


Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • pi.dev

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "pi.dev"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · gpt54 20.1 AIC · ⌖ 6.12 AIC · ⊞ 7K ·
Comment /souschef to run again


Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • pi.dev

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "pi.dev"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · gpt54 7.68 AIC · ⌖ 9.11 AIC · ⊞ 7K ·
Comment /souschef to run again


Run: https://github.com/github/gh-aw/actions/runs/29849545379

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • pi.dev

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "pi.dev"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · gpt54 9.08 AIC · ⌖ 7.1 AIC · ⊞ 7K ·
Comment /souschef to run again


Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • pi.dev

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "pi.dev"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · gpt54 9.87 AIC · ⌖ 11.8 AIC · ⊞ 7K ·
Comment /souschef to run again


pr-sous-chef run: https://github.com/github/gh-aw/actions/runs/29858066392

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • pi.dev

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "pi.dev"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · gpt54 15.4 AIC · ⌖ 7.1 AIC · ⊞ 7K ·
Comment /souschef to run again


Run: https://github.com/github/gh-aw/actions/runs/29861145850

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • pi.dev

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "pi.dev"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · gpt54 8.57 AIC · ⌖ 8.31 AIC · ⊞ 7K ·
Comment /souschef to run again


Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • pi.dev

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "pi.dev"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · gpt54 16.3 AIC · ⌖ 6.45 AIC · ⊞ 7K ·
Comment /souschef to run again


Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • pi.dev

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "pi.dev"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · gpt54 20.4 AIC · ⌖ 8.66 AIC · ⊞ 7K ·
Comment /souschef to run again


Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • pi.dev

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "pi.dev"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · gpt54 12.8 AIC · ⌖ 6.96 AIC · ⊞ 7K ·
Comment /souschef to run again


Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • pi.dev

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "pi.dev"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · gpt54 11.8 AIC · ⌖ 10.8 AIC · ⊞ 7K ·
Comment /souschef to run again


Run: https://github.com/github/gh-aw/actions/runs/29883079375

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • pi.dev

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "pi.dev"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · gpt54 8.98 AIC · ⌖ 8.2 AIC · ⊞ 7K ·
Comment /souschef to run again


Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • pi.dev

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "pi.dev"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · gpt54 10.7 AIC · ⌖ 7.73 AIC · ⊞ 7K ·
Comment /souschef to run again


Run: https://github.com/github/gh-aw/actions/runs/29895667664

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • pi.dev

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "pi.dev"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · gpt54 8.82 AIC · ⌖ 8.78 AIC · ⊞ 5.5K ·
Comment /souschef to run again


run: https://github.com/github/gh-aw/actions/runs/29898890921

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • pi.dev

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "pi.dev"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · gpt54 10.6 AIC · ⌖ 9.49 AIC · ⊞ 7K ·
Comment /souschef to run again

…N_DETECTION=false

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix conclude script to prevent false CI failures fix: guard conclude_threat_detection.sh so threat-detect never runs when RUN_DETECTION=false Jul 21, 2026
Copilot AI requested a review from pelikhan July 21, 2026 08:15
@pelikhan
pelikhan marked this pull request as ready for review July 21, 2026 08:21
Copilot AI review requested due to automatic review settings July 21, 2026 08:21

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.

Pull request overview

Fixes false failures when threat detection is skipped.

Changes:

  • Adds an early skipped-detection exit.
  • Adds regression coverage for RUN_DETECTION=false.
Show a summary per file
File Description
actions/setup/sh/conclude_threat_detection.sh Prevents invoking unavailable threat-detect.
pkg/workflow/threat_detection_conclude_script_test.go Tests the skipped path.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Medium

Comment thread actions/setup/sh/conclude_threat_detection.sh Outdated
@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Test Quality Sentinel completed test quality analysis.

@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Design Decision Gate 🏗️ completed the design decision gate check.

No ADR enforcement needed: PR #47019 does not have the 'implementation' label and has ≤100 new lines of code in business logic directories (46 additions across 2 files, none in tracked business logic paths).

@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

PR Code Quality Reviewer completed the code quality review.

@github-actions github-actions Bot mentioned this pull request Jul 21, 2026

@github-actions github-actions Bot 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.

Review

The early-exit guard is correct: RUN_DETECTION!=true now exits before reaching the threat-detect conclude call, preventing the exit-127 failure on skipped-detection runs.

The test is well-structured — it removes threat-detect from PATH and asserts both GITHUB_OUTPUT and GITHUB_ENV are set to skipped on exit 0.

Non-blocking note: The missing success/reason outputs on the skipped path (flagged in the existing inline comment) are valid but consistent with how downstream consumers treat conclusion=skipped.

🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · 13.3 AIC · ⌖ 4.36 AIC · ⊞ 4.9K

@github-actions github-actions Bot 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.

Skills-Based Review 🧠

Applied /diagnosing-bugs and /tdd — requesting two small improvements before merge.

📋 Key Themes & Highlights

Issues Found

  1. Missing outputs on skipped path (existing comment at line 15): success, reason, and GH_AW_DETECTION_REASON are not emitted on the skipped path, leaving downstream consumers of those outputs with unset values.
  2. Partial test coverage (new comment at test line 133): Only RUN_DETECTION=false is tested; the unset-variable default should also be covered to lock in the guard's default behaviour.

Positive Highlights

  • ✅ Root cause fix is correct and minimal — the early-exit guard directly prevents the exit-127 failure.
  • ✅ The refactoring of the downstream missing-result block is clean: removing the now-redundant RUN_DETECTION=true check simplifies the logic.
  • ✅ Test exercises the right scenario (no result file, no threat-detect in PATH) and checks both GITHUB_OUTPUT and GITHUB_ENV.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · 20.1 AIC · ⌖ 4.5 AIC · ⊞ 6.6K
Comment /matt to run again

Comment thread pkg/workflow/threat_detection_conclude_script_test.go
@github-actions

Copy link
Copy Markdown
Contributor

🧪 Test Quality Sentinel Report

Test Quality Score: 90/100 — Excellent (but FAILED due to violation)

Analyzed 4 test(s): 4 design, 0 implementation, 1 violation(s).

📊 Metrics (4 tests)
Metric Value
Analyzed 4 (Go: 4, JS: 0)
✅ Design 4 (100%)
⚠️ Implementation 0 (0%)
Edge/error coverage 4 (100%)
Duplicate clusters 0
Inflation Yes (6.6:1 ratio exceeds 2:1)
🚨 Violations 1 (missing build tag)
Test File Classification Issues
TestConcludeThreatDetectionScript_MissingResultContinueOnError threat_detection_conclude_script_test.go:13 behavioral_contract ✅ None
TestConcludeThreatDetectionScript_MissingResultSurfacesDetectorStatus threat_detection_conclude_script_test.go:64 behavioral_contract ✅ None
TestConcludeThreatDetectionScript_SkippedWhenRunDetectionFalse threat_detection_conclude_script_test.go:111 design_test ✅ Validates fix
TestConcludeThreatDetectionScript_InvokesThreatDetectConclude threat_detection_conclude_script_test.go:157 behavioral_contract ✅ None
🚨 Coding Violation

Missing mandatory build tag

File pkg/workflow/threat_detection_conclude_script_test.go is missing the required //go:build declaration on line 1.

These are integration tests (bash script execution with fixtures), so add:

(go/redacted):build integration

All Go test files in gh-aw must declare a build tag (//go:build !integration for unit, //go:build integration for integration tests).

Test Quality Analysis

All 4 tests are design/behavioral tests with strong edge-case coverage:

  • MissingResultContinueOnError validates warning behavior
  • MissingResultSurfacesDetectorStatus validates detector status surfacing
  • SkippedWhenRunDetectionFalse ⭐ validates the core fix: when RUN_DETECTION=false, script exits cleanly and never invokes threat-detect (confirmed by manipulating PATH)
  • InvokesThreatDetectConclude validates happy-path CLI invocation

Each test uses explicit t.Fatalf assertions with descriptive failure messages. No mocks, no duplicates, 100% error/edge coverage.

⚠️ Note on test inflation (6.6:1 ratio): This exceeds the 2:1 threshold, but is justified for integration tests—each requires substantial bash setup, temp file fixtures, and env var configuration. The high ratio reflects fixture cost, not inflated assertions.

Verdict

FAILED. Implementation tests: 0% (threshold: 30%), but mandatory //go:build tag is missing. This is a coding guideline violation that must be fixed before merge.

🧪 Test quality analysis by Test Quality Sentinel · 16.7 AIC · ⌖ 6.51 AIC · ⊞ 7K ·
Comment /review to run again

@github-actions github-actions Bot 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.

❌ Test Quality Sentinel: 90/100. Coding guideline violation: missing mandatory //go:build integration tag on line 1 of pkg/workflow/threat_detection_conclude_script_test.go. While test quality is excellent (100% design tests, 100% edge-case coverage), all Go test files must declare a build tag. Review flagged violation in the comment above.

@github-actions github-actions Bot 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.

COMMENT — fix is correct, two test gaps need attention

The shell fix itself is sound: the early-exit guard correctly short-circuits before is invoked and the refactored downstream block is logically equivalent to the original. The existing review thread (line 15) already flags the missing success/reason/GH_AW_DETECTION_REASON outputs on the skipped path — that is the primary design question.

Findings
  1. (line 72, medium) — Test does not assert the state of success/reason/GH_AW_DETECTION_REASON outputs on the skipped path. The missing-outputs defect will never be caught by the new test.
  2. (line 44, medium) — No test covers the default/unset RUN_DETECTION case (${RUN_DETECTION:-false} default), which is the most common real-world caller scenario.

🔎 Code quality review by PR Code Quality Reviewer · 33.5 AIC · ⌖ 4.6 AIC · ⊞ 5.6K
Comment /review to run again

Comments that could not be inline-anchored

pkg/workflow/threat_detection_conclude_script_test.go:72

Test does not assert the state of success, reason, or GH_AW_DETECTION_REASON on the skipped path, so the missing-outputs defect will never be caught by this test.

<details>
<summary>💡 Suggested additions</summary>

After the existing conclusion=skipped assertions, add checks to codify the intended contract:

// If skipped path intentionally omits these, assert they are absent:
if strings.Contains(string(outputData), &quot;success=&quot;) {
    t.Fatalf(&quot;unexpected success= in GITHUB_O</details>

<details><summary>pkg/workflow/threat_detection_conclude_script_test.go:44</summary>

**No test covers the default/unset `RUN_DETECTION` case**, which should also skip per `${RUN_DETECTION:-false}`.

&lt;details&gt;
&lt;summary&gt;💡 Suggested addition&lt;/summary&gt;

Add a second sub-test or table-driven case that omits `RUN_DETECTION` from the environment entirely and asserts the same `conclusion=skipped` behavior. The `:-false` default is the most likely real-world value (the env var simply isn&#39;t set in many callers), and it is completely untested.

&lt;/details&gt;

</details>

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot please run the pr-finisher skill, update the branch, and address these unresolved review threads (newest first):

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • pi.dev

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "pi.dev"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · 12.4 AIC · ⌖ 6.12 AIC · ⊞ 5.5K ·
Comment /souschef to run again

…rve output contract

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

Copilot AI commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

@copilot please run the pr-finisher skill, update the branch, and address these unresolved review threads (newest first):

Done. The skipped path now emits success=true, reason=, GH_AW_DETECTION_CONCLUSION=skipped, and GH_AW_DETECTION_REASON= in addition to conclusion=skipped, matching the JS inline path's output contract. The test was updated to assert all five outputs. Commit: fix: emit success=true and reason= on skipped detection path to preserve output contract.

Copilot AI requested a review from gh-aw-bot July 21, 2026 09:32

Copilot AI commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

@copilot please run the pr-finisher skill, verify whether the remaining blocking reviews are stale or need follow-up, and summarize the smallest maintainer action to get this PR merge-ready.

Unreso...

Both blocking reviews are stale — they were submitted by the github-actions[bot] (Matt Pocock Skills Reviewer) against old commits, and all issues they raised are fully addressed on the current HEAD (9f15eee):

Review 4742789471 (against commit 89dbca89) — Requested: (1) success/reason outputs on skipped path, (2) test for unset RUN_DETECTION. Both fixed: skipped guard emits conclusion=skipped, success=true, reason=; TestConcludeThreatDetectionScript_SkippedWhenRunDetectionUnset added in 9f15eee.

Review 4744699617 (against commit 9632141) — Requested: add GITHUB_ENV write. Superseded by @pelikhan's explicit maintainer directive ("avoid using GITHUB_ENV in the entire file") — the script correctly uses only GITHUB_OUTPUT for all paths.

No code changes are needed. The reviews will be replaced by fresh bot reviews once CI runs on the current HEAD.

  • ✅ Reviews — All 4 review threads is_resolved: true. The two CHANGES_REQUESTED formal reviews are stale (submitted against old commits; all raised issues are fixed).
  • ✅ Checks (local) — make fmt and make test-unit pass; all 5 TestConcludeThreatDetectionScript_* tests pass.
  • ❓ Checks (CI) — Stale; needs human re-trigger.
  • ✅ Mergeable — Branch up to date, no conflicts, working tree clean.

Smallest maintainer action: Close and reopen the PR to trigger CI on HEAD 9f15eee. Fresh bot reviews will replace the stale CHANGES_REQUESTED ones, unblocking the merge.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot please run the pr-finisher skill, address any unresolved review feedback, confirm the branch is current, and summarize the exact next maintainer action.

Run: https://github.com/github/gh-aw/actions/runs/29889445104

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • pi.dev

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "pi.dev"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · gpt54 7.09 AIC · ⌖ 7.33 AIC · ⊞ 7K ·
Comment /souschef to run again

Copilot AI commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

@copilot please run the pr-finisher skill, address any unresolved review feedback, confirm the branch is current, and summarize the exact next maintainer action.

Run: https://github.com/github/gh-a...

The run linked (29889445104) is the PR Sous Chef scheduler on main, not a PR check. No new review feedback has appeared since the last pass.

Current state on HEAD 9f15eee:

  • ✅ Reviews — All 4 review threads is_resolved: true. No new threads.
  • ✅ Checks (local) — make fmt and make test-unit pass; all 5 TestConcludeThreatDetectionScript_* tests pass.
  • ❓ Checks (CI) — Stale; the two CHANGES_REQUESTED reviews from github-actions[bot] were submitted against old commits and will be superseded once CI runs on HEAD 9f15eee.
  • ✅ Mergeable — Branch up to date, no conflicts, working tree clean.

Exact next maintainer action: Close and reopen the PR to trigger CI on HEAD 9f15eee, then merge once green.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot please run the pr-finisher skill, verify whether the remaining blocking reviews are stale or need follow-up, and summarize the smallest maintainer action to get this PR merge-ready.

Run: https://github.com/github/gh-aw/actions/runs/29892356701

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • pi.dev

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "pi.dev"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · gpt54 10.7 AIC · ⌖ 7.73 AIC · ⊞ 7K ·
Comment /souschef to run again

Copilot AI commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

@copilot please run the pr-finisher skill, verify whether the remaining blocking reviews are stale or need follow-up, and summarize the smallest maintainer action to get this PR merge-ready.

Run: h...

Run 29892356701 is the PR Sous Chef scheduler on main (head SHA 2a7ac3d), not a PR check on this branch.

The two blocking CHANGES_REQUESTED reviews are both stale:

  • Review 4742789471 — submitted against commit 89dbca89. Both issues it raised are fixed on HEAD 9f15eee: success=true/reason= are now emitted on the skipped path, and TestConcludeThreatDetectionScript_SkippedWhenRunDetectionUnset covers the unset-variable case.
  • Review 4744699617 — submitted against commit 9632141, requested a GITHUB_ENV write. Superseded by @pelikhan's explicit directive to remove all GITHUB_ENV writes from the file.

No code changes needed. All 4 review threads remain is_resolved: true.

Smallest maintainer action: Close and reopen the PR to trigger CI on HEAD 9f15eee. The fresh bot reviews will replace the stale CHANGES_REQUESTED ones, unblocking the merge.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot please run the pr-finisher skill, address the remaining review feedback, and rerun checks once the branch is up to date.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • pi.dev

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "pi.dev"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · gpt54 8.82 AIC · ⌖ 8.78 AIC · ⊞ 5.5K ·
Comment /souschef to run again

Copilot AI commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

@copilot please run the pr-finisher skill, address the remaining review feedback, and rerun checks once the branch is up to date.

...

No code changes needed. The branch is already merge-ready on HEAD 76d8495.

  • Reviews — All 4 review threads are is_resolved: true. The two CHANGES_REQUESTED reviews from github-actions[bot] (IDs 4742789471 and 4744699617) were submitted against older commits; all issues they raised are fixed: success=true/reason= outputs are emitted on the skipped path, TestConcludeThreatDetectionScript_SkippedWhenRunDetectionUnset covers the unset-variable default, and all GITHUB_ENV writes have been removed per @pelikhan's directive.
  • Checks (local)make fmt, make lint, and make test-unit all pass. All 5 TestConcludeThreatDetectionScript_* tests pass.
  • Checks (CI) — Stale after agent pushes; needs human re-trigger. The two CHANGES_REQUESTED bot reviews will be replaced by fresh bot reviews once CI runs on the current HEAD.
  • Mergeable — Branch is up to date with main (merge commit 76d8495), no conflicts, working tree clean.

Hand-off: Re-trigger CI by closing and reopening the PR (or a maintainer push), then merge once green.

@github-actions

Copy link
Copy Markdown
Contributor

🤖 PR Triage (updated)

Field Value
Category bug
Risk 🟡 Medium
Score 75/100 (impact: 38, urgency: 25, quality: 12)
Action 🚀 fast_track

Guards conclude_threat_detection.sh to prevent crash when threat-detect is not installed and RUN_DETECTION=false. Has CHANGES_REQUESTED — review the requested changes before merging. Security-adjacent, high urgency.

Generated by 🔧 PR Triage Agent · sonnet46 35.2 AIC · ⌖ 7.92 AIC · ⊞ 5.6K ·

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot please run the pr-finisher skill, address unresolved review comments, and rerun checks once the branch is up to date.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • pi.dev

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "pi.dev"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · gpt54 10.6 AIC · ⌖ 9.49 AIC · ⊞ 7K ·
Comment /souschef to run again

Copilot AI commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

@copilot please run the pr-finisher skill, address unresolved review comments, and rerun checks once the branch is up to date.

...

No new review feedback to address. Current state on HEAD 76d8495:

  • Reviews — All 4 review threads is_resolved: true. The two CHANGES_REQUESTED reviews (4742789471, 4744699617) are stale — both submitted against old commits and all raised issues are already fixed on the current HEAD.
  • Checks (local)make fmt, make lint, and make test-unit all pass. All 5 TestConcludeThreatDetectionScript_* tests pass.
  • Checks (CI) — Stale after agent pushes; needs human re-trigger.
  • Mergeable — Branch is up to date with main, no conflicts, working tree clean.

Hand-off: A maintainer must re-trigger CI (close/reopen the PR or push a commit). Once CI is green and fresh bot reviews replace the stale CHANGES_REQUESTED ones, the PR will be unblocked for merge.

@pelikhan

Copy link
Copy Markdown
Collaborator

@copilot review compiled code that uses this script and ensure it does not relay on env variable, it must use outputs

…ConcludeStep comment

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

Copilot AI commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

@copilot review compiled code that uses this script and ensure it does not relay on env variable, it must use outputs

Reviewed the compiled code. All consumers already use outputs, not env variables:

  • Detection job outputs: detection_conclusion: ${{ steps.detection_conclusion.outputs.conclusion }} (step output, not GITHUB_ENV)
  • Downstream jobs receive: GH_AW_DETECTION_CONCLUSION: ${{ needs.detection.outputs.detection_conclusion }} (job output expression)

No compiled step within the detection job reads GH_AW_DETECTION_CONCLUSION as an env var set by GITHUB_ENV. The chain is fully output-based from the shell script through to downstream consumers.

Also fixed a stale comment in pkg/workflow/threat_detection_external.go that incorrectly described the step as "exporting" GH_AW_DETECTION_CONCLUSION/GH_AW_DETECTION_REASON — commit docs: remove stale GITHUB_ENV export claim from buildExternalDetectorConcludeStep comment.

@pelikhan
pelikhan merged commit 295fd3e into main Jul 22, 2026
23 checks passed
@pelikhan
pelikhan deleted the copilot/aw-fix-guard-line-41 branch July 22, 2026 08:05
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.83.0

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

Projects

None yet

4 participants