Repository navigation
chore(install): install.ps1 narrates on the verbose stream, gives its results as output, and fails with error records of its own - #1103
Merged
David-Noble-at-work merged 7 commits intoOct 20, 2026
Conversation
David-Noble-at-work
deleted the
chore/1044-install-ps1-narrates-fails-and
branch
October 20, 2026 16:33
This was referenced Oct 20, 2026
Open
David-Noble-at-work
added a commit
that referenced
this pull request
Oct 20, 2026
…nder Windows PowerShell 5.1 with a UTF-8 console (#1105) ## Summary Lane 57 of #949: a defect lane 30 (#1103) merged. - **No byte-order mark reaches a program `install.ps1` runs (#1104).** - Under Windows PowerShell 5.1 with a UTF-8 console, every program the installer runs read `EF BB BF` from the standard input #1044 closed for it, before the end of that input. - The cause is .NET Framework 4.8: it writes the console input encoding's preamble to a redirected standard input the moment the process starts, and its `ProcessStartInfo` has no `StandardInputEncoding`. - `Invoke-NativeCommand` now sets UTF-8 without a preamble for that moment and restores the caller's encoding in a `finally`. The code page is 65001 throughout, so section 7's rule never to change it holds. - Ruled 2026-10-20: "We do not store boms. Ever!" Offered this, an inherited standard input, or `cmd /c ... < NUL`, you answered: "Implement your solution." - **The suite catches it on any console.** The stdin check's child session sets its input encoding to UTF-8 with a preamble first, and a new check confirms the caller's encoding is as it was afterwards. #1044's check passed on danoble-wd11-3 only because that console is OEM. - **#1103 merged with these checks failing.** A rerun I requested while its PR script's gate was watching hid the checks from the gate. That is logged on NobleFactor/noblefactor-engprod#317. This script's gate now also reads every check run for the head commit from GitHub's API, the latest attempt of each, and refuses to merge unless each succeeded. - **Plan:** `docs/plans/fix/1104-install-ps1-s-programs-read-a.md`. Resolves #1104 ## Test plan - [x] danoble-wd11-3 (windows/arm64), with this branch's archive: - 85 of 85 checks under Windows PowerShell 5.1.26100.9711 and under PowerShell 7.6.6; - against `46122426`'s `install.ps1` under 5.1, the stdin check fails with "stdin read: 3", as on CI's runners. - [x] Tried there before writing it: - with a UTF-8 console, the program read `239,187,191` before the fix and nothing after, under 5.1; - closing the writer's base stream instead does not help. - [x] `Test-PowerShell.ps1`: no findings - [x] This script's pre-flight: CI's whole quality gate, the suite off Windows, `make test-race` and `make test-scenario` - [ ] CI on this pull request, every leg: the `install.ps1` legs under 5.1 and 7 on amd64 and arm64 Written with AI assistance. Signed-off-by: David Noble <[email protected]> Assisted-by: Claude Code
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Lane 30 of #949.
install.ps1speaks and fails as the PowerShell style guide's section 7 says (noblefactor-ops0f8b2fd), as #1044 rules.Write-Verbose, so-Verboseshows it, as does$VerbosePreference = 'Continue'beforeirm | iex.Write-Warning.Write-Info,Write-Success,Write-Warnand every-InformationAction Continueare gone.Write-Fatal, which threw strings, is gone. Each of the twelve refusals is an error record of the installer's own, with an id and a category (RequiresWindows,NoChecksum,ChecksumMismatch,GitHubRefused, …), its message unchanged.Install-DevLorenotes its caller's error action, setsStop, and reports through$PSCmdlet.WriteErrorunder the caller's own setting.Install-DevLore's, because underirm | iexthe script has no$PSCmdlet.irm | iexforms it returns, so the session goes on (install.ps1's exit closes the user's PowerShell window: under irm | iex and the script-block form, exit ends the session, not the script #965; ruled 2026-10-19, "return, per install.ps1's exit closes the user's PowerShell window: under irm | iex and the script-block form, exit ends the session, not the script #965").irm | iexno longer changes the user's own. The rest of whatirm | iexleaves in the session is irm | iex leaves install.ps1's settings in the user's session: the preference, strict mode, and the script's functions and variables #982's.scripts/Test-InstallScript.ps1):-Helpwrites to the output stream;Stopcatches the record;irm | iexleaves the caller's error action alone;Test-GitHubItselfsendsAuthorization: Bearer, the one form #949's plans, its schedule and its code references say what is no longer so #1060 settled.docs/architecture/10-command-line-interface.md§ 2 says howinstall.ps1speaks and fails.docs/plans/chore/1044-install-ps1-narrates-fails-and.md.Resolves #1044
Test plan
-Helpexits 0;-Verboseshows the narration and the session goes on;irm | iexthe session goes on and the caller's error action is unchanged;StopcatchesRequiresWindows,Install-DevLore;SilentlyContinuesees nothing, and$Errorkeeps the record.scripts/Test-InstallScript.ps1off Windows: its one check passes, by the recordTest-PowerShell.ps1(PSScriptAnalyzer and the shebang rule): no findingsmake test-raceandmake test-scenarioinstall.ps1legs run the suite under Windows PowerShell 5.1 and PowerShell 7, on amd64 and arm64, where the installing checks runWritten with AI assistance.
Signed-off-by: David Noble [email protected]
Assisted-by: Claude Code
Time
Computed by the algorithm of noblefactor-ops#188 at merge.