Skip to content

fix(guard): spec-conformance fixtures are bytes — the zero-width key rendered only under a UTF-8 locale - #3109

Open
noahgift wants to merge 2 commits into
mainfrom
PMAT-1098-spec-conformance-locale
Open

fix(guard): spec-conformance fixtures are bytes — the zero-width key rendered only under a UTF-8 locale#3109
noahgift wants to merge 2 commits into
mainfrom
PMAT-1098-spec-conformance-locale

Conversation

@noahgift

Copy link
Copy Markdown
Contributor

What broke

Main's guard-tree went RED on yoga-build3 (run 34529896596, job 103047791546):
BROKE ledger_respend_zero_width_key expected L1 got CLEAN. The same tree passes 40/40 on intel.

Why

The fixture spelled its zero-width space as \u200b and rendered it with printf '%b'. bash expands \u
only under a UTF-8 locale; under POSIX it keeps the literal text, so the key never matches lambda and the
respend row reads CLEAN. intel runs en_US.UTF-8; yoga's runner image ran POSIX (fixed on the runner side
since: LANG=C.UTF-8 in the yoga and gx10 runner env).

Fix

  • The fixture spells the bytes (\xe2\x80\x8b), identical under any locale.
  • selftest() pins LC_ALL=C, so a \u fixture fails on every box, not only on the odd runner.

Evidence (a75e154's tree, run locally)

C.UTF-8 no locale
before 40/40 39/40 (the BROKE row above)
after 40/40 40/40
mutation: \u200b restored, selftest pins C 39/40 RED

bashrs finding count unchanged. Pre-push: cargo fmt --all -- --check, cargo test -p aprender-contracts --lib,
cargo deny check advisories all green.

Milestone 0.67.0: runner parity for the three-host build pool (intel + yoga + gx10).

🤖 Generated with Claude Code

…rendered only under a UTF-8 locale

The ledger_respend_zero_width_key fixture spelled its zero-width space as a \u200b escape and rendered
it with printf '%b'. bash expands \u only when the locale is UTF-8; under a POSIX locale it keeps the six
characters as literal text, so the key never collides with "lambda" and the row reads CLEAN. intel's
runners run en_US.UTF-8, yoga's runner image ran POSIX, and main's guard-tree went RED on yoga-build3
(run 34529896596, job 103047791546: "BROKE ledger_respend_zero_width_key expected L1 got CLEAN").

The fixture now spells the bytes (\xe2\x80\x8b), which printf '%b' renders identically under any locale,
and selftest() pins LC_ALL=C so a \u fixture fails on every box instead of only on the odd runner.

Measured on a75e154's tree: before, 40/40 under C.UTF-8 and 39/40 with no locale; after, 40/40 under
both. Mutation: restoring the \u200b escape goes RED (39/40) under a C.UTF-8 ambient locale once the
selftest pins C.

Pmat-Ticket: PMAT-1098
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@noahgift noahgift added this to the 0.67.0 milestone Sep 10, 2026
@noahgift
noahgift enabled auto-merge September 10, 2026 22:59
@github-actions

github-actions Bot commented Sep 10, 2026

Copy link
Copy Markdown

§13.11 rung 1 — quorum shadow verdict

S13-SHADOW pr=3109 head=a10777a424524a4c4f0da90ec1b31cf9363ff825 verdict=REFUSE class=Q1 arm_rc=1

Shadow mode: this records a verdict and merges nothing. A refusal
to arm is not a block (§13 adds zero rows to §7) — the pull request is
exactly as green as it was.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant