-
Notifications
You must be signed in to change notification settings - Fork 532
[WIP] Fix goose agentic engine configuration #50186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
1501fb1
d91c275
d92c90d
f066412
626fd6a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -144,13 +144,24 @@ func (e *BehaviorDefinedEngine) GetSecretValidationStep(workflowData *WorkflowDa | |
|
|
||
| func (e *BehaviorDefinedEngine) GetInstallationSteps(workflowData *WorkflowData) []GitHubActionStep { | ||
| behavior := e.behavior() | ||
| if behavior == nil || behavior.Installation == nil { | ||
| if behavior == nil { | ||
| return nil | ||
| } | ||
| if workflowData != nil && workflowData.EngineConfig != nil && workflowData.EngineConfig.Command != "" { | ||
| return nil | ||
| } | ||
|
|
||
| // Behavior-defined engines that execute via a harness script (e.g. Goose) run the | ||
| // 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 { | ||
| if behavior.HarnessScript == "" { | ||
| return nil | ||
| } | ||
| return BuildNpmEngineInstallStepsWithAWF([]GitHubActionStep{GenerateNodeJsSetupStep()}, workflowData) | ||
|
Comment on lines
+158
to
+162
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 skeletonAdd two tests in
The @copilot please address this. |
||
| } | ||
|
|
||
| install := behavior.Installation | ||
| if install.PackageManager != "npm" { | ||
| return nil | ||
|
|
||
There was a problem hiding this comment.
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 generatedsmoke-goose.lock.ymlwasn'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 assertingGetInstallationStepsreturns Node.js (+ AWF when firewall enabled) for such a config, a future refactor could silently regress this exact bug. Also, sincemake recompilewasn't run, the actual generated.lock.ymlfor 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.gosimilar tonewHarnessEngineDefinition()but withInstallation: nil, assertingGetInstallationStepsreturns Node.js setup (+AWF when firewall enabled), and run/commitmake recompileoutput forsmoke-goose.lock.yml.