Skip to content

Fix copilot_driver.cjs append callback typing mismatch in TypeScript checks#27236

Merged
pelikhan merged 2 commits intomainfrom
copilot/fix-parameter-types-incompatibility
Apr 19, 2026
Merged

Fix copilot_driver.cjs append callback typing mismatch in TypeScript checks#27236
pelikhan merged 2 commits intomainfrom
copilot/fix-parameter-types-incompatibility

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 19, 2026

TypeScript checks failed in copilot_driver.cjs because appendSafeOutputLine expected a callback signature with a string encoding, while the default fs.appendFileSync path uses WriteFileOptions. This created an incompatible union function type at the call site.

  • Type alignment for append callback

    • Replaced the mixed callback union typedef with a single Node-compatible append signature:
      • path: PathOrFileDescriptor
      • data: string | Uint8Array
      • options?: WriteFileOptions
  • Call-site argument normalization

    • Updated appendSafeOutputLine to pass an options object instead of a raw encoding string, matching fs.appendFileSync typing and avoiding parameter variance conflicts.
  • Focused test expectation update

    • Adjusted copilot_driver.test.cjs append stubs and assertions to validate { encoding: "utf8" } options rather than "utf8" positional encoding.
// before
appendFileSync(safeOutputsPath, payload + "\n", "utf8");

