Skip to content

Resolve critical cross-package type-name conflicts (MCP, engine, repo, file tracking)#26945

Merged
pelikhan merged 3 commits intomainfrom
copilot/resolve-mcpserverconfig-naming-conflicts
Apr 17, 2026
Merged

Resolve critical cross-package type-name conflicts (MCP, engine, repo, file tracking)#26945
pelikhan merged 3 commits intomainfrom
copilot/resolve-mcpserverconfig-naming-conflicts

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 17, 2026

Typist analysis flagged four critical duplicate type-name clusters where different structs/interfaces shared names across packages, causing ambiguous intent and silent serialization divergence risks (notably parser vs workflow MCP config models). This change makes those boundaries explicit through targeted type renames and call-site updates.

  • Type conflict resolution (parser/workflow/cli)

    • pkg/parser: MCPServerConfigRegistryMCPServerConfig
    • pkg/cli (audit): EngineConfigAuditEngineConfig
    • pkg/cli (trial): RepoConfigTrialRepoContext
    • pkg/workflow: FileTracker interface → FileCreationTracker
  • API/call-site propagation

    • Updated all direct references in parser/cli/workflow codepaths, including MCP inspect/list/secrets flows, audit report assembly/rendering, trial option wiring, and compiler file-tracker injection.
    • Kept external JSON shape stable where relevant (e.g. audit payload still uses engine_config field name).
  • Documentation and intent clarity

    • Updated parser/workflow README type tables and signatures to reflect new names.
    • Added explicit comment in parser MCP type declaring intentional split from workflow-facing MCP config model.
