fix: install.ps1 ASCII-clean — PS 5.1 no-BOM ANSI read caused ParserError cascade #19

Merged
jsutter merged 3 commits from fix/installer-ps51-ascii into main 2026-09-12 00:35:45 +00:00
Owner

Stock Windows PowerShell 5.1 (the win11-test golden's only shell; pwsh absent) reads BOM-less script files as the system ANSI codepage. The installer's U+2014 em-dashes, U+2500 box rules, and U+2713 checkmarks decode to cp1252 bytes whose 0x93/0x94 trail bytes become U+201C/U+201D — which PowerShell tokenizes as string delimiters. Strings close early, braces unbalance, and the hash-pinned runbook installer dies with a MissingEndCurlyBrace/ParseException cascade before executing (observed on win11-test, inv-20260912T000801Z vm/win/install-bypass.transcript).

Pure ASCII is codepage-invariant (every byte < 0x80 decodes identically under any ANSI codepage), which removes the parser-mode question entirely — preferred over a UTF-8 BOM, which future ASCII-loving editors can silently strip.

  • U+2014 (15) -> '--'; U+2500 (130) -> '-'; U+2713 (5) -> 'OK: '
  • CRLF preserved (323 CRLF, 0 bare LF), no BOM
  • byte proof: 0 bytes >= 0x80; new sha256 3b7871135ada96a2a124d10f0035ced918e633cd1a2c0d4707b647280316b13a
  • tests/install-signing.sh: ALL CHECKS PASSED; tests/install-ps1-signing.ps1 sections 1-4 ALL PASSED (pwsh + nix minisign)

Known separate blocker (NOT this PR): the vendored-minisign gate ($MinisignExeSha256 placeholder + tools-minisign-0.11 release absent) still refuses every install until S011 publishes — plan-gated on Operator confirmation.

Stock Windows PowerShell 5.1 (the win11-test golden's only shell; pwsh absent) reads BOM-less script files as the system ANSI codepage. The installer's U+2014 em-dashes, U+2500 box rules, and U+2713 checkmarks decode to cp1252 bytes whose 0x93/0x94 trail bytes become U+201C/U+201D — which PowerShell tokenizes as string delimiters. Strings close early, braces unbalance, and the hash-pinned runbook installer dies with a MissingEndCurlyBrace/ParseException cascade before executing (observed on win11-test, inv-20260912T000801Z vm/win/install-bypass.transcript). Pure ASCII is codepage-invariant (every byte < 0x80 decodes identically under any ANSI codepage), which removes the parser-mode question entirely — preferred over a UTF-8 BOM, which future ASCII-loving editors can silently strip. - U+2014 (15) -> '--'; U+2500 (130) -> '-'; U+2713 (5) -> 'OK: ' - CRLF preserved (323 CRLF, 0 bare LF), no BOM - byte proof: 0 bytes >= 0x80; new sha256 3b7871135ada96a2a124d10f0035ced918e633cd1a2c0d4707b647280316b13a - tests/install-signing.sh: ALL CHECKS PASSED; tests/install-ps1-signing.ps1 sections 1-4 ALL PASSED (pwsh + nix minisign) Known separate blocker (NOT this PR): the vendored-minisign gate ($MinisignExeSha256 placeholder + tools-minisign-0.11 release absent) still refuses every install until S011 publishes — plan-gated on Operator confirmation.
The hash-pinned runbook installer carries U+2014 em-dashes, U+2500 box
rules, and U+2713 checkmarks. Stock Windows PowerShell 5.1 (the win11
golden's only shell) reads BOM-less script files as the system ANSI
codepage, so those UTF-8 bytes decode to cp1252 characters whose 0x93/0x94
trail bytes become U+201C/U+201D — and PowerShell tokenizes smart quotes
as string delimiters. Strings close early, braces unbalance, the file
dies with a MissingEndCurlyBrace/ParseException cascade before executing
anything (observed on win11-test: inv-20260912T000801Z vm/win/
install-bypass.transcript).

Pure ASCII is codepage-invariant: every byte < 0x80 decodes identically
under cp1252, UTF-8, and every Windows ANSI codepage, so the parser-mode
question disappears for this file and stays gone for future editors.

- U+2014 (15 sites) -> '--', U+2500 rules (130) -> '-', U+2713 (5) -> 'OK: '
- CRLF line endings preserved (323 CRLF, 0 bare LF) per the header's PS 5.1
  here-string requirement; no BOM added
- byte proof: 0 bytes >= 0x80; sha256 3b7871135ada96a2a124d10f0035ced918e633cd1a2c0d4707b647280316b13a
- tests: sh tests/install-signing.sh ALL PASSED; pwsh tests/
  install-ps1-signing.ps1 sections 1-4 ALL PASSED (with nix minisign)
jsutter force-pushed fix/installer-ps51-ascii from aa06813027 to 2752d76fde 2026-09-12 00:35:24 +00:00 Compare
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
deepnet/dit-releases!19
No description provided.