You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: make half-block composer fixture portable - #2440
Repair the pre-existing default-branch failure in tests/fm-composer-lib.test.sh without weakening the half-block structural-edge property. Determine whether production or the environment is at fault first. The production matcher already recognizes U+2580 and U+2584; host Bash 3.2 emits literal backslash-u text for printf '\u…'. Make the test construct verified UTF-8 source literals instead, fail loudly if the fixture bytes are not preserved, keep the focused test single-purpose, and prove both half-block production alternatives remain enforced.
What Changed
Replace Bash-dependent Unicode escapes with portable UTF-8 source literals in the half-block composer fixture.
Verify the exact fixture bytes and fail loudly if either U+2584 or U+2580 is not preserved.
Keep independent structural-edge assertions for both half-block alternatives while reusing the verified literals in the end-to-end fixture.
Risk Assessment
✅ Low: Captain, the test-only change is narrowly scoped and preserves independent byte and matcher enforcement for both U+2580 and U+2584.
Testing
Inspected the base-to-target change and production matcher, reproduced Bash 3.2’s literal backslash-u behavior, passed the focused composer test in ambient and C locales, and captured an end-to-end transcript proving both verified UTF-8 half-block alternatives prevent footer swallowing while a non-edge does not.
Evidence: Half-block end-to-end transcript
Bash 3.2 emitted literal \u2580 bytes; verified UTF-8 literals for U+2584 and U+2580 both yielded empty, while the non-edge counterfactual yielded pending. SHA-256: 26e718a0a701e7d91dae146f76e2ceaf27d8da78470ea5d1c613bf0a79ab0316
Additional evidence for the fixture defect this PR already addresses: pristine upstream main 8f7b79c77c2198a71a01082215227a64500015e3 still fails tests/fm-composer-lib.test.sh with a half-block rule row must count as a structural edge under macOS Bash 3.2.57. The same assertion fails on #3766's contribution head in the paired comparison.
With LANG=LC_ALL=C.UTF-8, bash -c 'printf "\u2580\n"' | od -An -tx1 produced 5c 75 32 35 38 30 0a: literal \u2580 plus newline, not the intended glyph. This distinguishes the observed failure from a production classifier defect or simply a non-UTF-8 locale.
This is baseline reproduction evidence, not a review or validation of this PR's current head. We found this existing narrowly scoped thread and are opening no duplicate issue or competing PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Repair the pre-existing default-branch failure in tests/fm-composer-lib.test.sh without weakening the half-block structural-edge property. Determine whether production or the environment is at fault first. The production matcher already recognizes U+2580 and U+2584; host Bash 3.2 emits literal backslash-u text for printf '\u…'. Make the test construct verified UTF-8 source literals instead, fail loudly if the fixture bytes are not preserved, keep the focused test single-purpose, and prove both half-block production alternatives remain enforced.
What Changed
Risk Assessment
✅ Low: Captain, the test-only change is narrowly scoped and preserves independent byte and matcher enforcement for both U+2580 and U+2584.
Testing
Inspected the base-to-target change and production matcher, reproduced Bash 3.2’s literal backslash-u behavior, passed the focused composer test in ambient and C locales, and captured an end-to-end transcript proving both verified UTF-8 half-block alternatives prevent footer swallowing while a non-edge does not.
Evidence: Half-block end-to-end transcript
Bash 3.2 emitted literal\u2580bytes; verified UTF-8 literals for U+2584 and U+2580 both yieldedempty, while the non-edge counterfactual yieldedpending. SHA-256: 26e718a0a701e7d91dae146f76e2ceaf27d8da78470ea5d1c613bf0a79ab0316Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
Inspectedgit diff f1a4af426d7199c1781bc91ccd143b8e1f732d10..eb25d1f401918f50536481f5f37c6e557652339aand the production edge matcher.Confirmed host/bin/bashis GNU Bash 3.2.57 and itsprintf '\u2580'emits literal bytes5c7532353830./bin/bash tests/fm-composer-lib.test.shLC_ALL=C /bin/bash tests/fm-composer-lib.test.shCaptured a manual public-interface transcript verifying exact fixture bytes, independent U+2584/U+2580 edge behavior, end-to-endemptyverdicts, and thependingnon-edge counterfactual.Verifiedgit status --shortremained empty after testing.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.