Skip to content

fix(#500): honest roadmap numbering + capture installer output - #502

Merged
shujaatTracebloc merged 1 commit into
developfrom
fix/500-roadmap-and-startprocess-redirects
Jul 30, 2026
Merged

fix(#500): honest roadmap numbering + capture installer output#502
shujaatTracebloc merged 1 commit into
developfrom
fix/500-roadmap-and-startprocess-redirects

Conversation

@shujaatTracebloc

@shujaatTraceblocshujaatTracebloc commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

#500 — honest roadmap numbering + capture installer output

Two Medium Bugbot findings from the develop -> staging promotion (client#499), both in scripts/install-k8s.ps1 and both customer-visible on the Windows path (part of the Windows installer epic, backend#1285).

1. Print-Roadmap listed five steps while the runtime runs six

The added Install system tools phase was never added to the up-front Steps banner, so an operator saw Step 2/6 downloading ~700 MB while the roadmap still called step 2 "cluster setup" and every later step was mis-numbered — undercutting the very honest-progress split that phase separation was making.

Fix: a single $script:INSTALL_STEPS source of truth. Print-Roadmap renders it, and every Step N/total header derives its total from INSTALL_STEPS.Count, so the roadmap and the runtime step count cannot drift again.

2. Tracked installs had no output redirects

The Start-Process installs — Docker Desktop via winget, Docker Desktop direct, winget k3d, winget helm — omitted -RedirectStandardOutput/-RedirectStandardError, so a failure left only a bare exit code in the install log and -Diagnose bundle. Windows installs are the ones we most often debug remotely from a customer's log, so losing installer stderr turns a one-look diagnosis into a round trip.

Fix: a shared Invoke-TrackedInstall helper captures stdout+stderr to temp files, waits with a killing deadline (via Wait-ProcessWithDeadline), folds the captured output into the log (stderr first, matching #423), and returns a typed outcome (ok/failed/timeout/spawn-failed). All four sites route through it; each keeps its own policy (best-effort fall-through for winget; fatal Err for the direct Docker install). The WSL and k3d-cluster-start paths already did this, so this removes an inconsistency inside one change rather than adding a new convention.

Tests

INSTALL_STEPS/Print-Roadmap single-source (all six rendered, numbered; no hard-coded /6; runtime step-count parity); Invoke-TrackedInstall behaviour (ok/failed/timeout/spawn-failed via mocks) + redirect/stderr-ordering source guards + all four installs routed through it. Updated the existing #419/#422 guards that pinned the old Start-Process shapes to the wrapper. Full suite: 339 passed / 0 failed / 9 skipped; check-style + check-drift clean; scripts/manifest.sha256 regenerated (R8).

Closes#500


Note

Low Risk
Changes are confined to the Windows install script, tests, and manifest hash; behavior is clearer logging and numbering with the same timeout/kill semantics as before.

Overview
Fixes two Windows install-k8s.ps1 UX/diagnostics gaps: the up-front step roadmap could disagree with the six runtime phases, and winget/Docker/k3d/helm installs could fail with only an exit code in the log.

Roadmap sync: Introduces $script:INSTALL_STEPS (six entries, including Install system tools). Print-Roadmap and every Step N/total header use INSTALL_STEPS.Count, replacing a five-step banner and hard-coded /6 totals.

Installer output: Adds Invoke-TrackedInstall to run installs with stdout/stderr redirected to temp files, a killable Wait-ProcessWithDeadline, log folding (stderr then stdout), and outcomes ok / failed / timeout / spawn-failed. Docker (winget + direct), k3d winget, and helm winget route through it; winget paths stay best-effort fallback, direct Docker still fails loudly on non-ok.

Pester coverage and scripts/manifest.sha256 are updated for the new helper and step source of truth.

Reviewed by Cursor Bugbot for commit dfc02ba. Bugbot is set up for automated code reviews on this repo. Configure here.

Two Medium Bugbot findings from the develop->staging promotion (client#499), both
customer-visible on the Windows path.
1. Print-Roadmap listed five steps while the runtime ran six (the added "Install
system tools" phase was never added to the up-front banner), so every later step
was mis-numbered -- undercutting the honest-progress split it was meant to show.
Fix: a single $script:INSTALL_STEPS source of truth. Print-Roadmap renders it,
and every "Step N/total" header derives its total from INSTALL_STEPS.Count, so
the roadmap and the runtime step count can't drift again.
2. The tracked winget/installer installs (Docker Desktop via winget, Docker Desktop
direct, winget k3d, winget helm) had no output redirects, so a failure left only
a bare exit code in the log / -Diagnose bundle -- expensive when we debug Windows
installs remotely from a customer log. Fix: a shared Invoke-TrackedInstall helper
captures stdout+stderr to temp files, waits with a killing deadline, folds the
output into the log (stderr first, matching #423), and returns a typed outcome.
All four sites route through it; the WSL / k3d-cluster-start paths already did
this, so this removes an inconsistency inside one change rather than adding a new
convention.
Tests: INSTALL_STEPS/Print-Roadmap single-source + no hard-coded /6 + step-count
parity; Invoke-TrackedInstall behavior (ok/failed/timeout/spawn-failed via mocks) +
redirect/ordering source guards + all four installs routed through it. Updated the
#419/#422 guards that pinned the old Start-Process shapes to the wrapper.
Closes#500
@shujaatTraceblocshujaatTracebloc self-assigned this Jul 30, 2026
@LukasWodka

Copy link
Copy Markdown
Contributor

👋 Heads-up — Code review queue is at 31 / 30

Above the WIP limit. The team convention is to review existing PRs before opening new work.

Open PRs currently in Code review (oldest first):

Pull from review before opening new work. (This is a nudge from the kanban WIP check, not a block.)

@shujaatTracebloc
shujaatTracebloc marked this pull request as ready for review July 30, 2026 15:25
@LukasWodka

Copy link
Copy Markdown
Contributor

👋 Heads-up — Code review queue is at 31 / 30

Above the WIP limit. The team convention is to review existing PRs before opening new work.

Open PRs currently in Code review (oldest first):

Pull from review before opening new work. (This is a nudge from the kanban WIP check, not a block.)

@shujaatTracebloc
shujaatTracebloc merged commit c44f9a8 into developJul 30, 2026
47 checks passed
@shujaatTracebloc
shujaatTracebloc deleted the fix/500-roadmap-and-startprocess-redirects branch July 30, 2026 15:36
@LukasWodka

Copy link
Copy Markdown
Contributor

/fr-pass

Sign up for freeto 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.

3 participants

@shujaatTracebloc@LukasWodka@aptracebloc