// after
appendFileSync(safeOutputsPath, payload + "\n", { encoding: "utf8" });

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 gh repo view --json owner,name --jq .owner.login + "/" + .name 64/pkg/tool/linux_amd64/vet GOINSECURE b/gh-aw/pkg/cons/tmp/js-hash-test-547490191/test-hash.js GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh repo view owner/repo env 1966612968 GO111MODULE 64/pkg/tool/linux_amd64/link GOINSECURE g/x/crypto/interrev-parse GOMODCACHE 64/pkg/tool/linux_amd64/link 3032�� util.test oXnN/-5aZqfwMX4HRR0X2oXnN ortcfg.link GOSUMDB GOWORK 64/bin/go QBat1TqtOugs5kA4FK/4S-KjLZhAbqjP68Vh2dK/cACoDFtjremote (http block)
    • Triggering command: /usr/bin/gh gh repo view owner/repo env 3032571/b213/_pkg_.a 3cxW/IBlaqeSprCJhOYFQ3cxW 64/pkg/tool/linux_amd64/link GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/link cat-�� eutil.test k16k/fLMkIGmGY3YvZBL1k16k ortcfg.link GOSUMDB GOWORK 64/bin/go 1tjYVSqOEP82kiP9^remote\..*\.gh-resolved$ (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 GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json age/common.go x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (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 --get-regexp ^remote\..*\.gh-resolved$ /usr/bin/gh ortcfg GO111MODULE 64/pkg/tool/linu--show-toplevel gh repo�� view owner/repo /usr/bin/git 3032571/b213/_pk/opt/hostedtoolcache/node/24.14.1/x64/bin/npm 3cxW/IBlaqeSprCJinstall 64/pkg/tool/linu--package-lock-only 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 thImports2123408772/001 --jq /usr/bin/git -json GO111MODULE x_amd64/vet git conf�� --get (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 se 6298440/b103/vetnonexistent-workflow .cfg -p crypto/internal/add -lang=go1.25 ache/go/1.25.8/x64/pkg/tool/linuTest User -o 1136365509 -trimpath 1/x64/bin/node -p .go -lang=go1.25 ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq [.object.sha, .object.type] | @tsv --show-toplevel .test /usr/bin/git verutil.go verutil_test.go x_amd64/compile git rev-�� --show-toplevel x_amd64/compile /usr/bin/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 /tmp/go-build1976298440/b398/agentdrain.test 64/bin/node -test.paniconexigit -test.v=true ache/node/24.14.--show-toplevel git 1/x6�� --show-toplevel /bin/sh /usr/bin/git sistency_GoAndJagit git-upload-pack rev-parse /usr/bin/git 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, .object.type] | @tsv bility_SameInputSameOutput2646168366/001/stabili.artifacts[].name rev-parse /usr/bin/git go1.25.8 -c=4 -nolocalimports git -C 2" 1>&2 remote rue,"errors":[],"warnings":[]}] eturned GO111MODULE x_amd64/compile 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 ache/go/1.25.8/x64/pkg/tool/linuremote.origin.url /usr/bin/git Onlymin-integritgit 6298440/b232/vetrev-parse ache/go/1.25.8/xHEAD git rev-�� --show-toplevel ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet /usr/bin/git 2501-59598/test-git -trimpath /opt/hostedtoolc--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 o 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 -json 1.5.0/internal/x-ifaceassert x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile 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 x_amd64/compile /usr/bin/git t5smDhwOz GO111MODULE 64/pkg/tool/linu--show-toplevel git rev-�� --git-dir 64/pkg/tool/linux_amd64/vet /usr/bin/git 3032571/b076/_pkgit .cfg 64/pkg/tool/linu--show-toplevel 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, .object.type] | @tsv --show-toplevel x_amd64/vet /usr/bin/git SaeZgGgAk GO111MODULE 64/pkg/tool/linu--show-toplevel git rev-�� --show-toplevel 64/pkg/tool/linu-importcfg /usr/bin/git tmatter-with-arrgit .cfg 64/pkg/tool/linu--show-toplevel git (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 t0 my-default (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, .object.type] | @tsv --count st/suppress-warnmain $name) { hasDiscussionsEnabled } } README.md ion-test..token--c k/node_modules/.git config user.name 'Test User' st/dist/workers/-dwarf=false show�� --verify a2d5340e odules/npm/node_-nolocalimports token-test.txt (http block)
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq [.object.sha, .object.type] | @tsv --count a2d5340e..HEAD k/gh-aw/gh-aw/actions/node_modules/.bin/git README.md ion-test..token-add ode_modules/.bin. git show�� --verify a2d5340e tnet/tools/git token-test.txt (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 -aw/git/ref/tags/v1.0.0 x_amd64/vet bject.type] | @tsv l 2>&1; then \ git 1Yg0zHCmd 64/pkg/tool/linu--show-toplevel git rev-�� --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/gh ortcfg .cfg 64/pkg/tool/linu--show-toplevel gh (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 /tmp/go-build1976298440/b437/_pkg_.a -trimpath 6298440/b439/vet.cfg -p main -lang=go1.25 git rev-�� runs/20260419-222501-59598/test-1136365509 -dwarf=false /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/link go1.25.8 -c=4 -nolocalimports /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/link (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 r-test607073547/existing.md -trimpath /usr/bin/git -p github.com/githurev-parse -lang=go1.25 git 6298�� user.email 6298440/b440/_testmain.go /usr/bin/infocmp -c=4 -nolocalimports -importcfg infocmp (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 /execenv GOMODCACHE 64/pkg/tool/linux_amd64/vet ortc�� 3032571/b227/_pkg_.a stmain.go .cfg GOINSECURE l/ascii 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 3032571/b007/sym--git-dir Vgol9MA/jtMHmSR1PwQ4sKWnT8ry env 3032571/b253/_pkg_.a 3032571/b007/importcfg ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE /semver GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (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 GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env 3032571/b200/_pkg_.a QuTc/8J1aAAdvjhK6D-KwQuTc .cfg GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-trimpath (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE fips140/sha256 GOMODCACHE 64/pkg/tool/linux_amd64/vet env 2612556883 t2Bi/LbyKJAzlPTfrrG8ct2Bi .cfg GOINSECURE nal/fips140tls GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-buildtags (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 .cfg 64/pkg/tool/linu-nolocalimports GOINSECURE fips140deps/goderev-parse GOMODCACHE 64/pkg/tool/linu/tmp/go-build1976298440/b446/_testmain.go env 3032571/b204/_pkg_.a V4ci/NWzImF-917Hk3aRqV4ci ache/go/1.25.8/x64/pkg/tool/linux_amd64/link GOINSECURE fips140/tls12 GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-importcfg (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE (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 /unix GOMODCACHE 64/pkg/tool/linux_amd64/vet env 1512147657 go 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE g/x/net/dns/dnsmrev-parse 3032571/b012/sym--show-toplevel 64/pkg/tool/linux_amd64/vet ache�� 4086717820/.github/workflows jfLv/0caWgwAWMGdke8fejfLv ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE v3 GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linuconfig (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/linux_amd64/vet GOINSECURE fips140/aes GOMODCACHE 64/pkg/tool/linu-buildtags env 1512147657 qrnP/bIu9B-2Kyy2-ifaceassert 64/pkg/tool/linu-nilfunc GOINSECURE l GOMODCACHE 64/pkg/tool/linu-tests (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE ntio/asm/base64 GOMODCACHE 64/pkg/tool/linux_amd64/vet env 4086717820/.github/workflows GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (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 GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env 1512147657 GO111MODULE .cfg GOINSECURE able GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-importcfg (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 g/semverutil/semverutil.go 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linutest@example.com env 3032571/b250/_pkg_.a zBGz/yhMlvprrXT_DfcRFzBGz .cfg GOINSECURE b/gh-aw/pkg/actirev-parse GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (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/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env 1512147657 GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD 3032571/b092/sym/home/REDACTED/work/gh-aw/gh-aw/.github/workflows/ai-moderator.md 64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE 3032571/b092/ 3032571/b015/sym--show-toplevel 64/pkg/tool/linux_amd64/vet env 4086717820 GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE t/language ache/go/1.25.8/x--show-toplevel ache/go/1.25.8/x64/pkg/tool/linushow (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path -c=4 -nolocalimports -importcfg /tmp/go-build1976298440/b418/importcfg -pack /home/REDACTED/work/gh-aw/gh-aw/pkg/fileutil/fileutil.go /home/REDACTED/work/gh-aw/gh-aw/pkg/fileutil/tar.go 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 util GOMODCACHE x_amd64/vet env from .github/aw to pkg/actionpin-errorsas 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 3032571/b011/ GOMODCACHE 64/pkg/tool/linu/tmp/go-build1976298440/b113/vet.cfg env 3032571/b177/_pkg_.a GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE fips140/edwards2config ache/go/1.25.8/x--get 64/pkg/tool/linuremote.origin.url (http block)
  • https://api.github.com/repos/github/gh-aw/contents/.github/workflows/shared/reporting.md
    • Triggering command: /tmp/go-build1976298440/b403/cli.test /tmp/go-build1976298440/b403/cli.test -test.testlogfile=/tmp/go-build1976298440/b403/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (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 ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet /usr/bin/git se 6298440/b152/vetrev-parse ache/go/1.25.8/x--show-toplevel git rev-�� --show-toplevel ache/go/1.25.8/x64/pkg/tool/linuorigin /usr/bin/git se 6298440/b273/vet-lh tartedAt,updated/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 til.go til_test.go ache/go/1.25.8/x64/pkg/tool/linu-test.short=true GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet ranc�� se 6298440/b002/vet.cfg .cfg -I /tmp/go-build118run -I ache/go/1.25.8/x12345 (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 a.out GO111MODULE x_amd64/vet GOINSECURE F0NE0exhICnsEQ-sinit GOMODCACHE x_amd64/vet (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/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet env -json at.go 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 (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 -json @v1.1.3/base64/base64.go 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 g_.a GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (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 27122412/001 3032571/b047/importcfg ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-trimpath (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 3032571/b047/sym--show-toplevel 64/pkg/tool/linux_amd64/vet env gh-aw.wasm ($(du -h gh-aw.wasm | cut -f1))" G1PQ/JYbkfQ24WgmEFuVqG1PQ x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (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 GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh workflow list --repo owner/repo --json name,path,state .cfg GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (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 go1.25.8 -c=4 -nolocalimports -importcfg /tmp/go-build1976298440/b403/importcfg -pack /tmp/go-build1976298440/b403/_testmain.go env -json 2/compile.go x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
  • https://api.github.com/repos/test/repo
    • Triggering command: /usr/bin/gh gh api /repos/test/repo --jq .default_branch 3032571/b250/_pkg_.a zBGz/yhMlvprrXT_DfcRFzBGz .cfg GOINSECURE b/gh-aw/pkg/actirev-parse GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
  • invalid.example.invalid
    • Triggering command: /usr/lib/git-core/git-remote-https /usr/lib/git-core/git-remote-https origin https://invalid.example.invalid/nonexistent-repo.git git conf�� --local --get ode_modules/.bin/git /tmp/git-patch-o/usr/lib/git-core/git git /git git add . git tions/setup/node_modules/.bin/git . git bin/git git (dns block)
    • Triggering command: /usr/lib/git-core/git-remote-https /usr/lib/git-core/git-remote-https origin https://invalid.example.invalid/nonexistent-repo.git git rev-�� --count origin/auth-cleanup-success..auth-cleanup-success k/gh-aw/gh-aw/actions/setup/js/node_modules/.bin/git ranch git /home/REDACTED/worfor-each-ref git conf�� user.email lure test commit git . feature branch es/.bin/git git (dns block)
    • Triggering command: /usr/lib/git-core/git-remote-https /usr/lib/git-core/git-remote-https origin https://invalid.example.invalid/nonexistent-repo.git git conf�� --local --get ode_modules/.bin/git -1 --format=%s /git git add . git tions/setup/node_modules/.bin/git -m Initial commit bin/git git (dns 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 incompatible parameter types for options and encoding Fix copilot_driver.cjs append callback typing mismatch in TypeScript checks Apr 19, 2026
Copilot AI requested a review from pelikhan April 19, 2026 22:29
@pelikhan pelikhan marked this pull request as ready for review April 19, 2026 22:37
Copilot AI review requested due to automatic review settings April 19, 2026 22:37
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

Fixes TypeScript checkJs failures in copilot_driver.cjs by aligning the injected appendFileSync callback type and normalizing the call-site to use an options object (matching Node’s fs.appendFileSync typing).

Changes:

  • Replaced the mixed union callback typedef with a single Node-compatible AppendFileSyncLike signature.
  • Updated appendSafeOutputLine to pass { encoding: "utf8" } instead of "utf8".
  • Updated tests to stub/expect the options-object form.
Show a summary per file
File Description
actions/setup/js/copilot_driver.cjs Aligns AppendFileSyncLike typing and updates append call to use a Node-compatible options object.
actions/setup/js/copilot_driver.test.cjs Updates append stubs/assertions to expect { encoding: "utf8" } options.

Copilot's findings

Tip

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

  • Files reviewed: 2/2 changed files
  • Comments generated: 0

@pelikhan pelikhan merged commit 525dab3 into main Apr 19, 2026
83 of 89 checks passed
@pelikhan pelikhan deleted the copilot/fix-parameter-types-incompatibility branch April 19, 2026 22:40
@github-actions github-actions bot mentioned this pull request Apr 19, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🧪 Test Quality Sentinel Report

Test Quality Score: 70/100

⚠️ Acceptable, with suggestions

Metric Value
New/modified tests analyzed 2
✅ Design tests (behavioral contracts) 2 (100%)
⚠️ Implementation tests (low value) 0 (0%)
Tests with error/edge cases 0 (0%)
Duplicate test clusters 0
Test inflation detected No (ratio 1.5:1)
🚨 Coding-guideline violations None

Test Classification Details

Test File Classification Issues Detected
appends one JSONL line through appendSafeOutputLine copilot_driver.test.cjs:152 ✅ Design Happy-path only; no error/edge cases
emitInfrastructureIncomplete writes payload when path is configured copilot_driver.test.cjs:159 ✅ Design Stub rename only (cosmetic); still behavioral

Flagged Tests — Suggestions for Improvement

Both tests are behavioral and correct — no failures required. These are suggestions to strengthen coverage.

⚠️ appends one JSONL line through appendSafeOutputLine (copilot_driver.test.cjs:152)

Classification: Design test
Issue: Happy-path only. No test for what happens if appendFileSync throws, or if payload contains unusual characters.
What design invariant does this test enforce? That appendSafeOutputLine passes { encoding: "utf8" } as an options object (not the bare string "utf8") — directly validates the PR's fix.
What would break if deleted? A future regression reverting to the string form of encoding would go undetected.
Suggested improvement: Consider adding a case that verifies the \n newline is always appended to the payload (boundary: empty string "").

⚠️ emitInfrastructureIncomplete writes payload when path is configured (copilot_driver.test.cjs:159)

Classification: Design test
Issue: Only tests the "configured path" happy path. There's no test for when safeOutputsPath is undefined/null (the "not configured" branch).
What design invariant does this test enforce? That calling emitInfrastructureIncomplete with a valid path results in exactly one JSONL write with the correct type, reason, and details fields.
What would break if deleted? Silent regression in the infrastructure incomplete reporting path.
Suggested improvement: The change here is cosmetic (renamed encodingoptions in the stub parameter). The test itself already has solid behavioral coverage (6 assertions, JSON parsing, log verification). A complementary test for the safeOutputsPath missing case would complete the contract.


Language Support

Tests analyzed:

  • 🐹 Go (*_test.go): 0 tests — no Go test files changed
  • 🟨 JavaScript (*.test.cjs, *.test.js): 2 tests (vitest)

Verdict

Check passed. 0% of new/modified tests are implementation tests (threshold: 30%). The changes correctly update the test stubs and assertions to match the appendFileSync options API fix. The main gap is the absence of error/edge-case coverage (0%), which is why the score is 70 rather than higher.


📖 Understanding Test Classifications

Design Tests (High Value) verify what the system does:

  • Assert on observable outputs, return values, or state changes
  • Cover error paths and boundary conditions
  • Would catch a behavioral regression if deleted
  • Remain valid even after internal refactoring

Implementation Tests (Low Value) verify how the system does it:

  • Assert on internal function calls (mocking internals)
  • Only test the happy path with typical inputs
  • Break during legitimate refactoring even when behavior is correct
  • Give false assurance: they pass even when the system is wrong

Goal: Shift toward tests that describe the system's behavioral contract — the promises it makes to its users and collaborators.

References: §24640838122

🧪 Test quality analysis by Test Quality Sentinel · ● 451K ·

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

✅ Test Quality Sentinel: 70/100. Test quality is acceptable — 0% of new tests are implementation tests (threshold: 30%). Both modified tests verify behavioral contracts. Edge case coverage is 0%, which is the main area for improvement.

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.

Types of parameters 'options' and 'encoding' are incompatible. -- Type 'string' is not assignable to type 'WriteFileOptions | undefined'.

3 participants