Skip to content

[WIP] Fix goose agentic engine configuration - #50186

Open
pelikhan with Copilot wants to merge 4 commits into
mainfrom
copilot/fix-goose-agentic-engine-configuration
Open

[WIP] Fix goose agentic engine configuration#50186
pelikhan with Copilot wants to merge 4 commits into
mainfrom
copilot/fix-goose-agentic-engine-configuration

Conversation

Copilot AI commented Aug 4, 2026

Copy link
Copy Markdown
Contributor
  • Investigate Smoke Goose workflow failure (awf: command not found)
  • Identify root cause: Goose engine uses harness-script execution (runs via Node.js + AWF firewall) but BehaviorDefinedEngine.GetInstallationSteps returned nil since Goose has no installation: block, so Node.js and the AWF binary were never installed
  • Fix GetInstallationSteps to install Node.js (and AWF binary when firewall enabled) for harness-script engines lacking an explicit installation block
  • Recompile workflows and verify smoke-goose.lock.yml now includes the missing steps
  • Run/verify relevant unit tests

Caution

agentic threat detected
Threat detection flagged this output in warn mode. Manual review is REQUIRED before any follow-up automation.

Details

Potential security threats were detected in the agent output.

Review the workflow run logs for details.

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

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

…ines

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

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Thanks for kicking off work on the goose agentic engine configuration fix! 🛠️ This PR is currently a draft with no code changes yet (0 files changed) — just the initial placeholder commit — so there isn't anything to evaluate against CONTRIBUTING.md quite yet.

A couple of notes for when the implementation lands:

  • Add the actual fix — the diff is currently empty, so the goose engine configuration change itself still needs to be pushed.
  • Include tests — please add or update test coverage for whatever configuration logic is being fixed, per the project's expectations for verifiable changes.
  • Fill in the description — once the fix is implemented, update the PR body with a concrete summary of what was wrong with the goose engine config and how this resolves it.

Note: per CONTRIBUTING.md, this repository expects most external contributions to start as an agentic plan in an issue, with a core team member creating the implementing PR. Since this PR appears to be an automated Copilot coding agent PR responding to a task, that's likely already aligned with the project's process — just flagging for completeness.

If useful, here's a prompt to hand to your coding agent to continue the work:

Implement the fix for the goose agentic engine configuration referenced in this PR's task description. Ensure:
1. The configuration bug in the goose engine handling is corrected.
2. Unit tests are added/updated covering the corrected behavior.
3. The PR description is updated with a clear summary of the root cause and the fix.

Warning

Firewall blocked 1 domain

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

  • patchdiff.githubusercontent.com

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

network:
  allowed:
    - defaults
    - "patchdiff.githubusercontent.com"

See Network Configuration for more information.

Generated by ✅ Contribution Check · auto · 72.9 AIC · ⌖ 3.94 AIC · ⊞ 8.8K ·

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Triage: bug / low risk

  • Category: bug
  • Risk: low
  • Priority score: 45/100 (impact 15, urgency 15, quality 15)
  • Recommended action: defer — small (12 loc, 1 file) fix, checklist incomplete (recompile/tests not yet verified)
  • Notes: Fixes Goose engine GetInstallationSteps bug for harness-script engines. CI unstable. Await checklist completion before merge review.

Generated by 🔧 PR Triage Agent · auto · 28.5 AIC · ⌖ 2.46 AIC · ⊞ 8K ·

@pelikhan
pelikhan marked this pull request as ready for review August 4, 2026 11:58
Copilot AI balanced review requested due to automatic review settings August 4, 2026 11:58
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

PR Code Quality Reviewer completed the code quality review.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Test Quality Sentinel completed test quality analysis.

No test files were added or modified in this PR. Test Quality Sentinel skipped.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

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

No ADR enforcement needed: PR does not have the 'implementation' label and has ≤100 new lines of code in business logic directories (only 12 additions detected).

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

Adds runtime setup for behavior-defined engines using Node.js harness scripts.

Changes:

  • Adds Node.js setup when no engine installation block exists.
  • Attempts to install AWF when firewall configuration enables it.
Show a summary per file
File Description
pkg/workflow/behavior_defined_engine.go Adds harness-specific installation steps.

Review details

Tip

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

Suppressed comments (1)

