From 745fe30b82d0041803f03f156102b880be2112b7 Mon Sep 17 00:00:00 2001 From: Jon Gallant <2163001+jongio@users.noreply.github.com> Date: Wed, 12 Aug 2026 22:03:02 -0700 Subject: [PATCH 1/2] build: exclude the mage build script from coverage reporting cli/magefile.go carries //go:build mage, so it is never compiled into the test binary and can never report a single covered line. Codecov still counts it, which means any PR that touches the build script is penalised on patch coverage for lines that are structurally impossible to cover. This is the same shape of problem as a lint step that reports findings the policy has already accepted: the signal is always wrong and it gates real work, so it trains people to ignore the gate. Adding it to the ignore list alongside the existing entry point exclusion. --- codecov.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/codecov.yml b/codecov.yml index fe66c404c..12d742382 100644 --- a/codecov.yml +++ b/codecov.yml @@ -32,6 +32,7 @@ comment: # Ignore files that are hard to test (e.g., CLI entry points, generated code) ignore: - "cli/src/cmd/app/main.go" # Entry point + - "cli/magefile.go" # mage-tagged build script, never compiled into the test binary - "**/generated/**" - "cli/src/gen/**" # protoc/buf-generated Connect stubs - "**/*.pb.go" # protoc-generated Go files From 4eba10cc73f702f1efe9dffaf1cd60a2b8e11448 Mon Sep 17 00:00:00 2001 From: Jon Gallant <2163001+jongio@users.noreply.github.com> Date: Thu, 13 Aug 2026 16:06:50 -0700 Subject: [PATCH 2/2] revert: remove inert magefile coverage exclusion The mage-tagged build scripts never enter the uploaded Go coverage profile, so excluding them cannot affect Codecov. The actual patch failure came from three executable statements in init.go and run.go, addressed by tests on azd-app #609. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 47f148f4-45d6-437f-a453-a1f6ab26194d --- codecov.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/codecov.yml b/codecov.yml index 12d742382..fe66c404c 100644 --- a/codecov.yml +++ b/codecov.yml @@ -32,7 +32,6 @@ comment: # Ignore files that are hard to test (e.g., CLI entry points, generated code) ignore: - "cli/src/cmd/app/main.go" # Entry point - - "cli/magefile.go" # mage-tagged build script, never compiled into the test binary - "**/generated/**" - "cli/src/gen/**" # protoc/buf-generated Connect stubs - "**/*.pb.go" # protoc-generated Go files