// parser-layer type (JSON/registry parsing)
type RegistryMCPServerConfig struct {
    types.BaseMCPServerConfig
    Name      string   `json:"name"`
    Registry  string   `json:"registry"`
    ProxyArgs []string `json:"proxy-args"`
    Allowed   []string `json:"allowed"`
}

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 0387811/b250/vetrev-parse ache/go/1.25.8/x--show-toplevel git rev-�� --show-toplevel ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet /usr/bin/git se 0387811/b074/vetrev-parse ache/go/1.25.8/x--show-toplevel 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 GO111MODULE ache/go/1.25.8/x--show-toplevel git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE /opt/hostedtoolc--show-toplevel git (http block)
  • https://api.github.com/orgs/test-owner/actions/secrets
    • Triggering command: /usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name -json GO111MODULE x_amd64/compile -Oz --enable-bu/opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOMOD GOMODCACHE x_amd64/compile env -json ag.go x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name 2807235/b366/_pkGOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env sVk9/ojlA3gIpi5uGOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE 2807235/b366/imp-buildtags (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, .object.type] | @tsv --show-toplevel 64/pkg/tool/linu-test.v=true /usr/bin/git ntdrain.test O_2Lfc9jA 64/pkg/tool/linu--show-toplevel /usr/bin/git conf�� --get-regexp ^remote\..*\.gh-resolved$ /usr/bin/git 4084678030/.githgit GO111MODULE 64/pkg/tool/linu--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq [.object.sha, .object.type] | @tsv /home/REDACTED/work/gh-aw/gh-aw/.github/workflows/artifacts-summary.md x_amd64/asm /usr/bin/git -json GO111MODULE 64/bin/go /usr/bin/git conf�� --get-regexp ^remote\..*\.gh-resolved$ /usr/bin/git LsRemoteWithRealgit LsRemoteWithRealrev-parse 64/bin/go 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, .object.type] | @tsv /tmp/TestGuardPolicyBlockedUsersExpressionCompil-errorsas config /usr/bin/git remote.origin.urgit GO111MODULE x_amd64/compile git init�� GOMODCACHE (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq [.object.sha, .object.type] | @tsv /tmp/gh-aw-test-runs/20260417-223018-74787/test-1014376146/.github/workflows remote /usr/bin/git -json GO111MODULE 64/bin/go git remo�� GOMODCACHE (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, .object.type] | @tsv 3/001/test-frontmatter-with-arrays.md 0387811/b289/vet.cfg ortcfg.link -p main -lang=go1.25 9Ym34G_sfJyM6o-Irepos/{owner}/{repo}/actions/runs/2/artifacts -o 0440-39673/test-.artifacts[].name -trimpath g_.a -p time -lang=go1.25 ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq [.object.sha, .object.type] | @tsv --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/git 0591623/b217/_pkgit QuTc/8J1aAAdvjhKrev-parse ache/go/1.25.8/x--show-toplevel git rev-�� --show-toplevel ache/go/1.25.8/x64/pkg/tool/linu-test.v=true /usr/bin/git se 0387811/b109/vetrev-parse x_amd64/compile git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq [.object.sha, .object.type] | @tsv --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet /usr/bin/git -bool -buildtags ache/node/24.14.--show-toplevel git rev-�� --show-toplevel /tmp/go-build3210387811/b406/console.test /usr/bin/git sistency_GoAndJagit -test.v=true ache/go/1.25.8/x--show-toplevel 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, .object.type] | @tsv --show-toplevel /tmp/go-build3210387811/b460/_testmain.go /usr/bin/git efaultBranchFromgit efaultBranchFromrev-parse .cfg git rev-�� --show-toplevel ache/go/1.25.8/x-importcfg /usr/bin/git ApprovalLabelsCogit 0387811/b261/vetrev-parse ache/go/1.25.8/x--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq [.object.sha, .object.type] | @tsv --show-toplevel go /usr/bin/git -json GO111MODULE ache/go/1.25.8/xHEAD git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE ache/go/1.25.8/x--show-toplevel git (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v9
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv go1.25.8 -c=4 -nolocalimports -importcfg /tmp/go-build3210387811/b433/importcfg -pack /tmp/go-build3210387811/b433/_testmain.go env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (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, .object.type] | @tsv --show-toplevel -extld=gcc /usr/bin/git g_.a GO111MODULE x_amd64/vet git remo�� abis x_amd64/vet /usr/bin/gh 64/src/runtime/igit .cfg 64/pkg/tool/linu--show-toplevel gh (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv add remote1 /usr/bin/git -json GO111MODULE 64/bin/go git rev-�� --show-toplevel go /opt/hostedtoolcache/node/24.14.1/x64/bin/node -json GO111MODULE 64/bin/go /opt/hostedtoolcache/node/24.14.1/x64/bin/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, .object.type] | @tsv --show-toplevel 2xpu7MOJIw7R /usr/bin/git g_.a lNGu_38wk x_amd64/compile git rev-�� --show-toplevel x_amd64/compile /usr/bin/git ortcfg .cfg 64/pkg/tool/linu--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --get remote.myorg.url /usr/bin/git repo2629930000/0git GO111MODULE 64/bin/go git rev-�� --show-toplevel go /opt/hostedtoolcache/node/24.14.1/x64/bin/node -json GO111MODULE 64/bin/go /opt/hostedtoolcache/node/24.14.1/x64/bin/node (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, .object.type] | @tsv -aw/git/ref/tags/v2.0.0 go bject.type] | @tsv -json GO111MODULE x_amd64/compile git rev-�� --show-toplevel x_amd64/compile /usr/bin/git -json GO111MODULE x_amd64/compile git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv /tmp/go-build457503807/b001/exe/a.out -importcfg /usr/lib/git-core/git -buildmode=exe -buildid=PQN7bptrev-parse -s /usr/lib/git-core/git main�� image:v1.0.0 --auto 655207/b453/vet.cfg ntent.md GO111MODULE 64/bin/go git (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v0.1.2
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0.1.2 --jq [.object.sha, .object.type] | @tsv remove myorg /opt/hostedtoolcache/node/24.14.1/x64/bin/node 02/001 OhJqGnTLC x_amd64/vet node /tmp�� /home/REDACTED/work/gh-aw/gh-aw/.github/workflows/agent-persona-explorer.md x_amd64/vet /opt/hostedtoolcache/node/24.14.1/x64/bin/node ortcfg .cfg 64/pkg/tool/linu--show-toplevel /opt/hostedtoolcache/node/24.14.1/x64/bin/node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0.1.2 --jq [.object.sha, .object.type] | @tsv add origin /opt/hostedtoolcache/node/24.14.1/x64/bin/node ub/workflows GO111MODULE 64/bin/go node /tmp�� /home/REDACTED/work/gh-aw/gh-aw/.github/workflows/approach-validator.md go /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq [.object.sha, .object.type] | @tsv sistency_GoAndJavaScript591346503/001/test-frontmatter-with-arrays.md -importcfg /usr/bin/git -s -w -buildmode=exe git -C /tmp/gh-aw-test-runs/20260417-220440-39673/test-.artifacts[].name config /usr/bin/git remote.origin.urgit h88578129/001' x_amd64/compile git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq [.object.sha, .object.type] | @tsv /tmp/go-build1854454791/b001/_pkg_.a -trimpath /usr/bin/git -p main -lang=go1.25 git comm�� r-test3826733374/test1.md r-test3826733374/test2.lock.yml /usr/bin/git go1.25.8 -c=4 -nolocalimports git (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq [.object.sha, .object.type] | @tsv xterm-color -tests ache/go/1.25.8/x64/pkg/tool/linux_amd64/link -json GO111MODULE x_amd64/compile ache/go/1.25.8/x64/pkg/tool/linux_amd64/link -C 0387811/b457/typeutil.test remote 0387811/b457/importcfg.link -json GO111MODULE x_amd64/compile rFoiYicFsYe-O/_kz8wMEZNDzYl9ptOGPo/5GniUk8RBwwF8S8eKncR/bXjFK1lrFoiYicFsYe-O (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq [.object.sha, .object.type] | @tsv 1 GOPROXY /usr/lib/git-core/git-upload-pack GOSUMDB GOWORK 64/bin/go git-upload-pack /tmp�� GOMODCACHE ache/go/1.25.8/xGO111MODULE /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/1/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/1/artifacts --jq .artifacts[].name GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE fips140/sha256 GOMODCACHE 64/pkg/tool/linux_amd64/vet env 3140016483 t2Bi/LbyKJAzlPTfrrG8ct2Bi .cfg GOINSECURE g/x/text/secure//tmp/js-hash-test-1834225541/test-hash.js GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-trimpath (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linutest@example.com env 2187288050/.github/workflows GO111MODULE ache/go/1.25.8/x64/pkg/tool/linu-test.short=true GOINSECURE /semver GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/1/artifacts --jq .artifacts[].name GO111MODULE 1/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin/node GOINSECURE GOMOD GOMODCACHE go 1/x6�� ut2047985464/001 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 api --paginate repos/{owner}/{repo}/actions/runs/12345/artifacts --jq .artifacts[].name .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env 0591623/b200/_pkg_.a GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD 0591623/b078/sym--show-toplevel ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env 3788686631 GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE nal/fips140tls GOMODCACHE 64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12345/artifacts --jq .artifacts[].name GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env 11/001/test-inlined-imports-enabled-with-env-template-expressions-in-body.md GO111MODULE 1/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin/node GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12346/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12346/artifacts --jq .artifacts[].name GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env 0591623/b203/_pkg_.a -QbQ/h0mDcb4RKnBUHEwN-QbQ x_amd64/compile GOINSECURE fips140/mlkem GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env 3788686631 go ache/go/1.25.8/x64/pkg/tool/linu-test.short=true GOINSECURE g/x/text/unicoderev-parse GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12346/artifacts --jq .artifacts[].name GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env y_with_repos=public_2938459363/0remote.origin.url GO111MODULE n-dir/node GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/2/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/2/artifacts --jq .artifacts[].name GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env 0591623/b223/_pkg_.a GO111MODULE eutil.test GOINSECURE GOMOD GOMODCACHE eutil.test (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 rg/x/text@v0.36.0/internal/language/common.go 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env 0591623/b173/_pkg_.a V7o_/18xeupG6XnJInX8DV7o_ .cfg GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/2/artifacts --jq .artifacts[].name GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go 1/x6�� mpiledOutput4221283952/001 GO111MODULE ache/go/1.25.8/x64/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 api --paginate repos/{owner}/{repo}/actions/runs/3/artifacts --jq .artifacts[].name GO111MODULE 64/pkg/tool/linu-nolocalimports GOINSECURE fips140/sha512 GOMODCACHE 64/pkg/tool/linu/tmp/go-build3210387811/b451/_testmain.go env 3140016483 ZDcH/WlCyhVRj9mWQyquJZDcH 64/pkg/tool/linux_amd64/link GOINSECURE l GOMODCACHE 64/pkg/tool/linux_amd64/link (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD 0591623/b007/sym--git-dir 64/pkg/tool/linux_amd64/vet ache�� 2187288050/.github/workflows r73k/ZR15bOYtzO_sNGC5r73k ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/3/artifacts --jq .artifacts[].name GO111MODULE 86_64/node GOINSECURE GOMOD GOMODCACHE go 1/x6�� mpiledOutput4221283952/001 GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/4/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/4/artifacts --jq .artifacts[].name GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE /unix GOMODCACHE 64/pkg/tool/linux_amd64/vet env 0591623/b227/_pkg_.a 7LFx/9x5EhNlMwHDxpQFH7LFx util.test GOINSECURE l/ascii GOMODCACHE util.test (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD 0591623/b013/sym--show-toplevel 64/pkg/tool/linux_amd64/vet env 2187288050 0591623/b013/importcfg ache/go/1.25.8/x64/pkg/tool/linu-lang=go1.25 GOINSECURE b/gh-aw/pkg/semvrev-parse GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-goversion (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/4/artifacts --jq .artifacts[].name GO111MODULE n-dir/node GOINSECURE GOMOD GOMODCACHE go 1/x6�� -json GO111MODULE ache/go/1.25.8/x64/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 api --paginate repos/{owner}/{repo}/actions/runs/5/artifacts --jq .artifacts[].name GO111MODULE 64/pkg/tool/linu-importcfg GOINSECURE fips140/sha3 GOMODCACHE S8eKncR/bXjFK1lrFoiYicFsYe-O env 3140016483 Ldjv/q8rDzC5dO2KyVIFwLdjv 64/pkg/tool/linux_amd64/compile GOINSECURE able GOMODCACHE 64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 g/semverutil/semverutil.go 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env 0591623/b254/_pkg_.a k-ff/hcoMcb4nJlDk1Ubnk-ff .cfg GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/5/artifacts --jq .artifacts[].name GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go 1/x6�� 486/001/stability-test.md GO111MODULE ache/go/1.25.8/x64/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 -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (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 GOMOD GOMODCACHE x_amd64/vet env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (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 GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env b/workflows GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE fips140hash 0591623/b011/sym--show-toplevel 64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v0.47.4
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v0.47.4 --jq [.object.sha, .object.type] | @tsv --show-toplevel 64/pkg/tool/linuremote.origin.url /usr/bin/git 3/001/test-emptygit 0387811/b026/vetrev-parse x_amd64/compile git rev-�� --show-toplevel x_amd64/compile /usr/bin/git se 0387811/b079/vet-lh g_.a git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v0.47.4 --jq [.object.sha, .object.type] | @tsv --show-toplevel go /usr/bin/git -json GO111MODULE ache/go/1.25.8/x--show-toplevel git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE ache/go/1.25.8/x/tmp/gh-aw/aw-feature-branch.patch git (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, .object.type] | @tsv b/workflows GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE fips140hash 0591623/b011/sym--show-toplevel 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq [.object.sha, .object.type] | @tsv y_with_repos=public_1756588695/0remote.origin.url GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet env -json GO111MODULE k GOINSECURE GOMOD GOMODCACHE go (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, .object.type] | @tsv -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet env g_.a GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE SLlQ1ZG/V_z3kiodrev-parse (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq [.object.sha, .object.type] | @tsv re GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json 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, .object.type] | @tsv che/go-build/c7/GOSUMDB GOPROXY 64/bin/go GOSUMDB GOWORK 64/bin/go /opt/hostedtoolc--jq -o /tmp/go-build3502807235/b434/_pkGOINSECURE -trimpath 64/bin/go -p main -lang=go1.25 go (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, .object.type] | @tsv -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json 769545e0f9e4c638-w x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet env Gitmain_branch1855883639/001' Gitmain_branch1855883639/001' x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet env g_.a GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (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, .object.type] | @tsv -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq [.object.sha, .object.type] | @tsv re GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq [.object.sha, .object.type] | @tsv "prettier" --che-errorsas GOPROXY 64/bin/go GOSUMDB GOWORK 64/bin/go go env -json 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, .object.type] | @tsv b/workflows .cfg 64/pkg/tool/linux_amd64/link GOINSECURE 0591623/b011/asm/tmp/js-hash-test-2226138381/test-hash.js ache/go/1.25.8/x/home/REDACTED/work/gh-aw/gh-aw/.github/workflows/agentic-observability-kit.md 64/pkg/tool/linux_amd64/link (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq [.object.sha, .object.type] | @tsv y_with_repos=public_1756588695/001 GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env from .github/aw to pkg/actionpins/data/action_pins.json..." GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (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 ntio/asm/cpu/armrev-parse 0591623/b029/sym--show-toplevel 64/pkg/tool/linux_amd64/vet env 0591623/b161/_pkg_.a 0591623/b029/importcfg ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE th2 GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion GOINSECURE GOMOD GOMODCACHE go tion�� -json GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE ache/go/1.25.8/x64/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 x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json o x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (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 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/owner/repo/contents/file.md
    • Triggering command: /tmp/go-build3210387811/b400/cli.test /tmp/go-build3210387811/b400/cli.test -test.testlogfile=/tmp/go-build3210387811/b400/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 x_amd64/compile GOINSECURE GOMOD GOMODCACHE 6AWy9kr/rVG28oB_-buildtags (http block)
    • Triggering command: /tmp/go-build3048244678/b400/cli.test /tmp/go-build3048244678/b400/cli.test -test.testlogfile=/tmp/go-build3048244678/b400/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true --show-toplevel nly /usr/bin/git go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /tmp/go-build334655207/b400/cli.test /tmp/go-build334655207/b400/cli.test -test.testlogfile=/tmp/go-build334655207/b400/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true GOINSECURE GOMOD erignore 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 -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE de GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name 2807235/b434/_pkGOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env ANRK/MNPu52YEeLhGOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE 2807235/b434/impc (http block)

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

Copilot AI changed the title [WIP] Fix critical MCPServerConfig type naming conflicts in pkg/parser and pkg/workflow Resolve critical cross-package type-name conflicts (MCP, engine, repo, file tracking) Apr 17, 2026
Copilot AI requested a review from pelikhan April 17, 2026 22:50
@pelikhan pelikhan marked this pull request as ready for review April 17, 2026 22:52
Copilot AI review requested due to automatic review settings April 17, 2026 22:52
@pelikhan pelikhan merged commit 4deb27c into main Apr 17, 2026
53 of 54 checks passed
@pelikhan pelikhan deleted the copilot/resolve-mcpserverconfig-naming-conflicts branch April 17, 2026 22:52
Copy link
Copy Markdown
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 resolves several cross-package type-name collisions by renaming conflicted structs/interfaces and propagating those renames through parser/cli/workflow call sites, tests, and documentation to make configuration/model boundaries explicit.

Changes:

  • Renamed parser MCP config model to parser.RegistryMCPServerConfig and updated MCP inspect/list/secrets flows accordingly.
  • Renamed workflow compiler file-tracking interface to workflow.FileCreationTracker and updated docs/signatures.
  • Renamed CLI audit/trial types (AuditEngineConfig, TrialRepoContext) and updated audit data assembly/rendering and trial option wiring.
Show a summary per file
File Description
pkg/workflow/mcp_json_test.go Updates workflow tests to expect parser.RegistryMCPServerConfig.
pkg/workflow/mcp_config_custom.go Updates MCP config extraction helper to return *parser.RegistryMCPServerConfig.
pkg/workflow/compiler_types.go Renames compiler file-tracking interface to FileCreationTracker and updates SetFileTracker.
pkg/workflow/README.md Updates public API table to reflect FileCreationTracker rename.
pkg/parser/mcp_test.go Updates parser MCP tests for RegistryMCPServerConfig.
pkg/parser/mcp.go Renames exported parser MCP config type and updates related APIs/structs.
pkg/parser/README.md Updates README type/function signatures for renamed parser MCP config type.
pkg/cli/trial_types.go Renames trial repo config container type to TrialRepoContext.
pkg/cli/trial_command.go Wires TrialRepoContext into trial options construction.
pkg/cli/secrets_test.go Updates secrets extraction tests to use parser.RegistryMCPServerConfig.
pkg/cli/secrets.go Updates secrets extraction helper signature to accept parser.RegistryMCPServerConfig.
pkg/cli/mcp_workflow_scanner.go Updates scanned workflow metadata to store []parser.RegistryMCPServerConfig.
pkg/cli/mcp_workflow_loader.go Updates loader signature/docs to return []parser.RegistryMCPServerConfig.
pkg/cli/mcp_validation.go Updates secret validation signature to accept parser.RegistryMCPServerConfig.
pkg/cli/mcp_tool_table_test.go Updates tool-table rendering tests for renamed parser MCP config type.
pkg/cli/mcp_list_tools_test.go Updates list-tools tests for renamed parser MCP config type.
pkg/cli/mcp_list_tools.go Updates list-tools implementation to use renamed parser MCP config type.
pkg/cli/mcp_list_test.go Updates MCP list tests to use renamed parser MCP config type.
pkg/cli/mcp_list.go Updates MCP list implementation signatures/mappers to use renamed parser MCP config type.
pkg/cli/mcp_inspect_test.go Updates inspect tests to use renamed parser MCP config type.
pkg/cli/mcp_inspect_mcp_scripts_server.go Updates mcp-scripts server startup to return renamed parser MCP config type.
pkg/cli/mcp_inspect_mcp.go Updates inspect/connect helpers to accept renamed parser MCP config type.
pkg/cli/mcp_inspect_list.go Updates safe-outputs filtering helper to use renamed parser MCP config type.
pkg/cli/mcp_inspect_inspector.go Updates inspector spawning flow to use []parser.RegistryMCPServerConfig.
pkg/cli/mcp_inspect_headers_test.go Updates HTTP connect tests to use renamed parser MCP config type.
pkg/cli/audit_report_render_overview.go Updates renderer to accept *AuditEngineConfig.
pkg/cli/audit_report.go Updates audit payload to store EngineConfig as *AuditEngineConfig while keeping JSON field name stable.
pkg/cli/audit_expanded_test.go Updates expanded audit tests for renamed engine config type.
pkg/cli/audit_expanded.go Renames CLI audit engine config struct to AuditEngineConfig and updates extractor signature.

Copilot's findings

Tip

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

Comments suppressed due to low confidence (1)

pkg/cli/mcp_list_tools.go:66

  • In the range loop, targetConfig = &config takes the address of the iteration variable, not the slice element. This will point to the same memory each iteration and can end up referencing the last item rather than the matched config. Use an index loop and take &mcpConfigs[i], or copy the matched element into a new variable before taking its address.
	var targetConfig *parser.RegistryMCPServerConfig
	for _, config := range mcpConfigs {
		if strings.EqualFold(config.Name, mcpServerName) {
			targetConfig = &config
			break
  • Files reviewed: 29/29 changed files
  • Comments generated: 1

Comment on lines 567 to +568
// getMCPConfig extracts MCP configuration from a tool config and returns a structured MCPServerConfig
func getMCPConfig(toolConfig map[string]any, toolName string) (*parser.MCPServerConfig, error) {
func getMCPConfig(toolConfig map[string]any, toolName string) (*parser.RegistryMCPServerConfig, error) {
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

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

The doc/comments here still refer to returning/adding fields for MCPServerConfig, but the function now returns *parser.RegistryMCPServerConfig. Updating the comment text (and the inline "Added for ..." notes) would avoid confusion about which MCP config model this helper produces.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown
Contributor

🏗️ Design Decision Gate — ADR Required (Post-Merge Notice)

This PR introduced 142 new lines of code in pkg/ (a core business logic directory), triggering ADR enforcement. No Architecture Decision Record was linked before merge.

Because this PR has already merged, the gate could not block it. An ADR draft has been generated and should be committed manually to docs/adr/ on main.

📄 Draft ADR: docs/adr/26945-package-scoped-type-naming-for-cross-layer-clarity.md


📋 View Draft ADR Content
# ADR-26945: Package-Scoped Type Naming to Eliminate Cross-Layer Ambiguity

**Date**: 2026-04-17
**Status**: Draft
**Deciders**: pelikhan, Copilot

---

## Part 1 — Narrative (Human-Friendly)

### Context

The `gh-aw` codebase uses a layered architecture where `pkg/parser`, `pkg/cli`, and `pkg/workflow` each own distinct processing stages — registry parsing, CLI command logic, and workflow compilation respectively. Over time, types with identical or near-identical names (`MCPServerConfig`, `EngineConfig`, `RepoConfig`, `FileTracker`) proliferated across these packages. Static analysis (Typist) identified four critical clusters where different structs shared names across package boundaries, creating ambiguous intent and silent serialization divergence risk: the parser and workflow layers both had `MCPServerConfig` types that modelled subtly different data shapes from different YAML sources.

### Decision

We will apply package-context prefixes to types whose names are ambiguous across packages, making the owning layer explicit in the type name itself. The four renames are: `parser.MCPServerConfig``parser.RegistryMCPServerConfig`, `cli.EngineConfig``cli.AuditEngineConfig`, `cli.RepoConfig``cli.TrialRepoContext`, and `workflow.FileTracker``workflow.FileCreationTracker`. External JSON field names are preserved where they exist. An explicit source comment is added to `parser.RegistryMCPServerConfig` declaring the intentional split from `workflow.MCPServerConfig`.

### Alternatives Considered

#### Alternative 1: Retain Generic Names and Qualify at Call Sites

Keep the current generic names and rely on import aliases or fully-qualified references to disambiguate. This avoids churn but does not prevent future confusion: new contributors writing cross-package code still see two `MCPServerConfig` types and must read documentation to understand the difference.

#### Alternative 2: Consolidate Into a Shared Types Package

Move shared fields to `pkg/types` and have parser and workflow embed the same top-level type. This would conflate the concerns of the parsing layer (registry JSON with `name`, `registry`, `proxy-args`) with the workflow layer (YAML tool configuration), requiring a single type to carry fields relevant to only one layer.

#### Alternative 3: Separate Packages per Concern

Split `pkg/cli` into sub-packages so that `EngineConfig` and `RepoConfig` become unambiguous. This is architecturally pure but represents significant structural churn with no immediate functional benefit.

### Consequences

#### Positive
- Type names are self-documenting: `AuditEngineConfig` is immediately understood as audit-specific.
- The intentional architectural separation between parser and workflow layers is captured in code.
- Reduces risk of accidentally using the wrong `MCPServerConfig` in cross-package functions.

#### Negative
- 29 files updated with mechanical renames, creating noise in git history.
- External consumers of these types must update to the new names.
- No runtime behavioural change — a pure rename carries no test signal beyond compilation.

#### Neutral
- READMEs for `pkg/parser` and `pkg/workflow` are updated to reflect new type names.
- The existing JSON wire format is unaffected.

---

## Part 2 — Normative Specification (RFC 2119)

> The key words **MUST**, **MUST NOT**, **REQUIRED**, **SHALL**, **SHALL NOT**, **SHOULD**, **SHOULD NOT**, **RECOMMENDED**, **MAY**, and **OPTIONAL** in this section are to be interpreted as described in [RFC 2119]((www.rfceditor.org/redacted)

### Type Naming

1. Types that model layer-specific concerns **MUST** carry a prefix that identifies their owning context when a same-named type exists or could plausibly exist in another package.
2. Types **MUST NOT** use purely generic names as their top-level exported identifier when the same name is used in a sibling package at the same import depth.
3. The specific renamed types **MUST** use their new names in all new and modified code: `parser.RegistryMCPServerConfig`, `cli.AuditEngineConfig`, `cli.TrialRepoContext`, `workflow.FileCreationTracker`.
4. New cross-layer ambiguous types **SHOULD** be flagged during code review and renamed before merging.

### Intentional Type Separation

1. The parser layer (`pkg/parser`) and the workflow layer (`pkg/workflow`) **MUST NOT** share a single top-level MCP server config struct.
2. When a type in `pkg/parser` is intentionally distinct from a similarly-purposed type in `pkg/workflow`, the type declaration **MUST** include a comment stating the intentional separation and naming the counterpart type.

### Wire Format Stability

1. Renaming a Go struct type **MUST NOT** alter any JSON field names used in external-facing payloads unless the payload schema is also explicitly versioned.

### Conformance

An implementation is conformant if it satisfies all **MUST** and **MUST NOT** requirements. Code introducing a type name that duplicates a same-depth sibling package type without a disambiguating prefix is non-conformant.

---

*This is a DRAFT ADR generated by the [Design Decision Gate](https://github.com/github/gh-aw/actions/runs/24590162669) workflow.*

What to do next

  1. Copy the ADR content above into docs/adr/26945-package-scoped-type-naming-for-cross-layer-clarity.md on main
  2. Review and complete any sections marked [TODO: verify]
  3. Change Status from Draft to Accepted once the team has reviewed

Why ADRs Matter

ADRs create a searchable, permanent record of why the codebase looks the way it does. The type-naming convention established in this PR is exactly the kind of architectural decision that future contributors need to understand to stay consistent.


References:

🔒 For future PRs with the implementation label or >100 lines in business logic directories, please link an ADR in the PR body before requesting review.

Note

🔒 Integrity filter blocked 1 item

The following item were blocked because they don't meet the GitHub integrity level.

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
  github:
    min-integrity: approved  # merged | approved | unapproved | none

🏗️ ADR gate enforced by Design Decision Gate 🏗️ · ● 235.5K ·

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.

[deep-report] Resolve 4 critical MCPServerConfig type naming conflicts in pkg/parser and pkg/workflow

3 participants