Skip to content

feat: introduce EngineDefinition catalog and ResolvedEngineTarget; fix gemini metadata drift#20443

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/refactor-engine-patterns
Closed

feat: introduce EngineDefinition catalog and ResolvedEngineTarget; fix gemini metadata drift#20443
Copilot wants to merge 2 commits intomainfrom
copilot/refactor-engine-patterns

Conversation

Copy link
Contributor

Copilot AI commented Mar 11, 2026

Engine metadata was duplicated across constants.AgenticEngines, constants.EngineOptions, the EngineRegistry, and schema enums — with no single source of truth. This caused concrete drift: gemini was registered in the runtime registry and schema but absent from AgenticEngines and EngineOptions.

New types

EngineDefinition + EngineCatalog (pkg/workflow/engine_catalog.go)

Declarative engine model separating metadata from runtime adapter behavior. The built-in catalog registers all four engines in one place; downstream consumers derive their lists from it:

catalog := GetGlobalEngineCatalog()

// Replace constants.AgenticEngines
ids := catalog.GetAllEngineIDs() // ["copilot", "claude", "codex", "gemini"]

// Replace constants.EngineOptions
opts := catalog.GetEngineOptions() // []constants.EngineOption derived from catalog

GetGlobalEngineCatalog() is thread-safe via sync.Once. A TestEngineCatalogSyncWithRegistry guard test will catch future catalog/registry drift at CI time.

ResolvedEngineTarget (pkg/workflow/engine_resolved.go)

Bundles the resolved EngineDefinition, CodingAgentEngine runtime adapter, and EngineConfig together. Foundation for "resolve once, consume everywhere" — compilers resolve raw frontmatter into a single target instead of having each downstream consumer re-read EngineConfig independently.

target := NewResolvedEngineTarget(def, runtime, config)
target.Runtime.GetInstallationSteps(workflowData)
target.Config.Model
target.EngineID()

