fix(installer): memory truth — machine RAM vs Docker's budget, advice clamped to the machine (Windows half of #417) - #444
Open
LukasWodka wants to merge 2 commits into
Open
fix(installer): memory truth — machine RAM vs Docker's budget, advice clamped to the machine (Windows half of #417)#444LukasWodka wants to merge 2 commits into
LukasWodka wants to merge 2 commits into
Conversation
Contributor
Author
|
bugbot run |
Contributor
Author
… lines; advice clamped to the machine (#417, Windows half) The single 'Memory:' line preferred docker info MemTotal over physical RAM, so the same laptop reported 7 GB (Docker up: the WSL2 VM's 50%-of-RAM default) or 15 GB (Docker down) across re-runs — and its remediation told a 15 GB machine to 'give Docker >= 16 GB', which it cannot. - Get-PfHostMemGb (CIM only) replaces the runtime-preferring Get-PfMemGb; Step 1 now always prints the machine's RAM, labeled '(machine)', and — when a runtime is already up — a second line for Docker's actual budget. - Get-PfMemTargets clamps every Docker-budget recommendation to host - 2 GB (floor 4): a 15 GB laptop is now told memory=13GB. Hardware statements ('16 GB of RAM recommended to train') stay unclamped — they describe the machine, not a setting. - Write-PfRuntimeMemStatus is the ONE copy for the budget line, shared by Step 1 and the Step-2 post-Docker re-check (their warnings used to diverge), and a latch stops the same warning printing twice per run. Windows half of #417; the bash half (preflight.sh, same labels + clamp) follows separately. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
LukasWodka
force-pushed
the
fix/417-memory-truth-ps
branch
from
July 27, 2026 15:34
5dc09fa to
3143e1c
Compare
Contributor
Author
Contributor
Author
|
bugbot run |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3143e1c. Configure here.
…gbot #444) Get-PfMemTargets used Max(4, host-2): on <=6 GB hosts it paired 'below the 5 GB the client needs' with 'give Docker 4 GB' (advice that can never clear the warning), and on <=4 GB hosts the floor exceeded the machine. The floor is now PF_MIN_MEM_GB (5, env-overridable) — the exact twin of the bash fix on #445. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
Author
|
bugbot run |
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
Windows half of #417. Three memory-reporting bugs seen live across all three test environments (7 GB / 6 GB / 15 GB readings, and a 15 GB laptop told to "give Docker ≥ 16 GB"):
docker info MemTotal(the WSL2 VM's 50%-of-RAM default) over physical RAM — same machine, different numbers across re-runs depending on whether Docker happened to be up.Change
Get-PfHostMemGb(CIM only) replaces the runtime-preferringGet-PfMemGb. Step 1 prints two labeled truths:Memory: 15 GB (machine)always, andDocker's memory budget: 7 GB …when a runtime is up.Get-PfMemTargetsclamps Docker-budget advice to host − 2 GB (floor 4) → the 15 GB laptop now gets[wsl2] memory=13GB. Hardware statements ("16 GB of RAM recommended to train") stay unclamped — they describe the machine, not a setting.Write-PfRuntimeMemStatusis the single shared copy for the budget line (Step 1 + Step 2), with a latch so one run warns once.manifest.sha256regenerated.Out of scope, noted:
Get-PfCpustill prefers the runtime view (same class, milder — cores don't halve); macOS floor enforcement + VM sizing is #428; the bash half of this ticket follows separately (same labels + clamp inpreflight.sh).Stacked on #440 → #439 → #438 → #437 — merge in that order; this branch contains all of them.
Type
Bug fix
Test plan
Full Pester suite locally on pwsh 7.5 (CI invocation): 181 passed, 0 failed, 8 skipped (9 new).
gen-manifest.sh --checkclean.🤖 Generated with Claude Code
Note
Low Risk
Installer preflight messaging and warn-only memory checks only; no cluster, auth, or data-path changes.
Overview
Fixes Windows installer memory reporting (#417) so preflight no longer mixes up physical RAM with Docker/WSL2's VM budget.
Get-PfHostMemGb(CIM-only) replaces the old runtime-preferring reader. Step 1 always printsMemory: N GB (machine); when Docker is already running it adds a second line for Docker's memory budget viaWrite-PfRuntimeMemStatus.Get-PfMemTargetsclamps Docker-setting hints to host − 2 GB (floor 4), so a 15 GB laptop getsmemory=13GBin.wslconfiginstead of impossible "give Docker ≥ 16 GB". Training RAM recommendations for the machine itself stay at the full defaults.Test-PreflightRuntimeMemreuses the same budget copy and$script:RuntimeMemWarnedso Step 1 and the post-Docker re-check don't double-warn in one run.Pester coverage adds clamp matrices, two-line preflight assertions, and latch behavior;
scripts/manifest.sha256is updated forinstall-k8s.ps1.Reviewed by Cursor Bugbot for commit 3143e1c. Bugbot is set up for automated code reviews on this repo. Configure here.