Skip to content

release-train: develop -> staging - #498

Merged
tracebloc-release-train[bot] merged 1 commit into
stagingfrom
release-train/to-staging
Aug 13, 2026
Merged

release-train: develop -> staging#498
tracebloc-release-train[bot] merged 1 commit into
stagingfrom
release-train/to-staging

Conversation

@LukasWodka

@LukasWodka LukasWodka commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Automated promotion by the release train (RFC-0008 D14). Head is the train-managed release-train/to-staging branch (a mirror of develop), so it never collides with a human PR. Merged only when the fr-gate is green.


Note

Medium Risk
Changes the privileged installer download/bootstrap path and every user-facing install/upgrade hint; behavior is intentionally tightened (fail-closed downloads, new command shape) with tests, but a mistake would affect onboarding and self-update flows broadly.

Overview
Centralizes how the CLI runs and advertises the official installer: new internal/installer owns URL, Cmd, and Script(subcommand, env) so doctor remedies, upgrade, prepare-host, and cluster “no client” errors all share one bootstrap string.

Replaces the old bash <(curl …) / duplicated doctor.go constants with a one-line subshell that downloads i.sh to a temp file (set -e, curl -o, --tlsv1.2), runs bash "$tmp", and scopes set -e/trap so pasting the hint does not arm errexit on the user’s shell. Upgrade and prepare-host manual fallbacks are now byte-identical to what the CLI actually executes (including optional TB_PREPARE_USER for prepare-host).

Adds structural and bash integration tests guarding single-line paste safety, no pipe/process substitution, subshell wrapping, and non-zero exit on failed downloads.

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

…497)

* fix(installer): harden the bootstrap idiom to fail closed (cli#396)

The one-liner we print (and exec) for the installer was
`bash <(curl -fsSL https://tracebloc.io/i.sh)`. Process substitution
doesn't propagate curl's exit code: on a network/DNS/HTTP failure bash
reads an empty script from the substituted fd and exits 0. So every
copy-paste recovery hint derived from it — doctor's reinstall / "set one
up" remedies, the cluster-discovery error, and prepareHostManualHint —
could report success while nothing ran, or run a partial download.

Move the URL and the idiom into one internal/installer package. The new
shape is download-to-temp-file + `set -e`, but on a single line wrapped
in a subshell:

  (set -e; tmp="$(mktemp)"; trap 'rm -f "$tmp"' EXIT; curl -fsSL --tlsv1.2 URL -o "$tmp"; bash "$tmp")

- fail-closed: `set -e` + `curl -o` aborts with curl's real status; the
  full download completes before anything runs, so no partial execution.
- single line: a multi-line block pastes unreliably (PowerShell can run
  a multi-line paste bottom-up, executing the installer before the
  download). One line pastes the same everywhere.
- paste-safe: the subshell scopes `set -e`/`trap` so pasting into an
  interactive shell can't arm errexit on it (which would close the
  terminal on the curl failure) or leave a stray EXIT trap.
- interactive stdin preserved: runs a downloaded file, not a pipe or
  process substitution, so the installer's prompts still read the TTY.

Every consumer now derives from installer.Cmd/Script, so the printed
hint is byte-identical to the command we just tried, and a URL/idiom
change lands everywhere at once. Adds an executable test that proves
fail-closed (dead endpoint, offline) and no errexit/trap leak.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* docs(installer): separate the stdin and fail-open rationales (cli#396)

Asad's review: the doc lumped `bash <(curl …)` in with the
stdin-stealing argument, but process substitution hands bash a
/dev/fd/N *filename*, so its stdin stays the TTY — that's why it was the
original choice. The load-bearing reason to reject it is fail-open (it
exits 0 on a curl failure), not stdin. Split the two rationales so the
#397 justification is precise. No behavior change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: shujaat hasan <shujaathasan@shujaats-MacBook-Pro.local>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
@LukasWodka

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot 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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 522113c. Configure here.

@tracebloc-release-train tracebloc-release-train Bot added gate-nudge Toggled by the release train to (re-)fire the fr-gate and removed gate-nudge Toggled by the release train to (re-)fire the fr-gate labels Aug 13, 2026
@tracebloc-release-train
tracebloc-release-train Bot merged commit 39096e9 into staging Aug 13, 2026
38 of 39 checks passed
@tracebloc-release-train
tracebloc-release-train Bot deleted the release-train/to-staging branch August 13, 2026 15:04
@tracebloc-release-train
tracebloc-release-train Bot restored the release-train/to-staging branch August 13, 2026 16:59
Sign up for free to 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.

2 participants