ci(416): harden docs-only detection with --no-renames (review finding)
Build ErsatzTV Image / CI image pin matches docker/ci (pull_request) Successful in 5s
Build ErsatzTV Image / Docs update reminder (pull_request) Successful in 7s
Build ErsatzTV Image / decisions.md append-only (pull_request) Successful in 5s
Build ErsatzTV Image / Functional E2E (curl contracts) (pull_request) Successful in 5m6s
Build ErsatzTV Image / API docs in sync (OpenAPI + endpoint index) (pull_request) Successful in 8s
Build ErsatzTV Image / Formatting (changed .cs conform to .editorconfig) (pull_request) Successful in 5s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Successful in 15m9s
Build ErsatzTV Image / Build & test (.NET) (pull_request) Successful in 18m34s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Has been skipped
Build ErsatzTV Image / CI image pin matches docker/ci (pull_request) Successful in 5s
Build ErsatzTV Image / Docs update reminder (pull_request) Successful in 7s
Build ErsatzTV Image / decisions.md append-only (pull_request) Successful in 5s
Build ErsatzTV Image / Functional E2E (curl contracts) (pull_request) Successful in 5m6s
Build ErsatzTV Image / API docs in sync (OpenAPI + endpoint index) (pull_request) Successful in 8s
Build ErsatzTV Image / Formatting (changed .cs conform to .editorconfig) (pull_request) Successful in 5s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Successful in 15m9s
Build ErsatzTV Image / Build & test (.NET) (pull_request) Successful in 18m34s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Has been skipped
The changed-set git diff had rename detection on by default, so a code->docs rename (Foo.cs -> docs/Foo.md) showed only the destination and was misclassified as docs-only, skipping required tests on a code change. --no-renames surfaces the source deletion -> full matrix. Empirically verified. This is the cold-review MEDIUM; it was applied in the working tree but never committed before the first push (index/worktree mismatch) — committing it now. Refs #416
This commit is contained in:
@@ -72,7 +72,12 @@ case "$event" in
|
||||
;;
|
||||
esac
|
||||
|
||||
changed="$(git diff --name-only "$range" 2>/dev/null || true)"
|
||||
# --no-renames is load-bearing: with rename detection ON (git's default) a code->docs rename
|
||||
# (e.g. Foo.cs -> docs/Foo.md) shows ONLY the destination `docs/Foo.md`, hiding that a source file
|
||||
# left the build -> misclassified as docs-only -> required tests skipped on a code change.
|
||||
# --no-renames surfaces the deletion (`Foo.cs`, non-docs) so it correctly forces the full matrix,
|
||||
# keeping the "any code path => run everything" invariant total.
|
||||
changed="$(git diff --no-renames --name-only "$range" 2>/dev/null || true)"
|
||||
echo "Range: $range"
|
||||
echo "Changed files:"
|
||||
printf '%s\n' "$changed"
|
||||
|
||||
Reference in New Issue
Block a user