Uh oh!
There was an error while loading. Please reload this page.
feat(#435): single-source cross-OS installer facts + CI parity gate (RFC D3/D4) - #528
Merged
Merged
Conversation
…RFC D3/D4) The costliest drift class of the installer sweep was FACTS diverging between the three OS implementations — the #410 incident (k3d/helm pins bumped in bash #382 but not PowerShell #410) failed a real customer install. Copy already had the byte-exact catalog; behavior facts get the same treatment here. - scripts/spec/facts.env: the single source of truth for cross-OS facts. Tool version pins (K3D_VERSION / HELM_VERSION / K8S_VERSION) + the READY_TIMEOUT budget. - scripts/check-facts.sh: --write stamps the spec into every consumer (bash common.sh + summary.sh, PowerShell install-k8s.ps1); --check is the CI gate (mirrors gen-manifest's write/check split). Nothing is sourced at runtime — consumers carry literal values, so the single-file verified bootstrap (R8) is untouched. - CI: installer-tests.yaml runs `check-facts.sh --check`, failing the PR if any consumer drifted from the spec — so the #410 incident (a pin in one OS path but not the other) can no longer ship. install-k8s.ps1's lockstep comment updated to point at the spec. Tests: scripts/tests/check-facts.bats — the #410 incident reproduced as a red check (both directions), --write round-trips for versions + the timeout, fail-closed on a missing pattern, bad-mode rejection. Scope note: hosts are already single-sourced + drift-checked (check-drift Checks 1 & 5); memory floors (bash-only today) and the behavior-parity matrix are follow-ups on this same mechanism — a new fact is one row in facts.env + check-facts.sh. Closes#435 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…rce-facts # Conflicts: # scripts/manifest.sha256
shujaatTracebloc
marked this pull request as ready for review
August 3, 2026 06:56
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c374d1d. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…acts.sh (Bugbot) Two Bugbot findings: 1. (High) install-k8s.ps1 ALSO pins K8S_VERSION ($K8S_VERSION default, passed to k3d as --image rancher/k3s:$K8S_VERSION), but check-facts treated the pin as bash-only — so bumping the spec + --write updated only common.sh, Windows stayed stale, and --check stayed green: the exact #410 hole for this pin. Added install-k8s.ps1 as a K8S_VERSION consumer (extract + rewrite), updated the facts.env note. 2. (Low) scripts/check-facts.sh was wired for --check but not in the explicit shellcheck --severity=error file list (unlike gen-manifest.sh) — a regression in the facts gate wouldn't fail static CI. Added it to both shellcheck lines. Tests: K8S_VERSION drift in PowerShell -> RED; a K8S bump stamps BOTH consumers. 11/11. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
saadqbal
approved these changes
Aug 3, 2026
Uh oh!
There was an error while loading. Please reload this page.
LukasWodka
commented
Aug 3, 2026
Contributor
/fr-pass |
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 freeto 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.

#435 — single-source cross-OS installer facts + CI parity gate (RFC-CLIENT-0003 D3/D4)
The costliest drift class of the 2026-07 installer sweep was facts diverging between the three OS implementations — most painfully the #410 incident: the k3d/helm pins were bumped in bash (#382) but not PowerShell (#410), which failed a real customer install. Copy already solved its half with the byte-exact catalog; behavior facts get the same treatment here.
What this adds
scripts/spec/facts.env— the single source of truthTool version pins (
K3D_VERSION/HELM_VERSION/K8S_VERSION) + theREADY_TIMEOUTbudget. One place to change a cross-OS fact.scripts/check-facts.sh— generate + gate (mirrorsgen-manifest.sh)--writestamps the spec into every consumer: bashcommon.sh+summary.sh, PowerShellinstall-k8s.ps1.--checkis the CI gate — non-zero if any consumer drifted from the spec.Nothing is sourced at runtime — consumers carry literal values, so the single-file verified bootstrap (R8) is untouched.
CI wiring —
installer-tests.yamlrunscheck-facts.sh --check, failing the PR if a fact was changed in one OS path but not the others. install-k8s.ps1's "keep in lockstep" comment now points at the enforced spec.Acceptance criteria
facts.env) updates every OS path (--write) or fails CI (--check).check-facts.batsreproduces it in both directions.(Hosts are already single-sourced + drift-checked by
check-drift.shChecks 1 & 5.)Tests / gates
scripts/tests/check-facts.bats(9): fix(installer): pin k3d + helm versions in install-k8s.ps1 — drop api.github.com latest lookups #410 reproduced red (both directions),--writeround-trips for versions and the timeout, fail-closed on a moved pattern, bad-mode rejection.shellcheck --severity=error, check-style, check-drift clean;check-facts.sh --checkgreen;manifest.sha256regenerated (R8). bash-3.2-safe.Follow-ups (same mechanism — a new fact is one row in
facts.env+check-facts.sh)PF_MIN_*) — bash-only today; add once PowerShell gains matching gates.Closes#435
Note
Low Risk
Installer tooling and CI guards only; pinned defaults are unchanged and values are not sourced at runtime.
Overview
Introduces
scripts/spec/facts.envas the authoritative list of cross-OS installer facts (k3d/helm/k8s version pins andREADY_TIMEOUT), replacing hand-kept parity between bash and PowerShell.Adds
scripts/check-facts.sh(--write/--check, same pattern asgen-manifest.sh) to stamp those values intocommon.sh,summary.sh, andinstall-k8s.ps1without sourcing the spec at runtime (R8 bootstrap unchanged). Installer static CI now runscheck-facts.sh --checkand includes the script in shellcheck, so a #410-style bump in one OS path fails the PR.check-facts.batscovers drift in both directions,--writeround-trips, and fail-closed behavior when stamped patterns move.manifest.sha256is refreshed for the touched PowerShell installer; comments ininstall-k8s.ps1document the enforced spec.Reviewed by Cursor Bugbot for commit 05055b6. Bugbot is set up for automated code reviews on this repo. Configure here.