Skip to content

Improve parser utility test coverage for not-found detection, expression scanning, workflow spec classification, and import edge cases#27327

Merged
pelikhan merged 5 commits intomainfrom
copilot/improve-frontmatter-utils-tests
Apr 20, 2026
Merged

Improve parser utility test coverage for not-found detection, expression scanning, workflow spec classification, and import edge cases#27327
pelikhan merged 5 commits intomainfrom
copilot/improve-frontmatter-utils-tests

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 20, 2026

This PR strengthens pkg/parser/frontmatter_utils_test.go per the test-quality issue by expanding coverage for utility behavior and import edge cases that were previously under-tested. It also aligns workflow-spec testing with the exported API contract.

  • Utility coverage: isNotFoundError

    • Added a new table-driven TestIsNotFoundError in frontmatter_utils_test.go with truthy/falsy/edge inputs (404 patterns, “not found” variants, and non-matching messages).
  • Utility coverage: frontmatterContainsExpressions

    • Added TestFrontmatterContainsExpressions covering:
      • empty frontmatter map
      • flat expression values
      • nested map expression values
      • slice-based expression values
      • nested structures with no expressions
  • Workflow spec contract coverage

    • Updated TestIsWorkflowSpec to call exported IsWorkflowSpec (instead of private helper).
    • Added explicit :// case to cover the URL-like branch.
  • Import processing edge cases

    • Expanded TestProcessImportsFromFrontmatter with:
      • import that contributes engine metadata
      • missing import file error path with message assertion
  • Test naming cleanup

    • Renamed a duplicate parser test function in import_remote_nested_test.go to avoid collision with the newly added TestIsNotFoundError.

Example of the added import edge-case assertions:

{
	name: "valid imports with engine",
	frontmatter: map[string]any{
		"on":      "push",
		"imports": []string{"engine.md"},
	},
	wantEngines:   true,
	wantEngineHas: "copilot",
},
{
	name: "missing import file",
	frontmatter: map[string]any{
		"on":      "push",
		"imports": []string{"missing.md"},
	},
	wantErr:    true,
	wantErrHas: "file not found",
}

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 cfg GOINSECURE GOMOD 9985281/b006/symuser.email ache/go/1.25.8/xtest@example.com (http block)
    • Triggering command: /usr/bin/gh gh repo view owner/repo env 3380282564 r73k/ZR15bOYtzO_sNGC5r73k x_amd64/compile GOINSECURE t/internal/languconfig GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh repo view owner/repo env 9985281/b253/_pkg_.a 7Ps3/Xuna8G_bMUX3GMM57Ps3 64/pkg/tool/linux_amd64/link GOINSECURE /semver GOMODCACHE 64/pkg/tool/linux_amd64/link (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 4/arm64.go 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 /orgs/test-owner/actions/secrets --jq .secrets[].name -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go /pre�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (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 xterm-color 64/pkg/tool/linux_amd64/vet /usr/bin/infocmp 1428382685/.githgit cfg 64/pkg/tool/linu--show-toplevel infocmp -1 xterm-color 64/pkg/tool/linux_amd64/vet /usr/bin/git 9985281/b243/_pk/opt/hostedtoolcache/node/24.14.1/x64/bin/npm GO111MODULE ache/go/1.25.8/x--package-lock-only git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq [.object.sha, .object.type] | @tsv /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq /usr/bin/git -json GO111MODULE ache/go/1.25.8/x--show-toplevel git rev-�� --show-toplevel go /usr/bin/git mpiledOutput2449/opt/hostedtoolcache/node/24.14.1/x64/bin/npm GO111MODULE ache/go/1.25.8/x--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 --show-toplevel x_amd64/compile /usr/bin/git -json GO111MODULE x_amd64/link git conf�� --get remote.origin.url ache/node/24.14.1/x64/bin/node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq [.object.sha, .object.type] | @tsv /tmp/compile-all-instructions-test-1986639024/.github/workflows (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 954/001/stability-test.md efaultBranchFromLsRemoteWithRealGitbranch_with_hyphen3480622838/001' ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet -p crypto/internal/add -lang=go1.25 ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet rtcf�� 2923072073 tmain.go 64/pkg/tool/linux_amd64/vet -p vendor/golang.orrev-parse -lang=go1.25 64/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/compile /usr/bin/git _.a zLU2/r48K25Cv2sXrev-parse cfg git rev-�� --show-toplevel ache/go/1.25.8/x64/pkg/tool/linu--auto /usr/bin/git 1SUlY0Hxg -trimpath ache/go/1.25.8/x--show-toplevel 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 sed 86_64/node s/^session\.savegit -tests ache/go/1.25.8/x--show-toplevel git 1/x6�� --show-toplevel ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile /usr/bin/git 177985/b451/_pkggit -test.v=true 177985/b451=> 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 ons-test309673587 x_amd64/compile test -json sonschema/annotarev-parse x_amd64/compile test lope�� --show-toplevel x_amd64/compile /usr/bin/git 01 GO111MODULE x_amd64/vet git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv ErrorFormatting3531692939/001 git-receive-pack '/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitbranch_with_hyphen2410218685rev-parse /usr/bin/git l GO111MODULE modules/@npmcli/--show-toplevel git -C /tmp/TestGuardPolicyTrustedUsersCompiledOutput632933441/001 s/test.md /usr/bin/git -json GO111MODULE 64/bin/go 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/x--json /usr/bin/git Onlymin-integritgit 177985/b222/vet.rev-parse ache/go/1.25.8/xHEAD git rev-�� tags/v3 ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet sv -unreachable=falgit /tmp/go-build958rev-parse /opt/hostedtoolc--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 64/pkg/tool/linux_amd64/vet /usr/bin/git -json GO111MODULE .cfg git rev-�� tags/v3 go sv st-1986639024/.ggit GO111MODULE .cfg 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/asm GOINSECURE GOMOD GOMODCACHE x_amd64/asm 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 -json @v6.0.2/kind/kin-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 64/bin/go GOINSECURE GOMOD abi/stub.s go env cut -f1))" 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 user.email test@example.com /usr/bin/git -json cfg 64/pkg/tool/linu--show-toplevel git rev-�� --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/infocmp ortcfg cfg 64/pkg/tool/linu--show-toplevel infocmp (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv thImports1111186166/001 go /usr/bin/git -json GO111MODULE 64/bin/go git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE 86_64/node 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 GOMODCACHE 64/pkg/tool/linuremote.origin.url /usr/bin/git ortcfg cfg 64/pkg/tool/linu--show-toplevel git rev-�� --show-toplevel 64/pkg/tool/linux_amd64/vet /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 GOMODCACHE go /usr/bin/git -json GO111MODULE 64/bin/go git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE 1/x64/bin/npx 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 ithub/workflows/artifacts-summary.md git-receive-pack '/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitbranch_with_hyphen3480622838rev-parse /usr/bin/git -json GO111MODULE x_amd64/asm git conf�� user.name Test User 177985/b453/vet.cfg -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 for-each-ref --format=%(objectname) /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOSUMDB GOWORK /sh /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linu--json -ato�� -bool -buildtags ache/node/24.14.1/x64/bin/node -errorsas -ifaceassert -nilfunc infocmp (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-warnings.cjs $name) { hasDiscussionsEnabled } } README.md ion-test..token--c tions/setup/js/ngit config user.name 'Test User' st/dist/workers/forks.js show�� --verify 635d01ed tions/setup/node_modules/.bin/node 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 635d01ed..HEAD k/gh-aw/gh-aw/node_modules/.bin/git README.md ion-test..token-add _modules/.bin/gi. git show�� --verify 635d01ed git token-test.txt ings.cjs k/node_modules/.graphql 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 --show-toplevel x_amd64/compile /usr/bin/git -json cfg 64/pkg/tool/linu--show-toplevel git rev-�� --show-toplevel 64/pkg/tool/linu-extld=gcc /usr/lib/git-core/git ortcfg cfg 64/pkg/tool/linu--show-toplevel /usr/lib/git-core/git (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 mpleWorkflow1262668673/001 go /usr/bin/git -json GO111MODULE 64/bin/go git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE ode 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 list --json /usr/bin/git 114155410/001' 114155410/001' -importcfg git remo�� s/test.md /home/REDACTED/work/gh-aw/gh-aw/pkg/fileutil/tar.go /usr/bin/infocmp -json 1.5.0/mcp/clientrev-parse x_amd64/compile infocmp (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 for-each-ref --format=%(objectname) /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet -json GO111MODULE 64/bin/go /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet -ato�� -bool -buildtags /usr/bin/git -errorsas -ifaceassert -nilfunc 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 bility_SameInputSameOutput514146954/001/stability-test.md -importcfg /usr/bin/git -s -w -buildmode=exe git rev-�� --show-toplevel s/test.md /opt/hostedtoolcache/node/24.14.1/x64/bin/node -json 1.5.0/oauthex/aurev-parse x_amd64/compile node (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 --pack_header=2,3 l "warnings":[]}] -json GO111MODULE 64/bin/go node /tmp�� /tmp/TestHashConsistency_GoAndJavaScript482222611/001/test-empty-frontmatter.md go /opt/hostedtoolcache/node/24.14.1/x64/bin/node h ../../../.pretgit GO111MODULE 64/bin/go node (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 cfg 64/pkg/tool/linu-nolocalimports GOINSECURE 9985281/b021/atoconfig ache/go/1.25.8/xuser.email 64/pkg/tool/linutest@example.com env 9985281/b238/_pkg_.a BHdz/-6z_QJDvZKLbBouUBHdz ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE t/feature/pluralrev-parse GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-importcfg (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 cfg 64/pkg/tool/linux_amd64/vet GOINSECURE ntio/encoding/asrev-parse ache/go/1.25.8/x--show-toplevel 64/pkg/tool/linux_amd64/vet env 1185834695/.github/workflows GO111MODULE 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 (http block)
    • 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 GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env -json GO111MODULE h 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 dE5S/nPvk3w7LQzW_3ywvdE5S 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env 9985281/b221/_pkg_.a V7o_/18xeupG6XnJInX8DV7o_ cfg GOINSECURE g/x/net/http/httrev-parse GOMODCACHE 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 cfg 64/pkg/tool/linux_amd64/vet GOINSECURE 9985281/b013/cpuconfig ache/go/1.25.8/xuser.name 64/pkg/tool/linuTest User env 3368567460 zBGz/yhMlvprrXT_DfcRFzBGz ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE v3 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/12345/artifacts --jq .artifacts[].name GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linuremote.origin.url env 502/001/stability-test.md GO111MODULE ck 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 9985281/b013/sym--show-toplevel 64/pkg/tool/linux_amd64/vet env 3380282564 GO111MODULE cfg GOINSECURE t/internal/tag GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 cfg 64/pkg/tool/linux_amd64/vet GOINSECURE (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12346/artifacts --jq .artifacts[].name GO111MODULE 64/pkg/tool/linux_amd64/asm GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/asm env -json GO111MODULE e_modules/.bin/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 cfg 64/pkg/tool/linux_amd64/vet GOINSECURE (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 cfg 64/pkg/tool/linux_amd64/vet GOINSECURE fips140/rsa GOMODCACHE 64/pkg/tool/linux_amd64/vet env 1185834695/.github/workflows NED5/7tbAQfilcefdiXaaNED5 til.test GOINSECURE oUALRjR4fFIvA/RHrev-parse GOMODCACHE til.test (http block)
    • 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 01/main.md GO111MODULE /opt/hostedtoolcache/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 cfg 64/pkg/tool/linux_amd64/vet GOINSECURE entropy ache/go/1.25.8/x--show-toplevel 64/pkg/tool/linux_amd64/vet env 1204636584 h5RJ/fhSiz4P0ozPJ9_2Hh5RJ 64/pkg/tool/linux_amd64/compile GOINSECURE t/internal GOMODCACHE 64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 cfg 64/pkg/tool/linux_amd64/vet GOINSECURE 9985281/b007/sturev-parse ache/go/1.25.8/x--show-toplevel 64/pkg/tool/linux_amd64/vet env 1185834695/.github/workflows SK0W/BJGJRDpSI4wKt0zQSK0W ache/go/1.25.8/x64/pkg/tool/linu-nilfunc GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-tests (http block)
    • 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 GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env -json GO111MODULE /opt/hostedtoolcache/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 cfg 64/pkg/tool/linu-importcfg GOINSECURE 9985281/b012/equinit ache/go/1.25.8/x/home/REDACTED/work/gh-aw/gh-aw/pkg/timeutil/format.go 64/pkg/tool/linu/home/REDACTED/work/gh-aw/gh-aw/pkg/timeutil/format_test.go env 1204636584 4ACQ/f02Eva1ttQPQuPWq4ACQ 64/pkg/tool/linux_amd64/link GOINSECURE t/message/catalorev-parse GOMODCACHE 64/pkg/tool/linux_amd64/link (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 cfg 64/pkg/tool/linux_amd64/vet GOINSECURE ntio/asm/ascii GOMODCACHE 64/pkg/tool/linux_amd64/vet env nL6m/zdxyCSRdW7QRNn7znL6m GO111MODULE util.test GOINSECURE GOMOD GOMODCACHE util.test (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/4/artifacts --jq .artifacts[].name GO111MODULE 64/pkg/tool/linux_amd64/link GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/link env .test GO111MODULE ortcfg.link GOINSECURE GOMOD GOMODCACHE 0s-25CC_snHaXtCb^remote\..*\.gh-resolved$ (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 cfg 64/pkg/tool/linux_amd64/vet GOINSECURE fips140/drbg ache/go/1.25.8/xuser.name 64/pkg/tool/linuTest User env 9985281/b248/_pkg_.a NNuM/NZNs7zEf3uyY_7BzNNuM ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE t/internal/formarev-parse GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-trimpath (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 cfg 64/pkg/tool/linux_amd64/vet GOINSECURE 9985281/b036/asm/tmp/js-hash-test-898797996/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/vet env 1185834695 aqNl/Sak5XWYSYfQ9xL6IaqNl ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linurev-parse (http block)
    • 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 01/main.md GO111MODULE k/gh-aw/gh-aw/actions/setup/js/node_modules/.bin/node 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 114155410/001' 114155410/001' -importcfg /tmp/go-build958177985/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 1.5.0/mcp/client-ifaceassert 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/compile 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 x_amd64/compile env 9985281/b216/_pkg_.a cfg x_amd64/link GOINSECURE g/x/text/secure/rev-parse GOMODCACHE x_amd64/link (http block)
  • https://api.github.com/repos/github/gh-aw/contents/.github/workflows/shared/reporting.md
    • Triggering command: /tmp/go-build958177985/b403/cli.test /tmp/go-build958177985/b403/cli.test -test.testlogfile=/tmp/go-build958177985/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)
    • Triggering command: /tmp/go-build3224545006/b403/cli.test /tmp/go-build3224545006/b403/cli.test -test.testlogfile=/tmp/go-build3224545006/b403/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true GOINSECURE GOMOD GOMODCACHE go env ath ../../../.pr**/*.json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (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 rdian.md 177985/b093/vet.rev-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 CommaSeparatedCols -trimpath /opt/hostedtoolc/tmp/gh-aw/aw-feature-branch.patch 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/uv/0.11.7/x--show-toplevel git rev-�� --show-toplevel go /usr/bin/git 2119-91062/test-ls 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 _.a 177985/b026/vet.cfg cfg GOINSECURE ole GOMODCACHE ache/go/1.25.8/x--jq ranc�� oMM2kMrQi 177985/b164/vet.cfg ache/go/1.25.8/x64/pkg/tool/linu-buildmode=exe -p internal/nettracrev-parse -lang=go1.25 rtcfg (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 -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env mpiledOutput2449176620/001 GO111MODULE 64/pkg/tool/linux_amd64/link GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/link (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 -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/v1.2.3 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE 64/bin/go GOINSECURE GOMOD iles,SysoFiles,T--show-toplevel go env lGitmain_branch750928743/001' lGitmain_branch750928743/001' odules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin/sh GOINSECURE GOMOD GOMODCACHE 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/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet env g_.a 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/v2.0.0 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet env g_.a @v1.1.3/ascii/asowner/repo 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 /lib/wasm/wasm_e-p 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 lGitmain_branch3114155410/001' lGitmain_branch3114155410/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/v3.0.0 --jq [.object.sha, .object.type] | @tsv ed-with-env-template-expressions-in-body.md GO111MODULE sh GOINSECURE GOMOD GOMODCACHE go env json' --ignore-premote.origin.url 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 _.a 177985/b028/vet.cfg ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE tants GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env mpiledOutput2449176620/001 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 GOMOD GOMODCACHE 64/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 env ck '**/*.cjs' '**/*.ts' '**/*.js.github/workflows/test.md GO111MODULE .cfg 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 GO111MODULE x_amd64/link GOINSECURE GOMOD GOMODCACHE x_amd64/link (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 64/bin/go GOINSECURE GOMOD ic/asm.s go (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 (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name -json GO111MODULE modules/@npmcli/run-script/lib/node-gyp-bin/node GOINSECURE GOMOD GOMODCACHE go /pre�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/test/repo
    • Triggering command: /usr/bin/gh gh api /repos/test/repo --jq .default_branch nL6m/zdxyCSRdW7QRNn7znL6m GO111MODULE util.test GOINSECURE GOMOD GOMODCACHE util.test 5817�� se 177985/b049/vet.cfg cfg -p unicode/utf8 -lang=go1.25 ache/go/1.25.8/x2 (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test/repo --jq .default_branch --show-toplevel GOPROXY kflow.test GOSUMDB GOWORK 64/bin/go kflow.test 2245�� /tmp/gh-aw-test-runs/20260420-12v1.0.0 remote /usr/bin/git ath ../../../.prgit GO111MODULE 64/bin/go git (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 cal/bin/git git /git git add . git tions/setup/node_modules/.bin/git -M main 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 and others added 3 commits April 20, 2026 12:15
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/bac0d2f9-30c8-42bc-b48c-a76531c7982a

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/bac0d2f9-30c8-42bc-b48c-a76531c7982a

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Improve test quality for pkg/parser/frontmatter_utils_test.go Improve parser utility test coverage for not-found detection, expression scanning, workflow spec classification, and import edge cases Apr 20, 2026
Copilot AI requested a review from pelikhan April 20, 2026 12:34
@pelikhan pelikhan marked this pull request as ready for review April 20, 2026 12:54
Copilot AI review requested due to automatic review settings April 20, 2026 12:54
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

Expands parser utility and import-processing test coverage to better validate not-found detection, expression scanning, workflow spec classification, and import edge cases.

Changes:

  • Updated workflow spec tests to exercise the exported IsWorkflowSpec API and added a URL-like scheme case.
  • Expanded import-processing tests to cover engine metadata import and missing import file error assertions.
  • Added new utility tests for isNotFoundError and frontmatterContainsExpressions, and renamed a colliding test in import_remote_nested_test.go.
Show a summary per file
File Description
pkg/parser/frontmatter_utils_test.go Adds/updates unit tests for workflow spec detection, import processing edge cases (engine + missing file), and new coverage for not-found + expression scanning helpers.
pkg/parser/import_remote_nested_test.go Renames a test to avoid a duplicate TestIsNotFoundError symbol collision.

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: 2

@@ -807,6 +849,9 @@ This is an included file.`

if tt.wantEngines {
assert.NotEmpty(t, engines, "ProcessImportsFromFrontmatter() should return engines")
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

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

engines[0] is accessed after assert.NotEmpty(t, engines, ...). If engines is unexpectedly empty, the test will panic before reporting a clean assertion failure. Use require.NotEmpty (or check len(engines) > 0) before indexing, or assert the expected engine is present using a slice search without assuming order/index 0.

Suggested change
assert.NotEmpty(t, engines, "ProcessImportsFromFrontmatter() should return engines")
require.NotEmpty(t, engines, "ProcessImportsFromFrontmatter() should return engines")

Copilot uses AI. Check for mistakes.
Comment on lines 862 to 863
// TestProcessIncludedFileWithNameAndDescription verifies that name and description fields
// do not generate warnings when processing included files outside .github/workflows/
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

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

The comment above TestIsNotFoundError still describes TestProcessIncludedFileWithNameAndDescription, but the function below now tests isNotFoundError. Update/remove the comment so it matches the test it documents (or move it back above the intended test).

Suggested change
// TestProcessIncludedFileWithNameAndDescription verifies that name and description fields
// do not generate warnings when processing included files outside .github/workflows/
// TestIsNotFoundError verifies that isNotFoundError correctly identifies
// error messages that represent missing or not-found resources.

Copilot uses AI. Check for mistakes.
Generated by the Design Decision Gate for PR #27327, which adds >100
lines to pkg/parser (a business logic directory) without a linked ADR.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Commit pushed: 1fd75aa

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions
Copy link
Copy Markdown
Contributor

🏗️ Design Decision Gate — ADR Required

This PR adds 155 new lines to pkg/parser (a core business logic directory) but does not have a linked Architecture Decision Record (ADR).

AI has analyzed the PR diff and generated a draft ADR to help you get started:

📄 Draft ADR: docs/adr/27327-parser-utility-test-strategy.md

The draft captures the central design decisions in this PR:

  • Testing against the exported API surface (IsWorkflowSpec) rather than unexported helpers
  • Table-driven test structure with empty/truthy/near-miss edge cases for each utility predicate
  • Error-path assertions using require.ErrorContains for specific error message substrings
  • Unique test function naming to prevent silent shadowing across _test.go files

What to do next

  1. Review the draft ADR committed to your branch — it was generated from the PR diff
  2. Complete any missing sections — fill in context the AI couldn't infer (e.g., what prompted this coverage work, whether there's a related test quality initiative or issue)
  3. Commit the finalized ADR to docs/adr/ on your branch
  4. Reference the ADR in this PR body by adding a line such as:

    ADR: ADR-27327: Test Strategy for Parser Package Utility Functions

Once an ADR is linked in the PR body, this gate will re-run and verify the implementation matches the decision.

Why ADRs Matter

"AI made me procrastinate on key design decisions. Because refactoring was cheap, I could always say 'I'll deal with this later.' Deferring decisions corroded my ability to think clearly."

ADRs create a searchable, permanent record of why the codebase looks the way it does — including testing conventions. Future contributors (and your future self) will thank you.


📋 Michael Nygard ADR Format Reference

An ADR must contain these four sections to be considered complete:

  • Context — What is the problem? What forces are at play?
  • Decision — What did you decide? Why?
  • Alternatives Considered — What else could have been done?
  • Consequences — What are the trade-offs (positive and negative)?

All ADRs are stored in docs/adr/ as Markdown files numbered by PR number (e.g., 27327-parser-utility-test-strategy.md for PR #27327).

🔒 This PR cannot merge until an ADR is linked in the PR body.

References: §24667646936

Note

🔒 Integrity filter blocked 1 item

The following item was blocked because it doesn'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 🏗️ · ● 156K ·

@github-actions
Copy link
Copy Markdown
Contributor

🧪 Test Quality Sentinel Report

Test Quality Score: 90/100

Excellent

Metric Value
New/modified tests analyzed 4
✅ Design tests (behavioral contracts) 4 (100%)
⚠️ Implementation tests (low value) 0 (0%)
Tests with error/edge cases 4 (100%)
Duplicate test clusters 0
Test inflation detected Yes (test-only PR — 154 test lines / 0 production lines)
🚨 Coding-guideline violations None

Test Classification Details

View all 4 test analyses
Test File Classification Notes
TestIsWorkflowSpec (+1 row) pkg/parser/frontmatter_utils_test.go:612 ✅ Design Adds URL-scheme variant edge case; tracks isWorkflowSpecIsWorkflowSpec export rename
TestProcessImportsFromFrontmatter (+2 rows) pkg/parser/frontmatter_utils_test.go:741 ✅ Design Adds engine-extraction path and missing-file error path; upgrades to require.ErrorContains
TestIsNotFoundError (new, 7 rows) pkg/parser/frontmatter_utils_test.go:861 ✅ Design Covers HTTP 404, case-insensitive phrase, word-boundary guard, empty/whitespace strings
TestFrontmatterContainsExpressions (new, 5 rows) pkg/parser/frontmatter_utils_test.go:913 ✅ Design Covers empty map, flat/nested/slice expressions, and expression-free map

Flagged Tests — Requires Review

No tests flagged. All new tests enforce behavioral contracts with meaningful edge-case coverage.


Notes

Test inflation warning (context: expected): frontmatter_utils_test.go adds 154 lines against 0 production-code changes. This is a pure test-coverage improvement PR — the functions under test (isNotFoundError, frontmatterContainsExpressions, IsWorkflowSpec, processImportsFromFrontmatter) already existed. The inflation penalty (-10 pts) is applied mechanically per the rubric, but this pattern is entirely legitimate and encouraged.

TestIsNotFoundError_RemoteNested rename in import_remote_nested_test.go: This is a necessary disambiguation rename — the original test name collided with the newly added TestIsNotFoundError. Not counted as a new test.

Assertion quality highlights:

  • All testify assertions include descriptive message arguments ✅
  • Error paths correctly use require.Error + require.ErrorContains (fail-fast on wrong path) ✅
  • TestIsNotFoundError includes a "word without space" row (notfound) that tests the word-boundary contract — subtle but valuable ✅

Language Support

Tests analyzed:

  • 🐹 Go (*_test.go): 4 tests (unit, //go:build !integration) ✅
  • 🟨 JavaScript (*.test.cjs, *.test.js): 0 tests

Verdict

Check passed. 0% of new tests are implementation tests (threshold: 30%). No coding-guideline violations detected.


📖 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: §24667646912

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

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: 90/100. Test quality is excellent — 0% of new tests are implementation tests (threshold: 30%). All 4 new/modified tests enforce behavioral contracts with meaningful edge-case and error-path coverage. No coding-guideline violations detected.

@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot Review all comments

@github-actions
Copy link
Copy Markdown
Contributor

Hey @Copilot 👋 — great work expanding parser utility test coverage! The new table-driven tests for isNotFoundError, frontmatterContainsExpressions, and processImportsFromFrontmatter are exactly the kind of focused, maintainable coverage that makes the parser package easier to evolve confidently.

This PR looks well-structured and ready for maintainer review. 🎉

Generated by Contribution Check · ● 1.8M ·

@github-actions github-actions bot added the lgtm label Apr 20, 2026
@pelikhan pelikhan merged commit 9ebffd9 into main Apr 20, 2026
24 checks passed
@pelikhan pelikhan deleted the copilot/improve-frontmatter-utils-tests branch April 20, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[testify-expert] Improve Test Quality: pkg/parser/frontmatter_utils_test.go

3 participants