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
repo-fleet-hygiene:audit: display_value %q-escapes any non-ASCII value (empty kind counts render as $'\342\200\224') #4208
In the repository rollup, a repository with no findings shows:
Kind counts: $'\342\200\224'
The intended value is an em dash (—).
Cause
display_value in skills/audit/scripts/audit-fleet.sh (~line 137) sets LC_ALL=C and tests the value against ^[[:print:]]*$. In the C locale, every byte above 0x7F fails [[:print:]], so any non-ASCII value is %q-escaped. The escaping exists to stop control bytes from forging report lines. Multibyte UTF-8 is not a control byte.
This also affects real data. A path, branch name, or remote with non-ASCII characters (for example accented directory names) prints as an unreadable $'...' literal.
Fix
Escape only when the value contains control characters: [[ "$value" =~ [[:cntrl:]] ]]. In the C locale, [[:cntrl:]] matches only 0x00-0x1F and 0x7F, so the forgery protection stays.
Type: Bug Summary: Stop the fleet report's value-display formatting from %q-escaping ordinary non-ASCII (UTF-8 multibyte) values; escape only values that contain actual control bytes.
Current behavior:
The function that renders values into the fleet audit report tests each value against a printable-character class evaluated in a fixed byte-oriented locale. In that locale, every byte above the 7-bit ASCII range fails the printable test, so any value containing a multibyte UTF-8 character (an em dash, an accented letter, etc.) is rendered as a shell-quoted escape sequence instead of the readable character. This affects both a placeholder value shown when a repository has no findings (intended to display as a plain em dash) and any real report field containing non-ASCII text, such as a path or branch name with an accented character.
Desired behavior:
A value is escaped only when it contains an actual control character (the C0 control range and DEL). A value containing only printable non-ASCII UTF-8 bytes is rendered as-is, through the same path-normalization step every other value already gets, and is never escaped solely for containing valid multibyte UTF-8. The no-findings placeholder for a repository's finding-kind summary renders as a plain, readable value with no escape sequence.
Key interfaces:
The report's value-display function must switch its escape trigger from a printable-character test evaluated in a byte-oriented locale to an explicit control-character test, so a value is escaped exactly when it contains bytes in the control range, and never solely because it contains valid multibyte UTF-8.
Acceptance criteria:
Running the fleet audit over a repository with zero findings displays its finding-kind summary as a readable placeholder value with no shell-quoted escape sequence in the output.
Running the fleet audit over a repository whose branch name or path contains a non-ASCII UTF-8 character (for example, an accented letter) displays that value unescaped and readable in the report.
Running the fleet audit over a repository whose branch name or path contains an embedded control character (for example, a newline injected into a ref name) still displays that value escaped in the report, unchanged from current behavior.
A test exercising a non-ASCII branch name and a no-findings repository passes.
Out of scope:
Any other report-formatting behavior (drive-letter path normalization, field labels, etc.) beyond the escape-trigger condition.
The broader project-wide stance on em dashes in prose elsewhere in the codebase; this issue is scoped to the report's own value rendering.
From the 2026-09-29 audit of the unattended Cursor run. The issue stays closed; this is a decision packet.
What the audit found. The fix grew from the brief's one-line control test into a UTF-8 validator (PR #4634, audit-fleet.sh:158-204, utf8_printable): an RFC 3629 byte walk, Bidi_Control, U+2028/U+2029, and escaping of malformed bytes. The brief said to escape "exactly when it contains bytes in the control range" and listed other formatting as out of scope. Shipped in CHANGELOG 0.23.33.
Owner decision needed.
Question: keep the wider validator, or reduce it to what the brief asked for?
Option A: keep the allowlist validator and record it on this issue as the accepted scope.
Option B: reduce to a control test that includes C1 and drop the bidi and malformed-byte escaping.
Activity
kyle-sexton commentedon Sep 23, 2026
This was generated by AI during triage.
Agent Brief
Type: Bug
Summary: Stop the fleet report's value-display formatting from
%q-escaping ordinary non-ASCII (UTF-8 multibyte) values; escape only values that contain actual control bytes.Current behavior:
The function that renders values into the fleet audit report tests each value against a printable-character class evaluated in a fixed byte-oriented locale. In that locale, every byte above the 7-bit ASCII range fails the printable test, so any value containing a multibyte UTF-8 character (an em dash, an accented letter, etc.) is rendered as a shell-quoted escape sequence instead of the readable character. This affects both a placeholder value shown when a repository has no findings (intended to display as a plain em dash) and any real report field containing non-ASCII text, such as a path or branch name with an accented character.
Desired behavior:
A value is escaped only when it contains an actual control character (the C0 control range and DEL). A value containing only printable non-ASCII UTF-8 bytes is rendered as-is, through the same path-normalization step every other value already gets, and is never escaped solely for containing valid multibyte UTF-8. The no-findings placeholder for a repository's finding-kind summary renders as a plain, readable value with no escape sequence.
Key interfaces:
Acceptance criteria:
Out of scope:
fix(repo-fleet-hygiene): keep UTF-8 printable in display_value (#4208) (
fix(repo-fleet-hygiene): escape C1, separators, bidi and malformed UT…
fix(repo-fleet-hygiene): escape remaining Bidi_Control in display_val…
docs(repo-fleet-hygiene): fix reference rows, add dated git-behavior …
kyle-sexton commentedon Sep 29, 2026
From the 2026-09-29 audit of the unattended Cursor run. The issue stays closed; this is a decision packet.
What the audit found. The fix grew from the brief's one-line control test into a UTF-8 validator (PR #4634,
audit-fleet.sh:158-204,utf8_printable): an RFC 3629 byte walk, Bidi_Control, U+2028/U+2029, and escaping of malformed bytes. The brief said to escape "exactly when it contains bytes in the control range" and listed other formatting as out of scope. Shipped in CHANGELOG 0.23.33.Owner decision needed.
[[:cntrl:]]underLC_ALL=Cshipped exactly that regression. This is security-adjacent, so the owner decides.display_valuesimplification is wanted.The fix branch (#5289, T7) records the C-locale limit either way. No code changes until this is answered. Added
status: needs-decision.fix(repo-fleet-hygiene): sync stash safety, exit status, decoupling; …