Skip to content

[dead-code] chore: remove dead functions — 2 functions removed - #74148

Merged
pelikhan merged 1 commit into
mainfrom
chore/remove-dead-functions-41460294115-845857a2c53cc2ff
Nov 2, 2026
Merged

pelikhan merged 1 commit into
mainfrom
chore/remove-dead-functions-41460294115-845857a2c53cc2ff

Conversation

@github-actions

@github-actions github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Warning

threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.

What happened

The threat detection engine failed to produce results.

Review the workflow run logs for details.

Caution

Protected files were modified in this change.
This pull request is in request-review mode and requires explicit human scrutiny before merge.

Protected files: README.md

Allow intentional protected-file changes

If this workflow is intended to modify these files, add specific filenames or folder prefixes to safe-outputs.create-pull-request.protected-files.exclude in the workflow Markdown frontmatter. For example, to allow .changeset/*, exclude the folder using .changeset/:

safe-outputs:
  create-pull-request:
    protected-files:
      policy: request-review
      exclude:
        - .changeset/

Keep your existing policy and exclusions. Folder exclusions use path prefixes, not glob patterns, and allow all files beneath that folder, including subfolders. Other protected files still require review. If allowed-files is configured, these paths must also match it. Run gh aw compile after updating the workflow.

Functions Removed

Function File
findThreatDetectionVerdict pkg/cli/audit_threat_detection.go
BuildStandardNpmEngineInstallStepsNoCooldown pkg/workflow/nodejs.go

Tests Removed

  • TestFindThreatDetectionVerdictFromLegacyLog, TestFindThreatDetectionVerdictRejectsMalformedAndConflictingResults, TestFindThreatDetectionVerdictAcceptsDuplicateResults (other tests that called the removed function now call readThreatDetectionEvidence directly)
  • TestBuildStandardNpmEngineInstallStepsNoCooldown
  • Removed the matching pkg/workflow/README.md table row.

Verification

  • go build ./...
  • go vet ./...
  • go vet -tags=integration ./...
  • make fmt (gofmt clean; the make target failed because prettier is not installed in this environment)

https://github.com/github/gh-aw/actions/runs/41460294115

Generated by 🧹 Dead Code Removal Agent · copilot · auto · ~39 AIC · ⊞ 10.7K · ◷

  • expires on Nov 5, 2026, 6:27 AM UTC-08:00

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Protected files were modified in this pull request and require manual scrutiny before merge.

Please verify that each protected-file change is intentional, policy-compliant, and safe:

  • Protected files: README.md

To allow intentional changes to specific files or folders in future runs, configure safe-outputs.create-pull-request.protected-files.exclude in the workflow Markdown frontmatter. For example, this allows .changeset/* by excluding the folder:

safe-outputs:
  create-pull-request:
    protected-files:
      policy: request-review
      exclude:
        - .changeset/

Keep your existing policy and exclusions. Use folder prefixes, not glob patterns; .changeset/ also allows subfolders. Other protected files still require review, and allowed-files, if configured, must also permit these paths. Run gh aw compile after updating the workflow. This configuration change applies to future runs; review this pull request separately.


Threat detection produced a warning for this pull request output.

These changes need to be scrutinized before merge and only merged after a careful manual review.

@pelikhan
pelikhan marked this pull request as ready for review November 2, 2026 14:29
Copilot AI adaptive review requested due to automatic review settings November 2, 2026 14:29
@pelikhan
pelikhan merged commit 9d11ae4 into main Nov 2, 2026
10 checks passed
@pelikhan
pelikhan deleted the chore/remove-dead-functions-41460294115-845857a2c53cc2ff branch November 2, 2026 14:29
@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

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.

Generated from Ponytail Reviewer · gpt56 · ~9 AIC · ⌖ ~6 AIC · ⊞ 15.1K · ◷

Generated by Ponytail Reviewer for #74148

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ 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: reported_no_action

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.

Generated from Design Decision Gate 🏗️ · routed: gpt56 max · ~1 AIC · ⌖ ~2 AIC · ⊞ 7.7K · ◷

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor Author

🧠 Matt Pocock Skills Reviewer failed during the skills-based review.

Warning

threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.

What happened

The threat detection engine failed to produce results.

Review the workflow run logs for details.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Test Quality Sentinel completed test quality analysis.

Warning

threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.

What happened

The threat detection engine failed to produce results.

Review the workflow run logs for details.

Test Quality Sentinel

Outcome: reported_no_action

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.

Generated from Test Quality Sentinel · sonnet50 · ~12 AIC · ⊞ 12.7K · ◷

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ PR Code Quality Reviewer completed the code quality review.

Warning

threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.

What happened

The threat detection engine failed to produce results.

Review the workflow run logs for details.

🔎 Code quality review by PR Code Quality Reviewer

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 test deletions remove coverage for still-active legacy verdict parsing, duplicate acceptance, conflict rejection, and required-field validation.

1 open issue
What changed in this PR

Removes two unused helpers from gh-aw’s threat-detection auditing and npm engine-installation code, with corresponding test and documentation updates.

Changes:

  • Delete the verdict lookup wrapper and no-cooldown installation helper.
  • Migrate remaining audit assertions to readThreatDetectionEvidence and remove associated tests.
  • Remove the deleted installation helper from the API appendix.
File Description
pkg/​workflow/​README.md Remove the obsolete helper’s API entry.
pkg/​workflow/​nodejs.go Delete the no-cooldown installation wrapper.
pkg/​workflow/​engine_helpers_test.go Remove the wrapper’s test and unused import.
pkg/​cli/​audit_threat_detection.go Delete the unused verdict lookup wrapper.
pkg/​cli/​audit_threat_detection_test.go Remove three verdict tests and migrate one assertion.
pkg/​cli/​audit_threat_detection_session_test.go Migrate verdict assertions to the evidence reader.

Review effort: Max (auto)

assert.True(t, verdict.PromptInjection)
}

func TestGenerateThreatDetectionFindingsUsesUsageExecutionEvidence(t *testing.T) {
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

🎉 This pull request is included in a new release.

Release: v1.2.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.

2 participants