pkg/workflow/behavior_defined_engine.go:162

  • Harness execution treats AWF as enabled even when isFirewallEnabled(workflowData) is false: behaviorDefinedFirewallEnabled forces it on for every harness unless sandbox.agent disables it. This helper checks only isFirewallEnabled, so a harness workflow with no network/firewall configuration gets a Node setup step but still no AWF installation, while its execution step invokes awf --config and fails with the same awf: command not found error. Pass the behavior-defined effective firewall decision into installation generation (or otherwise install AWF whenever harness execution will use it).
		return BuildNpmEngineInstallStepsWithAWF([]GitHubActionStep{GenerateNodeJsSetupStep()}, workflowData)
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment on lines +158 to +162
if behavior.Installation == nil {
if behavior.HarnessScript == "" {
return nil
}
return BuildNpmEngineInstallStepsWithAWF([]GitHubActionStep{GenerateNodeJsSetupStep()}, workflowData)

@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 /tdd and /diagnosing-bugs — requesting changes on missing test coverage.

📋 Key Themes & Highlights

Key Themes

  • Missing regression test: The new harness-script branch in GetInstallationSteps is the exact code path that was broken before this fix. Without a test, the same failure mode can silently resurface after any future refactor.

Positive Highlights

  • ✅ Root cause correctly identified: GetInstallationSteps was returning nil for harness-script engines that declare no installation: block.
  • ✅ The fix is surgical — one small guard added, existing npm-based installation path unchanged.
  • ✅ Good explanatory comment documenting why Node.js must always be present for harness-script engines.
  • ✅ The early-exit for EngineConfig.Command != "" is correctly preserved before the new branch.

One Actionable Request

Add two tests in behavior_defined_engine_harness_test.go (see inline comment on line 162):

  1. Harness engine with no installation: block → GetInstallationSteps returns non-empty steps.
  2. Non-harness engine with no installation: block → GetInstallationSteps returns nil.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · sonnet46 · 25.3 AIC · ⌖ 8.37 AIC · ⊞ 7.1K
Comment /matt to run again

if behavior.HarnessScript == "" {
return nil
}
return BuildNpmEngineInstallStepsWithAWF([]GitHubActionStep{GenerateNodeJsSetupStep()}, workflowData)

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.

[/tdd] The new harness-script installation path lacks a regression test — without one, a future refactor could silently break Goose (and similar harness-only engines) again.

💡 Suggested test skeleton

Add two tests in behavior_defined_engine_harness_test.go:

  1. Harness engine, no installation: blockGetInstallationSteps must return non-empty steps (Node.js setup).
  2. Non-harness engine, no installation: blockGetInstallationSteps must return nil.

The /diagnosing-bugs skill stresses that every root-cause fix needs a regression test to prevent the same symptom recurring silently.

@copilot please address this.

@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.

The fix looks correct and minimal. For harness-script engines (like Goose) with no installation: block, GetInstallationSteps now returns the Node.js setup step (plus AWF when the firewall is enabled), matching the intent described in the PR. The logic is cleanly structured and consistent with how other engines use BuildNpmEngineInstallStepsWithAWF. No blocking issues found.

🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · sonnet46 · 18.4 AIC · ⌖ 10.1 AIC · ⊞ 5.4K

@pelikhan

pelikhan commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

@copilot run pr-finisher skills

@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.

Verdict: Request Changes

Correct fix in principle, but unverified: missing test coverage for the new branch and the smoke-goose.lock.yml artifact wasn't recompiled/committed as the PR's own checklist admits.

Themes
  • The logic change in GetInstallationSteps (installing Node.js + AWF for harness-script engines lacking an installation: block) is a sound fix for the described bug.
  • However, this is marked WIP and two checklist items are still unchecked: recompiling workflows and running tests. Since compiled .lock.yml files are the actual deployed artifact, the fix isn't effectively live until smoke-goose.lock.yml is regenerated and committed.
  • No unit test directly targets the new code path (Installation == nil && HarnessScript != ""). Existing harness tests cover GetExecutionSteps, not GetInstallationSteps.

🔎 Code quality review by PR Code Quality Reviewer · auto · 53.6 AIC · ⌖ 5.47 AIC · ⊞ 7.9K
Comment /review to run again

// harness through Node.js, so Node.js (and, when the firewall is enabled, the AWF
// binary) must always be installed even when no package-manager based installation
// is declared for the engine's CLI itself.
if behavior.Installation == nil {

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.

Missing test coverage for the new Installation == nil && HarnessScript != "" branch, and the generated smoke-goose.lock.yml wasn't recompiled/committed in this PR (per the PR's own checklist) — the fix is unverified end-to-end.

💡 Why this matters

This branch changes behavior for every harness-script engine without an explicit installation: block (Goose today, potentially others later). Without a unit test asserting GetInstallationSteps returns Node.js (+ AWF when firewall enabled) for such a config, a future refactor could silently regress this exact bug. Also, since make recompile wasn't run, the actual generated .lock.yml for smoke-goose still lacks the fix — so the described root cause is not actually resolved in this PR's committed artifacts, only in source.

Suggested fix: add a test in behavior_defined_engine_harness_test.go similar to newHarnessEngineDefinition() but with Installation: nil, asserting GetInstallationSteps returns Node.js setup (+AWF when firewall enabled), and run/commit make recompile output for smoke-goose.lock.yml.

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

pelikhan commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

/smoke-goose

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

⚠️ Smoke Goose failed. Goose encountered unexpected challenges...

@pelikhan

pelikhan commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

@copilot run pr-finisher skill
Do not use agentfinder

@pelikhan

pelikhan commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

@copilot fix the configuration on where the mcp config file should go

See failure in agent log https://github.com/github/gh-aw/actions/runs/30908234685/job/91988815439#step:26:1

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

Caution

agentic threat detected
Threat detection flagged this output in warn mode. Manual review is REQUIRED before any follow-up automation.

Details

Potential security threats were detected in the agent output.

Review the workflow run logs for details.

@copilot This PR needs a quick maintainer-ready refresh.

  • Follow up on the recent smoke-goose/configuration failure and fix the MCP config placement noted in the agent log.
  • Refresh the branch with the latest base changes.
  • Then run the pr-finisher skill and hand back when ready.

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

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

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Warning

Threat Detection Engine Failure — The analysis engine could not complete. This is a tooling failure, not a security finding.

What happened

The threat detection results could not be parsed.

Review the workflow run logs for details.

Triage update: bug / medium risk

  • Category: bug
  • Risk: medium (was low — Smoke Goose run failed, MCP config placement still open, agentic-threat-detection flag raised on latest agent output, mergeable_state unstable)
  • Score: 42 (impact 15 + urgency 17 + quality 10)
  • Recommended action: defer — hold for manual review of threat-detection flag and re-run smoke test before merge.

Generated by 🔧 PR Triage Agent · auto · 29.9 AIC · ⌖ 2.62 AIC · ⊞ 8K ·

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.

4 participants