Skip to content

Comments

Register custom engine to fix TestValidateEngine integration test#16536

Merged
pelikhan merged 2 commits intocopilot/remove-custom-agentic-supportfrom
copilot/fix-github-actions-workflow-f5d59255-e072-41d7-9b4e-575ba01cafa6
Feb 18, 2026
Merged

Register custom engine to fix TestValidateEngine integration test#16536
pelikhan merged 2 commits intocopilot/remove-custom-agentic-supportfrom
copilot/fix-github-actions-workflow-f5d59255-e072-41d7-9b4e-575ba01cafa6

Conversation

Copy link
Contributor

Copilot AI commented Feb 18, 2026

The TestValidateEngine integration test expected "custom" as a valid engine option (documented in blogs/FAQ for bring-your-own-AI-provider scenarios), but CustomEngine was never registered in the engine registry.

Changes

Created pkg/workflow/custom_engine.go

  • Implements CustomEngine for user-provided AI agents via engine.command, engine.steps, engine.env, and engine.args
  • Embeds BaseEngine with defaults for no built-in tool/MCP/firewall support

Updated pkg/workflow/agentic_engine.go

  • Added default implementations for interface methods to BaseEngine:
    • ParseLogMetrics() → empty LogMetrics{}
    • GetLogParserScriptId()""
    • RenderMCPConfig() → no-op
  • Registered CustomEngine in NewEngineRegistry()

Example Usage

engine:
  id: custom
  command: /usr/local/bin/my-agent
  args: ["--model", "gpt-4"]
  env:
    API_KEY: ${{ secrets.MY_API_KEY }}