Bug fixes

  • Gemini metadata drift: added gemini to constants.AgenticEngines and constants.EngineOptions; normalized label to "Google Gemini CLI" for consistency with the catalog DisplayName
  • logs_orchestrator.go: engine filtering now uses registry.GetSupportedEngines() instead of constants.AgenticEngines, so newly registered engines are included automatically

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 main -lang=go1.25 git rev-�� --show-toplevel -dwarf=false /usr/bin/git go1.25.0 -c=4 -nolocalimports git (http block)
    • 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 -ifaceassert -nilfunc git rev-�� --show-toplevel -tests (http block)
  • https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha GOMODCACHE go /usr/bin/git '**/*.ts' '**/*.git GO111MODULE ache/go/1.25.0/x--show-toplevel git -C /tmp/gh-aw-test-runs/20260311-012252-41261/test-137373352 status /usr/bin/git .github/workflowgit GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha it/ref/tags/v7 git /usr/bin/git --show-toplevel go (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 -json GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE /usr/bin/git GOINSECURE GOMOD GOMODCACHE git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha --show-toplevel node /usr/bin/git /tmp/TestHashStagit go /usr/bin/git git bran�� --show-current git /usr/bin/git user.name Test User /usr/bin/git git (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 -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE DN/N6GE9dzJuLpfUe9tz4e_/aZSvDGNgUIYjN6c4lmkV env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha it/ref/tags/v7 JbrieQ94-F8q /usr/bin/git -json GO111MODULE 64/bin/go git rev-�� --git-dir go /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel 9916384/b418/importcfg /usr/bin/git che/go-build/3e/git GOPROXY 64/pkg/tool/linu--show-toplevel git rev-�� --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/git -json GO111MODULE ache/go/1.25.0/x--show-toplevel git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --get remote.origin.url /usr/bin/git -json GO111MODULE 0/x64/bin/npm git conf�� --get remote.origin.url /usr/lib/git-core/git -json GO111MODULE ules/.bin/sh /usr/lib/git-core/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha GOMODCACHE go /usr/bin/git -json GO111MODULE tions/node_modul--show-toplevel git init�� GOMODCACHE go /usr/bin/git '**/*.ts' '**/*.git GO111MODULE ache/go/1.25.0/x--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --show-toplevel go /usr/bin/git -json GO111MODULE 64/bin/go git rev-�� --show-toplevel node /usr/bin/git --check **/*.cjs ache/go/1.25.0/x--show-toplevel git (http block)
  • https://api.github.com/repos/actions/download-artifact/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/download-artifact/git/ref/tags/v8 --jq .object.sha "prettier" --check 'scripts/**/*.js' --ignore-paGOSUMDB go dAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle -json GO111MODULE 64/bin/go oJ/BhqTCoRMGewfss9ZXZGY/X4XoDkfiiEtxJ64HjgrP env -json GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/download-artifact/git/ref/tags/v8 --jq .object.sha st-1724041028/.github/workflows GO111MODULE .cfg GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/download-artifact/git/ref/tags/v8 --jq .object.sha g_.a stmain.go ache/go/1.25.0/x64/pkg/tool/linux_amd64/link GOINSECURE util GOMODCACHE ache/go/1.25.0/x64/pkg/tool/linu--jq env jpq_JbW5I GO111MODULE 9687228/b413/importcfg.link GOINSECURE GOMOD GOMODCACHE ortcfg (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 GOSUMDB GOWORK 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE de_modules/.bin/GOMODCACHE GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha -c=4 -nolocalimports -importcfg /tmp/go-build3149687228/b385/importcfg -embedcfg /tmp/go-build3149687228/b385/embedcfg -pack env -json GO111MODULE tions/node_modulGOMODCACHE GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE de_modules/.bin/GOMODCACHE GOINSECURE GOMOD GOMODCACHE 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 /repos/actions/github-script/git/ref/tags/v8 --jq /usr/bin/git -json GO111MODULE ache/go/1.25.0/x--show-toplevel git conf�� user.name Test User /opt/hostedtoolcache/node/24.14.0/x64/bin/node -json GO111MODULE ache/go/1.25.0/x--show-toplevel node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha --show-toplevel gh /usr/bin/git pload-artifact/ggit 12345 /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel x_amd64/vet /usr/bin/git git (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 /tmp/gh-aw-test-runs/20260311-012252-41261/test-3872279943/.github/workflows rev-parse /usr/bin/git -json GO111MODULE 86_64/node git init�� GOMODCACHE go /usr/bin/git -json GO111MODULE h git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha --show-toplevel /opt/hostedtoolcache/node/24.14.0/x64/bin/node /usr/bin/git Value: ${{ githgit go /usr/bin/git git rev-�� --show-toplevel git ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet --show-toplevel x_amd64/vet /usr/bin/git ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq .object.sha SameOutput2490449045/001/stability-test.md GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 9687228/b369/vet.cfg GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq .object.sha xterm-color git /usr/bin/find --show-toplevel go /usr/bin/git find /opt�� -maxdepth 4 /usr/bin/git d -name bin git (http block)
  • https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v7
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile /opt�� " --check 64/pkg/tool/linux_amd64/vet --ignore-path .prettierignore 64/bin/go 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha npx prettier --check '**/*.cjs' '**/*.ts' '**/*.GOINSECURE GOPROXY ache/go/1.25.0/x64/bin/go GOSUMDB GOWORK 64/bin/go sh -c "prettier" --check 'scripts/**/*.js' --ignore-paremote.origin.url go ache/go/1.25.0/x64/bin/go -json GO111MODULE 64/bin/go go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha npx prettier --check '**/*.cjs' '**/*.ts' '**/*.GOINSECURE GOPROXY 64/pkg/tool/linux_amd64/compile GOSUMDB GOWORK 64/bin/go 64/pkg/tool/linux_amd64/compile estl�� "prettier" --check 'scripts/**/*.js' --ignore-paGOSUMDB go ache/go/1.25.0/x64/bin/go tierignore GO111MODULE 64/bin/go go (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 GO111MODULE x_amd64/compile GOINSECURE GOMOD ode-gyp-bin/nodeuser.name x_amd64/compile env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (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 GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (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 GO111MODULE x_amd64/link GOINSECURE GOMOD ode-gyp-bin/nodeuser.name x_amd64/link env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE Uk/RjpMlkFF16eoo7DDZtqD/potGiMo3-buildtags (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 GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (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 GO111MODULE x_amd64/link GOINSECURE GOMOD GOMODCACHE x_amd64/link env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE wY/6laAua8wRVGB_OJFtnWt/CN3OvYBK-trimpath (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 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go estl�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (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 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go estl�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path GOSUMDB GOWORK 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE ache/go/1.25.0/xGOMODCACHE GOINSECURE GOMOD GOMODCACHE go (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 ck 'scripts/**/*.js' --ignore-pa-p GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env 1670136664/.github/workflows GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE sh (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha --show-toplevel go /usr/bin/git -json GO111MODULE .cfg git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE ache/go/1.25.0/x--show-toplevel git (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq .object.sha -json GO111MODULE h GOINSECURE GOMOD GOMODCACHE go env */*.ts' '**/*.jsGOSUMDB GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v2.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha -json GO111MODULE 0/x64/lib/node_mGOMODCACHE GOINSECURE GOMOD GOMODCACHE go env */*.ts' '**/*.js- GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linuconfig (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha -json GO111MODULE ules/.bin/sh GOINSECURE GOMOD GOMODCACHE go env */*.ts' '**/*.js-p GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha -json GO111MODULE 0/x64/bin/sh GOINSECURE GOMOD GOMODCACHE go env */*.ts' '**/*.js-errorsas GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v3.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq .object.sha -json GO111MODULE tions/setup/nodeGOMODCACHE GOINSECURE GOMOD GOMODCACHE go env e34d078fa265a37fGOSUMDB GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (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 ck 'scripts/**/*.js' --ignore-pa-p GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE sh (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha --show-toplevel NJzGr-D7xkIC-EgawJ/GFtmVa307QDDNuUCuh0B/-q2laYTO-test.v=true /usr/bin/git 2252-41261/test-git GO111MODULE g_.a git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE x_amd64/compile git (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 GOINSECURE GOMOD erignore go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE 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 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE tions/setup/nodeGOMODCACHE GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE ache/go/1.25.0/xGOMODCACHE GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/owner/repo/contents/file.md
    • Triggering command: /tmp/go-build3149687228/b383/cli.test /tmp/go-build3149687228/b383/cli.test -test.testlogfile=/tmp/go-build3149687228/b383/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (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 GOSUMDB GOWORK 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE ache/go/1.25.0/xGOMODCACHE GOINSECURE GOMOD GOMODCACHE go (http block)

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


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

…x gemini metadata drift

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor engine patterns for enhanced flexibility feat: introduce EngineDefinition catalog and ResolvedEngineTarget; fix gemini metadata drift Mar 11, 2026
@pelikhan pelikhan marked this pull request as ready for review March 11, 2026 02:39
Copilot AI review requested due to automatic review settings March 11, 2026 02:39
@pelikhan pelikhan closed this Mar 11, 2026
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

Introduces a centralized engine metadata catalog and a resolved engine target type to reduce duplication/drift across engine definitions, while fixing missing Gemini metadata and ensuring log filtering automatically includes newly registered engines.

Changes:

  • Added EngineCatalog/EngineDefinition as a single source of truth for built-in engine metadata and derived option/secret lists.
  • Added ResolvedEngineTarget to bundle resolved engine definition, runtime adapter, and parsed config for downstream consumers.
  • Fixed Gemini metadata drift in constants and updated logs filtering to use the runtime registry’s supported engines list.

Reviewed changes

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

Show a summary per file
File Description
pkg/workflow/engine_catalog.go Adds the global built-in engine catalog and derivation helpers (IDs/options/secrets).
pkg/workflow/engine_catalog_test.go Adds tests validating catalog contents and catalog/registry sync.
pkg/workflow/engine_resolved.go Introduces ResolvedEngineTarget for “resolve once, consume everywhere” engine handling.
pkg/constants/constants.go Adds Gemini to AgenticEngines and EngineOptions; normalizes Gemini label/metadata.
pkg/constants/constants_test.go Updates tests to ensure Gemini is included and secret enumeration includes GEMINI_API_KEY.
pkg/cli/logs_orchestrator.go Updates engine filtering to use registry.GetSupportedEngines() instead of constants.AgenticEngines.
Comments suppressed due to low confidence (1)

pkg/constants/constants.go:682

  • This comment implies AgenticEngines is “kept in sync” with the EngineCatalog, but it’s still a separate hard-coded list (and the catalog’s registration order differs). Consider clarifying that this is a compatibility list maintained manually/validated by tests, rather than derived automatically.
// AgenticEngines lists all supported agentic engine names.
// Note: This remains a string slice for backward compatibility with existing code.
// The authoritative source of truth is the EngineCatalog in pkg/workflow; this list
// is kept in sync with it and includes all four built-in engines.

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

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +40 to +41
// entries in the built-in catalog. External or organization-defined engines can be added
// to the catalog without modifying Go code.
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

The doc comment claims external/org-defined engines can be added to the catalog “without modifying Go code”, but the only way to add definitions here is via newBuiltInEngineCatalog/register in Go. Consider rewording this to reflect current behavior (or point to the actual extension mechanism if one exists elsewhere).

Suggested change
// entries in the built-in catalog. External or organization-defined engines can be added
// to the catalog without modifying Go code.
// entries in the built-in catalog. Additional engines (including external or
// organization-defined ones) can be added by registering new EngineDefinition
// entries in the catalog.

Copilot uses AI. Check for mistakes.
Comment on lines +697 to +699
// EngineOptions provides the list of available AI engines for user selection.
// Note: The authoritative source of truth is the EngineCatalog in pkg/workflow.
// This list is derived from the catalog and kept in sync with it.
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

This comment says EngineOptions is “derived from the catalog”, but EngineOptions is still a hard-coded slice (and already differs from the catalog’s display names, e.g., Copilot/Claude). Since constants can’t import pkg/workflow without a cycle, consider rewording to “manually kept in sync via tests” (or removing the claim of derivation).

This issue also appears on line 679 of the same file.

Copilot uses AI. Check for mistakes.
Comment on lines +45 to +55
// EngineID returns the resolved engine ID, sourced from the config if set,
// falling back to the definition ID. This handles the case where the engine
// was resolved via prefix matching (e.g., "codex-experimental" → "codex").
//
// If both Config.ID and Definition.ID are empty (which should not happen when
// NewResolvedEngineTarget is used correctly), an empty string is returned.
func (r *ResolvedEngineTarget) EngineID() string {
if r.Config != nil && r.Config.ID != "" {
return r.Config.ID
}
return r.Definition.ID
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

EngineID() is documented as returning the resolved engine ID (e.g., "codex-experimental" → "codex"), but the implementation returns Config.ID when set, which is currently the raw frontmatter value (see EngineConfig extraction). This can produce an unresolved ID and is likely to confuse callers; consider returning Definition.ID/Runtime.GetID() for the resolved ID and adding a separate accessor for the requested/raw ID (or renaming this method to reflect its behavior). Also, since NewResolvedEngineTarget returns a value, consider making EngineID a value-receiver (or returning *ResolvedEngineTarget) so calls like NewResolvedEngineTarget(...).EngineID() work.

Suggested change
// EngineID returns the resolved engine ID, sourced from the config if set,
// falling back to the definition ID. This handles the case where the engine
// was resolved via prefix matching (e.g., "codex-experimental" → "codex").
//
// If both Config.ID and Definition.ID are empty (which should not happen when
// NewResolvedEngineTarget is used correctly), an empty string is returned.
func (r *ResolvedEngineTarget) EngineID() string {
if r.Config != nil && r.Config.ID != "" {
return r.Config.ID
}
return r.Definition.ID
// EngineID returns the resolved engine ID derived from the engine definition
// and runtime. This corresponds to the canonical catalog engine ID after any
// prefix matching or alias resolution (e.g., "codex-experimental" → "codex").
//
// Resolution order:
// 1. Definition.ID, if non-empty (canonical catalog identity).
// 2. Runtime.GetID(), if Definition.ID is empty and a runtime is present.
// 3. Empty string, if neither source is available (should not happen when
// NewResolvedEngineTarget is used correctly).
func (r ResolvedEngineTarget) EngineID() string {
if r.Definition.ID != "" {
return r.Definition.ID
}
if r.Runtime != nil {
return r.Runtime.GetID()
}
return ""
}
// RawEngineID returns the originally requested engine ID from workflow
// frontmatter, if available. This is the raw, potentially-unresolved ID
// (e.g., "codex-experimental") as specified by the user.
func (r ResolvedEngineTarget) RawEngineID() string {
if r.Config != nil {
return r.Config.ID
}
return ""

Copilot uses AI. Check for mistakes.
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.

GitHub Agentic Workflow Engine Enhancement Proposal

3 participants