Installer copy catalog (byte-exact golden of what a user sees)#366
Installer copy catalog (byte-exact golden of what a user sees)#366LukasWodka wants to merge 1 commit into
Conversation
Adds scripts/tests/copy-catalog.bats — a golden catalog mirroring the CLI's
(cli repo, internal/cli/testdata/golden/), so the installer's user-facing copy
can be reviewed without running an install. Two files under
scripts/testdata/golden/, ordered like the run:
00-install.golden — the banner (versioned + direct-run variants), the
"2. Installing" roadmap, the six running step headers
(a-f; titles read live from install-k8s.sh so they can't
drift), and --help.
01-outcomes.golden — print_summary's five end states (connected / starting /
bad creds / image pull / crash) + the reboot footer,
incl. the macOS/Windows variant.
Rendered colour-off (NO_COLOR) so the text is byte-exact; the one live read
(_chart_version) is stubbed for determinism, and $HOME collapses to ~, so the
goldens are stable across machines/CI. The tests fail on drift; regenerate with
TB_UPDATE_GOLDEN=1 bats scripts/tests/copy-catalog.bats.
Not in the R8 manifest (tests/ + testdata/ aren't installer scripts); CI already
globs scripts/tests/*.bats and excludes .bats from shellcheck.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
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 f5bfebf. Configure here.
| GPU_VENDOR=none; TB_NAMESPACE=tracebloc; HOST_DATA_DIR="$HOME/.tracebloc" | ||
| # Stub the one live read the summary makes, so it's deterministic. | ||
| _chart_version() { echo "1.9.5"; } | ||
| } |
There was a problem hiding this comment.
Banner catalog not environment-stable
Low Severity
setup never clears TRACEBLOC_BANNER_SHOWN, but print_banner no-ops when that variable is set. An inherited value from the shell (or a prior install debug session) suppresses both banner samples in emit_install, so the drift check fails or TB_UPDATE_GOLDEN=1 rewrites 00-install.golden without banners. Existing print_banner tests in common.bats already unset this for the same reason.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit f5bfebf. Configure here.


Summary
Adds a copy catalog for the installer — a byte-exact golden of every stable piece of user-facing copy, so wording + layout can be reviewed without running an install. Mirrors the CLI's golden catalog (
clirepo,internal/cli/testdata/golden/).scripts/tests/copy-catalog.batsrenders the copy colour-off (NO_COLOR) into two files underscripts/testdata/golden/, ordered like the run:00-install.golden— the banner (versioned + direct-run variants), the "2. Installing" roadmap, the six running step headers (a–f; titles read live frominstall-k8s.shso they can't drift), and--help.01-outcomes.golden—print_summary's five end states (connected / starting / bad creds / image pull / crash) + the reboot footer, including the macOS/Windows variant.Why
So we stop the "change copy → deploy → see it in prod → fix" loop: the catalog is reviewable on any PR that touches installer copy, and the test fails on drift.
Determinism
_chart_version) is stubbed;$HOMEcollapses to~in the summary, so the goldens are stable across machines/CI.install-k8s.shat test time, so they track the real installer.Test plan
TB_UPDATE_GOLDEN=1 bats scripts/tests/copy-catalog.batsregenerates; plainbats scripts/tests/copy-catalog.batsverifies (drift guard). Both green locally.tests/+testdata/aren't installer scripts). CI already globsscripts/tests/*.batsand excludes.batsfrom shellcheck, so it runs with no wiring changes.🤖 Generated with Claude Code
Note
Low Risk
Test-only additions (golden fixtures + BATS); no installer runtime or deployment behavior changes.
Overview
Adds a byte-exact copy catalog for the tracebloc installer so stable user-facing text and layout can be reviewed on PRs without running a full install (same idea as the CLI golden catalog).
New BATS suite
scripts/tests/copy-catalog.batsrenders installer copy withNO_COLOR=1, stubs_chart_version, and pulls step a–f titles live frominstall-k8s.shviasedso headers stay aligned with the real script. Output is diffed against two goldens underscripts/testdata/golden/:00-install.golden(banner variants, roadmap, step headers,--help) and01-outcomes.golden(allprint_summaryend states plus the macOS/Windows reboot note). Drift fails CI; intentional copy updates useTB_UPDATE_GOLDEN=1 bats scripts/tests/copy-catalog.bats.Reviewed by Cursor Bugbot for commit f5bfebf. Bugbot is set up for automated code reviews on this repo. Configure here.