check-fk-targets.sh exits silently on ALTER-only migrations and false-flags SQL comments #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found when the Forgejo Actions runner was commissioned (2026-07-09) and the
boundariesjob ran for the first time since June.Bug 1: under
set -euo pipefail,own=$(grep ... )exits 1 when a migration has noCREATE TABLE(any ALTER-only migration, e.g. 0516), killing the script before any check runs — with no output and a misleading green history.Bug 2: the
REFERENCESscan is case-insensitive over the whole file, so prose in SQL comments (e.g. "references the RSA keypair" in 0400) is reported as an FK violation.Bug 3: the rule only allowed same-FILE self-references, so a legitimate intra-crate FK across migration files (0501 amendment → proposal, both owned by the proposals crate) had no way to be declared.
Fix in PR:
|| trueon the grep, comment stripping before the scan, and a reviewable allowlist atscripts/fk-allow.txt.