Skip to content

Phase 5: Add RenderConfig hook to CodingAgentEngine interface#20477

Merged
pelikhan merged 2 commits intomainfrom
copilot/add-runtime-config-renderer-hook
Mar 11, 2026
Merged

Phase 5: Add RenderConfig hook to CodingAgentEngine interface#20477
pelikhan merged 2 commits intomainfrom
copilot/add-runtime-config-renderer-hook

Conversation

Copy link
Contributor

Copilot AI commented Mar 11, 2026

Adds a RenderConfig hook to the runtime adapter interface so engines that require config files on disk before execution (e.g. OpenCode's ~/.opencode/config.toml) can participate in the compilation pipeline cleanly, rather than encoding config generation inside execution steps.

Interface changes

  • Added ConfigRenderer interface with RenderConfig(target *ResolvedEngineTarget) ([]map[string]any, error) and embedded it into CodingAgentEngine
  • BaseEngine provides a no-op default — all four existing engines (claude, codex, copilot, gemini) inherit it with no behavior change

Orchestrator wiring

  • setupEngineAndImports calls RenderConfig immediately after catalog resolution; result stored in engineSetupResult.configSteps
  • configSteps flows into WorkflowData.EngineConfigSteps via buildInitialWorkflowData
  • generateMainJobSteps serializes and emits config steps via ConvertStepToYAML before the AI execution step

Example: future engine implementation

func (e *OpenCodeEngine) RenderConfig(target *ResolvedEngineTarget) ([]map[string]any, error) {
    return []map[string]any{{
        "name": "Write OpenCode config",
        "run":  "mkdir -p ~/.opencode && echo '[provider]\nname = \"openai\"' > ~/.opencode/config.toml",
    }}, nil
}

Tests

engine_config_render_test.go covers: built-in engines return nil (no regression), step ordering guarantee (config before execution), no-op path, and orchestrator invocation via a configRenderingEngine test stub.

All 166 existing lock files recompile unchanged.

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 GO111MODULE x_amd64/link git rev-�� --show-toplevel x_amd64/link /usr/bin/git -json GO111MODULE 64/bin/go 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 git /usr/bin/git git rev-�� --show-toplevel git /usr/bin/infocmp --show-toplevel gh /usr/bin/git infocmp (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 git /usr/bin/git x_amd64/cgo -1 xterm-color git /usr/bin/git user.email test@example.comrev-parse /opt/hostedtoolc--show-toplevel git (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 --get remote.origin.url /usr/bin/git '**/*.ts' '**/*.git GO111MODULE ache/go/1.25.0/x--show-toplevel git init�� GOMODCACHE go /usr/bin/git -json 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 t git /usr/bin/git --show-toplevel 64/pkg/tool/linurev-parse /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel go /usr/bin/git git (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 0/x64/bin/node GOINSECURE GOMOD GOMODCACHE 0/x64/bin/node e=/t�� t0 GO111MODULE (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha sistency_GoAndJavaScript1713487802/001/test-frontmatter-with-nested-objects.md git che/go-build/f8/f8127961d35d663906f8628edf5c97f9255b4358a225f8cd7dd4b60b9fc39f26-d --show-toplevel x_amd64/compile /usr/bin/git git rev-�� --show-toplevel 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 /bin/sh -c cd actions/setup/js && npm run lint:cjs GOPROXY n-dir/bash GOSUMDB GOWORK 64/bin/go sh (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --git-dir go /usr/bin/git -json GO111MODULE 64/bin/go git rev-�� --show-toplevel go /usr/bin/git heck '**/*.cjs' git 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 sh /usr/bin/git "prettier" --chegit GOPROXY ache/go/1.25.0/x--show-toplevel 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/actions/checkout/git/ref/tags/v6
    • 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 0/x64/bin/node git conf�� --get remote.origin.url /usr/lib/git-core/git -json GO111MODULE n-dir/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 k/gh-aw/gh-aw/.github/workflows/audit-workflows.md -goversion /usr/bin/git -c=4 -nolocalimports -importcfg git init�� /home/REDACTED/work/gh-aw/gh-aw/pkg/logger/doc.go /home/REDACTED/work/gh-aw/gh-aw/pkg/logger/logger.go /usr/lib/git-core/git '**/*.ts' '**/*.git GO111MODULE ache/go/1.25.0/x--show-toplevel /usr/lib/git-core/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --show-toplevel HC/wPHmRHH07drGotDxh6_4/9rUbv3kNTest User /usr/bin/git -json GO111MODULE 64/bin/go git rev-�� --show-toplevel node /usr/bin/git --check **/*.cjs 64/pkg/tool/linu--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 ache/go/1.25.0/x64/bin/go -json GO111MODULE 64/bin/go go 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 /ref/tags/v8 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 GO111MODULE 6206877/b405/mathutil.test GOINSECURE GOMOD GOMODCACHE 6206877/b405/mat--jq e=/t�� atjTay5oJ GO111MODULE (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 0/x64/lib/node_mGOMODCACHE 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 ache/go/1.25.0/xGOMODCACHE 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 tions/node_modulGOMODCACHE GOINSECURE GOMOD GOMODCACHE go env '**/*.ts' '**/*.GOINSECURE GO111MODULE ache/go/1.25.0/xGOMODCACHE 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 xterm-color -tests /opt/hostedtoolcache/node/24.14.0/x64/bin/node -json GO111MODULE de_modules/.bin/--show-toplevel node /tmp�� /tmp/TestHashConsistency_GoAndJavaScript3179056500/001/test-frontmatter-with-nested-objects.md go /usr/bin/git '**/*.ts' '**/*.git GO111MODULE 64/bin/sh git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha runs/20260311-071648-45110/test-1155022247 git ache/node/24.14.0/x64/bin/node --show-toplevel go /usr/bin/git ache/node/24.14.0/x64/bin/node 3833�� xterm-color git /opt/hostedtoolcache/node/24.14.0/x64/bin/node --show-toplevel ache/go/1.25.0/xrev-parse /usr/bin/git node (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-071240-40256/test-889829837/.github/workflows config /usr/bin/git remote.origin.urgit GO111MODULE tions/setup/node--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/setup-node/git/ref/tags/v4 --jq .object.sha runs/20260311-071648-45110/test-1155022247 git /usr/bin/gh s/test.md 64/pkg/tool/linurev-parse /usr/bin/git gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq /usr/bin/infocmp --show-toplevel go /usr/bin/git infocmp (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 6206877/b370/_pkg_.a GO111MODULE 6206877/b370=> GOINSECURE GOMOD GOMODCACHE go env zCbs/Enf1PpAagN0xKNqLzCbs GO111MODULE 0/x64/bin/node GOINSECURE GOMOD GOMODCACHE 6206877/b370/importcfg (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq .object.sha --show-toplevel git ache/node/24.14.0/x64/bin/node --show-toplevel go /usr/bin/git git t-27�� sistency_GoAndJavaScript1713487802/001/test-empty-frontmatter.md git fg --show-toplevel go /usr/bin/git 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 run lint:cjs Name,path,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle GOSUMDB GOWORK 64/bin/go sh -c "prettier" --check 'scripts/**/*.js' --ignore-paGOSUMDB go 64/pkg/tool/linux_amd64/compile -json GO111MODULE 64/bin/go 64/pkg/tool/linux_amd64/compile (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 estl�� "prettier" --check 'scripts/**/*.js' --ignore-pa-p go ache/go/1.25.0/x64/bin/go tierignore 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' -test.timeout=10m0s GOPROXY ache/go/1.25.0/x64/bin/go GOSUMDB GOWORK 64/bin/go sh -c "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/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel git /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel git /usr/bin/git git (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 64/bin/go GOINSECURE GOMOD GOMODCACHE go estl�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 git /usr/bin/git user.name Test User /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git -aw/git/ref/tagsgit go /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 agHnIvLtG6LqK/zI0C4dTT4sh5EV1-sSHZ/0_FMkqdg9iiB6eqkRX2c/LsL2YtGagHnIvLtG6LqK /usr/bin/git ry=1 git che/go-build/bf//tmp/gh-aw-test-runs/20260311-072002-49735/test-206142054 git rev-�� --show-toplevel git /usr/bin/git user.email test@example.comrev-parse /usr/bin/git git (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)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 git /usr/bin/git --get remote.origin.urapi /usr/lib/git-cor/repos/actions/checkout/git/ref/tags/v5 git rev-�� --show-toplevel /usr/lib/git-core/git /usr/bin/git run --auto /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 git /usr/bin/git --show-toplevel git ache/node/24.14./tmp/gh-aw-test-runs/20260311-072002-49735/test-206142054 git rev-�� --show-toplevel /tmp/go-build90630302/b384/constants.test /usr/bin/git k/gh-aw/gh-aw/.ggit -test.v=true /usr/bin/git git (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/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 git /usr/bin/git --show-toplevel go /usr/bin/git git rev-�� --show-toplevel git Name,path,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 git /usr/bin/git --show-toplevel git /tmp/go-build906/tmp/gh-aw-test-runs/20260311-072002-49735/test-206142054 git rev-�� --show-toplevel /tmp/go-build90630302/b381/console.test /usr/bin/git -test.paniconexigit -test.v=true /usr/bin/git git (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 64/bin/go GOINSECURE GOMOD GOMODCACHE go estl�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 git /usr/bin/git it/ref/tags/v7 remote.origin.urrev-parse /opt/hostedtoolc--show-toplevel git rev-�� --show-toplevel node /usr/bin/git /home/REDACTED/worgit go /opt/hostedtoolcache/node/24.14.--show-current git (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 git /usr/bin/git --show-toplevel (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/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 4 /usr/bin/git d -name bin git rev-�� --show-toplevel git /usr/bin/git -b feature-branch /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 git /usr/bin/git --show-toplevel l /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel git /usr/bin/git git (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)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 git /usr/bin/git /home/REDACTED/worgit /home/REDACTED/worrev-parse /usr/lib/git-cor--show-toplevel git rev-�� --show-toplevel /usr/lib/git-core/git /usr/bin/git run --auto /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 git /usr/bin/git --show-toplevel l /usr/bin/git git rev-�� --show-toplevel (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)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 git /usr/bin/git add origin /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git nt/action/git/regit go /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 git /usr/bin/git --show-toplevel git /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel git /usr/bin/gh git (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)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --show-toplevel go /usr/bin/git 1240-40256/test-git GO111MODULE ache/go/1.25.0/x--show-toplevel git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE 6206877/b392/con--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path test/concurrent-image:v1.0.0 git /usr/bin/git vaScript17134878git git /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel docker iptables git (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb --jq .object.sha --show-toplevel git /usr/bin/git .cfg git /usr/bin/git git rev-�� --show-toplevel git /usr/bin/sed --get remote.origin.ur-d /usr/bin/git sed (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-paGOSUMDB GO111MODULE datedAt,event,headBranch,headSha,displayTitle GOINSECURE GOMOD GOMODCACHE go env 168409129/.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 runs/20260311-07/opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet GO111MODULE /opt/hostedtoolc-bool git rev-�� --show-toplevel go /usr/bin/git -aw/git/ref/tagsinfocmp GO111MODULE /opt/hostedtoolcxterm-color 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 tions/setup/nodeGOMODCACHE GOINSECURE GOMOD GOMODCACHE go env f1958902580090fbGOSUMDB GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq .object.sha --show-toplevel go 327f55fad396612b-d SameOutput185768bash GO111MODULE /opt/hostedtoolc--noprofile git rev-�� --show-toplevel go /usr/bin/git 1240-40256/test-/tmp/go-build90630302/b414/styles.test GO111MODULE /opt/hostedtoolc-test.paniconexit0 git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel git ache/go/1.25.0/x--show-toplevel git rev-�� --show-toplevel git /usr/bin/git --show-toplevel git /usr/bin/git git (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 ules/.bin/sh GOINSECURE GOMOD GOMODCACHE go env */*.ts' '**/*.jsGOSUMDB 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 ache/go/1.25.0/xGOMODCACHE GOINSECURE GOMOD GOMODCACHE go env */*.ts' '**/*.jsGOSUMDB 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 ache/go/1.25.0/xGOMODCACHE GOINSECURE GOMOD GOMODCACHE . Run 'make deps/tmp/go-build2626206877/b362/vet.cfg env */*.ts' '**/*.jsGOSUMDB GO111MODULE 64/bin/go hen \ echo "JSOgit 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 h GOINSECURE GOMOD GOMODCACHE go env */*.ts' '**/*.js-errorsas GO111MODULE 64/bin/go GOINSECURE GOMOD (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq .object.sha --show-toplevel go /usr/bin/git /ref/tags/v8 GO111MODULE .cfg git rev-�� --show-toplevel go /usr/bin/git runs/20260311-07/opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/link GO111MODULE (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel git cal/bin/bash git rev-�� --show-toplevel git /usr/bin/git --show-toplevel git /usr/bin/git git (http block)
  • https://api.github.com/repos/githubnext/agentics/git/ref/tags/
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha 1409104988/.github/workflows git /usr/bin/git --show-toplevel git /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel git /usr/bin/git git (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 ty-test.md GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go 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 go ache/go/1.25.0/x64/bin/node ithub/workflows/git GO111MODULE 6206877/b272/vet.cfg git ache�� --show-toplevel nly /usr/bin/git -aw/git/ref/tagsgh stmain.go 0/x64/bin/node tDxh6_4/9rUbv3kN--jq (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)
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion ere go /usr/bin/git tr [:up�� [:lower:] git /usr/bin/git /tmp/gh-aw-test-git rev-parse /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion --show-toplevel l /tmp/go-build906--show-toplevel git rev-�� --show-toplevel /tmp/go-build90630302/b394/logge-w /usr/bin/git -test.paniconexigit -test.v=true /opt/hostedtoolc--show-toplevel git (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 ache/go/1.25.0/xGOMODCACHE GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo oFiles,IgnoredOtGOMODCACHE GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE ache/go/1.25.0/xGOMODCACHE GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo /usr/bin/git 1240-40256/test-gh GO111MODULE ache/go/1.25.0/x/repos/actions/checkout/git/ref/tags/v5 git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE /opt/hostedtoolc--show-toplevel git (http block)
  • https://api.github.com/repos/owner/repo/contents/file.md
    • Triggering command: /tmp/go-build2626206877/b383/cli.test /tmp/go-build2626206877/b383/cli.test -test.testlogfile=/tmp/go-build2626206877/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)
    • Triggering command: /tmp/go-build90630302/b001/cli.test /tmp/go-build90630302/b001/cli.test -test.testlogfile=/tmp/go-build90630302/b001/testlog.txt -test.paniconexit0 -test.v=true -test.run=^Test -test.short=true -test.timeout=3m0s 64/bin/node 1240-40256/test-git GO111MODULE .cfg git 0/x6�� --show-toplevel go /usr/bin/git /v2.0.0 GO111MODULE 0/x64/bin/node git (http block)
    • Triggering command: /tmp/go-build3475729665/b359/cli.test /tmp/go-build3475729665/b359/cli.test -test.testlogfile=/tmp/go-build3475729665/b359/testlog.txt -test.paniconexit0 -test.v=true -test.run=^Test -test.short=true -test.timeout=3m0s 64/bin/node --show-toplevel git 0/x64/bin/node git 0/x6�� --show-toplevel git /usr/bin/git SameOutput253212git /usr/bin/git /usr/bin/git git (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)
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name --show-toplevel NJzGr-D7xkIC-EgawJ/GFtmVa307QDDNuUCuh0B/-q2laYTO-test.v=true /usr/bin/git 1240-40256/test-git GO111MODULE g_.a git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE 0/x64/bin/node git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name --show-toplevel git /usr/bin/git 1648-45110/test-git git /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git ithub/workflows /usr/lib/git-correv-parse /usr/bin/git git (http block)

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


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

- Add ConfigRenderer interface with RenderConfig method to agentic_engine.go
- Add CodingAgentEngine to embed ConfigRenderer
- Add BaseEngine.RenderConfig no-op (all four existing engines inherit it)
- Call RenderConfig in setupEngineAndImports, store in engineSetupResult
- Add EngineConfigSteps to WorkflowData
- Emit config steps before execution steps in generateMainJobSteps
- Add engine_config_render_test.go with 4 tests covering all acceptance criteria"

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add runtime config-renderer hook to CodingAgentEngine interface Phase 5: Add RenderConfig hook to CodingAgentEngine interface Mar 11, 2026
@pelikhan pelikhan marked this pull request as ready for review March 11, 2026 11:30
Copilot AI review requested due to automatic review settings March 11, 2026 11:30
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

Adds a RenderConfig hook to the engine runtime adapter interface so engines can emit pre-execution GitHub Actions steps that generate required on-disk config before the AI execution step runs.

Changes:

  • Introduces ConfigRenderer (with RenderConfig(*ResolvedEngineTarget)) and embeds it into CodingAgentEngine, with a no-op default in BaseEngine.
  • Wires RenderConfig through the orchestrator into WorkflowData.EngineConfigSteps and emits those steps in the main job before engine execution.
  • Adds unit tests covering no-op behavior for built-in engines and YAML step ordering when EngineConfigSteps is present.

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/agentic_engine.go Adds ConfigRenderer interface, embeds it in CodingAgentEngine, and provides a default no-op BaseEngine.RenderConfig.
pkg/workflow/compiler_orchestrator_engine.go Calls RenderConfig after engine resolution and stores returned steps in engineSetupResult.
pkg/workflow/compiler_orchestrator_workflow.go Threads engineSetupResult.configSteps into WorkflowData.EngineConfigSteps.
pkg/workflow/compiler_types.go Adds EngineConfigSteps to WorkflowData.
pkg/workflow/compiler_yaml_main_job.go Serializes EngineConfigSteps via ConvertStepToYAML before AI execution steps.
pkg/workflow/engine_config_render_test.go Adds tests for built-in no-op behavior and config-step ordering in generated YAML.

💡 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 +130 to +132
// TestOrchestratorCallsRenderConfig verifies that setupEngineAndImports invokes
// RenderConfig and stores the returned steps in engineSetupResult.configSteps.
func TestOrchestratorCallsRenderConfig(t *testing.T) {
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.

Test name/comment claim this verifies setupEngineAndImports calls RenderConfig and stores engineSetupResult.configSteps, but the test only resolves the engine and calls RenderConfig directly on the runtime adapter. Either rename/reword this test to reflect what it actually covers, or update it to invoke compiler.setupEngineAndImports (or a higher-level compile entrypoint) and assert the returned engineSetupResult.configSteps / WorkflowData.EngineConfigSteps behavior.

Copilot uses AI. Check for mistakes.
Comment on lines +215 to +219
// ConfigRenderer is an optional hook that runtimes may implement to emit generated
// config files or metadata before execution steps run.
type ConfigRenderer interface {
// RenderConfig optionally generates runtime config files or metadata.
// Returns a slice of GitHub Actions steps that write config to disk.
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 ConfigRenderer docstring says it can emit "config files or metadata", but the interface only returns GitHub Actions steps (no way to return metadata). Also, it’s described as "optional" but it’s embedded in CodingAgentEngine (so it’s required for implementations, even if the default is a no-op). Please adjust the comments to match the actual API, or extend the API if metadata is a real requirement.

Suggested change
// ConfigRenderer is an optional hook that runtimes may implement to emit generated
// config files or metadata before execution steps run.
type ConfigRenderer interface {
// RenderConfig optionally generates runtime config files or metadata.
// Returns a slice of GitHub Actions steps that write config to disk.
// ConfigRenderer is a hook that runtimes may implement to emit generated runtime
// configuration before execution steps run.
//
// Implementations that do not need to generate any configuration should return
// (nil, nil) from RenderConfig (or rely on a no-op implementation), so the hook
// is effectively optional for engines.
type ConfigRenderer interface {
// RenderConfig optionally generates runtime configuration by returning a slice
// of GitHub Actions steps that write any required config to disk.

Copilot uses AI. Check for mistakes.
Comment on lines +282 to +285
for _, step := range data.EngineConfigSteps {
stepYAML, err := ConvertStepToYAML(step)
if err != nil {
return fmt.Errorf("failed to render engine config step: %w", err)
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.

When ConvertStepToYAML fails, the returned error doesn't identify which engine config step caused the failure. Including the step index and/or the step "name" (when present) in the error message would make debugging malformed RenderConfig output much easier.

Suggested change
for _, step := range data.EngineConfigSteps {
stepYAML, err := ConvertStepToYAML(step)
if err != nil {
return fmt.Errorf("failed to render engine config step: %w", err)
for i, step := range data.EngineConfigSteps {
stepYAML, err := ConvertStepToYAML(step)
if err != nil {
return fmt.Errorf("failed to render engine config step %d: %w", i+1, err)

Copilot uses AI. Check for mistakes.
@pelikhan pelikhan merged commit c3a0db5 into main Mar 11, 2026
113 checks passed
@pelikhan pelikhan deleted the copilot/add-runtime-config-renderer-hook branch March 11, 2026 11:36
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.

[plan] Phase 5: Add runtime config-renderer hook to CodingAgentEngine interface

3 participants