Skip to content

feat(#435): single-source cross-OS installer facts + CI parity gate (RFC D3/D4) - #528

Merged
shujaatTracebloc merged 3 commits into
developfrom
fix/435-single-source-facts
Aug 3, 2026
Merged

feat(#435): single-source cross-OS installer facts + CI parity gate (RFC D3/D4)#528
shujaatTracebloc merged 3 commits into
developfrom
fix/435-single-source-facts

Conversation

@shujaatTracebloc

@shujaatTraceblocshujaatTracebloc commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

#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 truth
Tool version pins (K3D_VERSION / HELM_VERSION / K8S_VERSION) + the READY_TIMEOUT budget. One place to change a cross-OS fact.

scripts/check-facts.sh — generate + gate (mirrors gen-manifest.sh)

  • --write stamps the spec into every consumer: bash common.sh + summary.sh, PowerShell install-k8s.ps1.
  • --check is 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 wiringinstaller-tests.yaml runs check-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

(Hosts are already single-sourced + drift-checked by check-drift.sh Checks 1 & 5.)

Tests / gates

Follow-ups (same mechanism — a new fact is one row in facts.env + check-facts.sh)

  • Memory floors (PF_MIN_*) — bash-only today; add once PowerShell gains matching gates.
  • The behavior-parity matrix (feature × OS with waivers) — a distinct deliverable best in its own PR.

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.env as the authoritative list of cross-OS installer facts (k3d/helm/k8s version pins and READY_TIMEOUT), replacing hand-kept parity between bash and PowerShell.

Adds scripts/check-facts.sh (--write / --check, same pattern as gen-manifest.sh) to stamp those values into common.sh, summary.sh, and install-k8s.ps1 without sourcing the spec at runtime (R8 bootstrap unchanged). Installer static CI now runs check-facts.sh --check and includes the script in shellcheck, so a #410-style bump in one OS path fails the PR. check-facts.bats covers drift in both directions, --write round-trips, and fail-closed behavior when stamped patterns move. manifest.sha256 is refreshed for the touched PowerShell installer; comments in install-k8s.ps1 document the enforced spec.

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

…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>
@shujaatTraceblocshujaatTracebloc self-assigned this Jul 31, 2026
…rce-facts
# Conflicts:
#	scripts/manifest.sha256
@shujaatTracebloc
shujaatTracebloc marked this pull request as ready for review August 3, 2026 06:56

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ 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.

Comment threadscripts/check-facts.sh
Comment thread.github/workflows/installer-tests.yaml
…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>
@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@saadqbal