The test now validates all four supported engines: claude, codex, copilot, custom.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw -A modules/@npmcli//tmp/gh-aw/aw.patch git rev-�� --show-toplevel ache/go/1.25.0/x--write /opt/hostedtoolcache/node/24.13.0/x64/bin/node se 813172/b165/vet.rev-parse de node (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha eutil.test --jq ortcfg.link l/format/format.git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha 31 x_amd64/vet /opt/hostedtoolcache/node/24.13.0/x64/lib/node_modules/npm/node_-buildmode=exe ./../.prettieriggit --local x_amd64/vet node /opt�� 999 --write /home/REDACTED/.cargo/bin/sh **/*.ts **/*.json --ignore-path sh (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha node install.js x_amd64/vet ache/go/1.25.0/x64/pkg/tool/linux_amd64/link ./../.prettieriggit --local x_amd64/vet ache/go/1.25.0/x64/pkg/tool/linux_amd64/link -c 0352-14477/test-1264989878 x_amd64/vet 8286235/b404/importcfg.link _.a pull.rebase 64/pkg/tool/linu--show-toplevel -JPGyIl2vB7_F/G9sEDD2pLhLMDAgEAiXu/X6R5OoPF4X40d7UERB47/kI2eOA--JPGyIl2vB7_F (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha /tmp/shared-actions-test1480513631 config /usr/bin/git remote.origin.urgit 813172/b160/vet.rev-parse 2-41d7-9b4e-575b--show-toplevel git chec�� master 64/pkg/tool/linu-trimpath /opt/hostedtoolcache/node/24.13.0/x64/bin/node /tmp/go-build886git -trimpath 64/pkg/tool/linu--show-toplevel node (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha */*.ts' '**/*.json' --ignore-path ../../../.pret.prettierignore -tests 0/x64/bin/npx (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --write l /usr/bin/git --ignore-path ../../../.prettirev-parse x_amd64/compile git rev-�� --show-toplevel (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha user.email test@example.com /usr/bin/git g_.a 813172/b260/vet.rev-parse ode_modules/.bin--show-toplevel git rev-�� --show-toplevel 64/pkg/tool/linurev-parse /usr/bin/git JXoH24dz_ -trimpath ndor/bin/git git (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha rg/x/crypto@v0.48.0/curve25519/curve25519.go cfg ache/go/1.25.0/x64/pkg/tool/linux_amd64/asm (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha ath ../../../.pr**/*.json (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha go1.25.0 -c=4 -nolocalimports -importcfg /tmp/go-build1448286235/b386/importcfg -pack /tmp/go-build1448286235/b386/_testmain.go (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha g_.a x_amd64/vet ache/go/1.25.0/x64/pkg/tool/linux_amd64/compile ./../.prettieriggit --local x_amd64/vet ache/go/1.25.0/x64/pkg/tool/linux_amd64/compile -c bQ29M6A5H x_amd64/vet 8286235/b404=> _.a user.name 64/pkg/tool/linu--show-toplevel sh (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha vaScript2469001764/001/test-empty-frontmatter.md x_amd64/vet /opt/hostedtoolcache/go/1.25.0/x64/bin/node ./../.prettieriggit --local x_amd64/vet node /opt�� 0352-14477/test-1264989878 --write ache/go/1.25.0/x64/pkg/tool/linux_amd64/link **/*.ts **/*.json --ignore-path ache/go/1.25.0/x64/pkg/tool/linux_amd64/link (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/1/artifacts
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 /tmp/go-build886813172/b220/vet.-ifaceassert 0/x64/bin/node (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12345/artifacts
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 -buildtags nfig/composer/ve-test.short=true -errorsas -ifaceassert -nilfunc /opt/hostedtoolcache/go/1.25.0/xrev-parse -ato�� (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12346/artifacts
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 -buildtags 64/bin/go -errorsas -ifaceassert -nilfunc /opt/hostedtoolcache/go/1.25.0/xconfig -ato�� hub/workflows -buildtags /usr/sbin/bash -errorsas -ifaceassert -nilfunc bash (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/2/artifacts
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 /tmp/go-build886813172/b231/vet.main de_modules/.bin/sh (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/3/artifacts
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 /tmp/go-build886813172/b226/vet.-ifaceassert tions/setup/js/node_modules/.bin-nilfunc (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/4/artifacts
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 /tmp/go-build886813172/b227/vet.-ifaceassert tions/setup/node_modules/.bin/sh-nilfunc (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/5/artifacts
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 /tmp/go-build886813172/b228/vet.github.com/github/gh-aw/pkg/constants tions/node_modules/.bin/sh (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path 813172/b139/_pkg_.a cfg /sh /home/REDACTED/wornode erhouse/stringis/home/REDACTED/.npm/_npx/b388654678d519d9/node_modules/.bin/prettier /home/REDACTED/wor--write ache/go/1.25.0/xscripts/**/*.js (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 100 (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 6 -ifaceassert -nilfunc x_amd64/link -ato�� -bool n bin/node -errorsas -ifaceassert -nilfunc 2l/hKXTtrccq1d6W0qIfHov/c9W7SApZkXp6pAimNyCI (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha ty-test.md -buildtags tions/setup/js/node_modules/.bin/node -errorsas -ifaceassert -nilfunc bash tion�� --noprofile -tests sh (http block)
  • https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha -unreachable=false /tmp/go-build886813172/b311/vet.cfg tions/setup/node_modules/.bin/node o (http block)
  • https://api.github.com/repos/nonexistent/repo/actions/runs/12345
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion lector.go (http block)
  • https://api.github.com/repos/owner/repo/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo cfg /home/REDACTED/wornode erhouse/displayw/opt/hostedtoolcache/node/24.13.0/x64/bin/npm /home/REDACTED/worrun ache/go/1.25.0/xformat:pkg-json (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo bfe11e72f1bfb5524828c6b19b55956ef498c10c9460d770-d/gh-aw (http block)
  • https://api.github.com/repos/owner/repo/contents/file.md
    • Triggering command: /tmp/go-build1448286235/b368/cli.test /tmp/go-build1448286235/b368/cli.test -test.testlogfile=/tmp/go-build1448286235/b368/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true (http block)
  • https://api.github.com/repos/test-owner/test-repo/actions/secrets
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name (http block)
  • https://api.github.com/user
    • Triggering command: /usr/bin/gh gh api user --jq .login textarea/memoization/memoization.go (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login l/format/format.-errorsas (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login progress/progres-errorsas (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Fix the failing GitHub Actions workflow Integration: CMD Tests
Analyze the workflow logs, identify the root cause of the failure, and implement a fix.
Job ID: 63967378452
Job URL: https://github.com/github/gh-aw/actions/runs/22129813179/job/63967378452


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

- Created custom_engine.go with CustomEngine implementation
- Added default implementations for ParseLogMetrics, GetLogParserScriptId, and RenderMCPConfig to BaseEngine
- Registered custom engine in NewEngineRegistry()
- Fixed TestValidateEngine integration test failure

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions workflow for CMD tests Register custom engine to fix TestValidateEngine integration test Feb 18, 2026
Copilot AI requested a review from pelikhan February 18, 2026 07:09
@pelikhan
Copy link
Contributor

@copilot remove test, custom engine is deleted

@pelikhan pelikhan marked this pull request as ready for review February 18, 2026 07:17
Copilot AI review requested due to automatic review settings February 18, 2026 07:17
@pelikhan pelikhan merged commit 0aab1fb into copilot/remove-custom-agentic-support Feb 18, 2026
153 of 157 checks passed
@pelikhan pelikhan deleted the copilot/fix-github-actions-workflow-f5d59255-e072-41d7-9b4e-575ba01cafa6 branch February 18, 2026 07:17
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes the TestValidateEngine integration test by implementing and registering the CustomEngine, which was previously documented but not actually available in the engine registry. The custom engine allows users to integrate their own AI providers through configuration.

Changes:

  • Implemented CustomEngine with support for user-defined installation/execution steps
  • Added default implementations for interface methods to BaseEngine
  • Registered CustomEngine in the engine registry

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
pkg/workflow/custom_engine.go New file implementing CustomEngine for bring-your-own-AI-provider scenarios
pkg/workflow/agentic_engine.go Added default interface method implementations to BaseEngine and registered CustomEngine

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


// RenderMCPConfig provides no MCP configuration for custom engines
// Custom engines must implement MCP support themselves if needed
func (e *CustomEngine) RenderMCPConfig(yaml *strings.Builder, tools map[string]any, mcpTools []string, workflowData *WorkflowData) {
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

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

The parameter name 'yaml' is ambiguous and could be confused with the package name. Consider renaming it to 'builder' or 'yamlBuilder' for clarity.

Suggested change
func (e *CustomEngine) RenderMCPConfig(yaml *strings.Builder, tools map[string]any, mcpTools []string, workflowData *WorkflowData) {
func (e *CustomEngine) RenderMCPConfig(yamlBuilder *strings.Builder, tools map[string]any, mcpTools []string, workflowData *WorkflowData) {

Copilot uses AI. Check for mistakes.

// RenderMCPConfig provides a default no-op implementation for MCP configuration
// Engines can override this to provide custom MCP server configuration
func (e *BaseEngine) RenderMCPConfig(yaml *strings.Builder, tools map[string]any, mcpTools []string, workflowData *WorkflowData) {
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

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

The parameter name 'yaml' is ambiguous and could be confused with the package name. Consider renaming it to 'builder' or 'yamlBuilder' for clarity.

Suggested change
func (e *BaseEngine) RenderMCPConfig(yaml *strings.Builder, tools map[string]any, mcpTools []string, workflowData *WorkflowData) {
func (e *BaseEngine) RenderMCPConfig(yamlBuilder *strings.Builder, tools map[string]any, mcpTools []string, workflowData *WorkflowData) {

Copilot uses AI. Check for mistakes.
pelikhan added a commit that referenced this pull request Feb 18, 2026
* Initial plan

* Remove custom engine support - constants, registry, schema, and tests

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

* Complete custom engine removal - update validation and tests

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

* Fix remaining test failures - remove custom engine references

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

* Remove TestCustomEngineParseLogMetrics from logs_parsing_test.go

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

* Fix build: Remove workflows depending on removed custom engine support (#16534)

* Initial plan

* Remove custom engine workflows and shared configurations

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

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

* Register custom engine to fix TestValidateEngine integration test (#16536)

* Initial plan

* Add custom engine implementation and register in engine registry

- Created custom_engine.go with CustomEngine implementation
- Added default implementations for ParseLogMetrics, GetLogParserScriptId, and RenderMCPConfig to BaseEngine
- Registered custom engine in NewEngineRegistry()
- Fixed TestValidateEngine integration test failure

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

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

* Remove custom engine and all associated tests

- Removed custom_engine.go implementation file
- Removed CustomEngine registration from engine registry
- Removed TestEngineRegistryCustomEngine test
- Removed TestCustomEngineWithMaxTurns test
- Renamed TestThreatDetectionWithCustomEngine to TestThreatDetectionWithEngineConfig
- Replaced CustomEngine with ClaudeEngine in MCP setup generator tests

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

* Merge main into copilot/remove-custom-agentic-support

Resolved merge conflicts:
- Kept deletion of .github/workflows/smoke-opencode.lock.yml (uses custom engine)
- Preserved removal of "custom" engine from schema

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

* Fix CI failures - remove custom engine from tests

- Remove "custom" from expected engines in TestValidEngineNamesConsistency
- Remove "custom" test case from TestValidateEngine
- Update error message expectations to not include "custom"

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

* Fix remaining custom engine test failures

- Remove "custom" from TestValidEngineNames expected engines
- Update TestCompleteEngineNames to expect 3 engines instead of 4
- Fix test case names and counts for engine completion tests

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

* Fix TestRuntimeSetupIntegration - change custom engine to claude

- Updated test case to use 'claude' engine instead of 'custom'
- Changed test name from "custom steps" to "engine steps" for clarity
- Updated comment to refer to "engine steps" not "custom steps"

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

* Remove custom engine from tests, slides, and docs

Tests:
- Fix TestCompletionEngineNamesIntegration - remove "custom" assertion

Slides:
- Remove "Custom - Bring your own AI" from AI Engines slide

Docs:
- Update engines.md description to not mention custom engines
- Update faq.md to remove custom engine option
- Update frontmatter-full.md and frontmatter.md to update secrets/steps descriptions
- Update examples/multi-repo.md to use claude engine instead of custom
- Update patterns/multirepoops.md to use claude engine instead of custom

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

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: Peli de Halleux <pelikhan@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants