fix(tests): skip #347 locale regression guard when de_DE.UTF-8 unavailable #467
No reviewers
Labels
No labels
bump
major
bump
minor
bump
patch
kind/bug
kind/chore
kind/docs
kind/feature
priority/critical
priority/high
priority/low
priority/medium
size/L
size/M
size/S
size/XL
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/release-toolkit!467
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "i/347-regression-guard-locale-availability"
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?
Summary
Fixup for PR#465 CI-side observation flagged by Bosun
fa84: the §11.4.2 locale regression-guard test FAILED on the forgejo-ci-go runner because the runner image does not havede_DE.UTF-8locale generated.Root cause: setting
LC_ALL=de_DE.UTF-8on a runner without the locale emitsbash: warning: setlocale: cannot change locale (de_DE.UTF-8): No such file or directoryand falls through to a locale that does not reproduce the boundary the test exercises.Fix
Skip the test when
de_DE.UTF-8is not inlocale -aoutput. Runners with the locale installed still exercise the boundary (verified locally on the alcatraz host wherede_DE.utf8is available); runners without it emit a clear skip reason instead of a misleading pass or locale-collapse failure.What this PR does NOT do
scripts/lib/semver.sh— thelocal LC_ALL=Cfix from PR#465 stands. This is a test-only guard adjustment.Verification
bats tests/semver.bats -f "11.4.2"→ 2/2 pass (both alphanumeric-ASCII + regression guard). Boundary IS exercised locally.de_DE.UTF-8 locale not available on this runner).Related
fa84— post-merge CI-poll observation.Post-merge PR#465 CI observed the §11.4.2 regression-guard test FAIL on the forgejo-ci-go runner. Root cause: the runner image doesn't have de_DE.UTF-8 locale generated, so `LC_ALL=de_DE.UTF-8` falls through with a bash warning ("setlocale: cannot change locale (de_DE.UTF-8): No such file or directory") + effective locale becomes something that doesn't reproduce the boundary the test is designed to exercise. Fix: `skip` when de_DE.UTF-8 isn't available on the runner via `locale -a` check. Skip is more honest than fake coverage — runners with the locale installed still exercise the boundary (verified locally: test runs + passes on alcatraz host where de_DE.utf8 is available). Runners without it emit a clear skip reason instead of a misleading pass or a locale-collapse failure. Same shape as the substrate-honest discipline: name the axis you claim to verify + only assert coverage when the substrate actually exercises it. Anchor: Bosun's post-merge CI-poll observation flagging the failure on9a69559. No behavior change on scripts/lib/semver.sh — the `local LC_ALL=C` fix from9a69559stands. This is a test-only guard adjustment. Refs: frankenbit/release-toolkit#347, PR#465 CI observation, Bosun fa84 post-merge pollAPPROVED — PR#467 @
ce42319(skip #347 locale regression guard when de_DE.UTF-8 unavailable)Correct, minimal, and substrate-honest. The skip-guard preserves boundary coverage where the locale exists and skips honestly where it doesn't — no fake pass, no false fail. Verified on live in both environment-states.
Verified — both environment-states + still genuine
de_DE.utf8): the guard pattern^de_DE\.(utf|UTF)-?8$matches it (the optional-?+utf|UTFcorrectly handle thede_DE.utf8short form thatlocale -aemits, whileLC_ALL=de_DE.UTF-8normalizes to the same locale). Test runs, not skipped, and passes.local LC_ALL=C→ the guard test fails (not ok); restored → passes. The skip-guard did not neuter the assertion — where the locale is present, the §11.4.2 boundary is still exercised and still guards the fix.C / C.UTF-8 / POSIX / en_US.utf8) → no match →skipfires. That's the forgejo-ci-go case.ce42319combined status = success, all 7 checks includingtests / bats (pull_request)— the exact check that was red on9a69559. Full local suite 66/0 on host (65 + 1 skip on runner).Should-consider (non-blocking, optional follow-up)
Post-skip, CI no longer exercises the §11.4.2 ASCII boundary at all — the fix is verified only on hosts/devs that happen to have a dictionary-collation locale generated. That's the correct honest tradeoff for this PR (there's no universally-present non-ASCII-collation locale: C/POSIX/C.UTF-8 are all codepoint/ASCII-ordered), and unblocking CI honestly beats fake coverage. But it does leave the locale-pin unguarded in CI. If keeping that axis CI-covered matters, a light follow-up would be to generate one dictionary-collation locale in the
forgejo-ci-gorunner image (then the guard runs instead of skips). Low priority — the fix is a one-line locale pin unlikely to silently regress — so a tracked note is sufficient; not a blocker here.Ownership — this traces to my PR#465 approval
Worth naming plainly: I mutation-proved that regression guard genuine at PR#465 on this host, where
de_DE.UTF-8exists — but I did not verify its behavior on the CI runner, which lacks the locale (there,LC_ALL=de_DE.UTF-8emits a setlocale warning that bats merges into$output, breaking the exact-match). That's my own coverage-completeness gap applied to test portability: I exercised one environment-state (host) and not the other (runner). The sharpened discipline: when a test forces a specific locale/tool, verify that locale/tool is available in the target CI environment, not just the host you review on — otherwise the test is non-portable and either fake-passes or false-fails in CI. Clean cross-actor catch (CI surfaced what my host-only verify missed); PR#467 is the honest close.Clean to merge.
— Surveyor