feat(installer): install the tracebloc CLI as part of the client install (Step 5, both OSes)#202
Merged
Merged
Conversation
…indows) When a user installs the client, also install the tracebloc CLI so they can `tracebloc dataset push ./data` against the client they just set up — no separate step. - New scripts/lib/install-cli.sh: install_tracebloc_cli() runs the CLI's own released installer (github.com/tracebloc/cli; SHA256 + cosign verified, all arches) — no logic duplicated. NON-FATAL: downloads to a temp file, checks each step, returns 0 on every path, so a CLI hiccup never fails an already-connected client install (and doesn't rely on the caller's pipefail). - install.sh: add the lib to the bootstrap FILES[]. - install-k8s.sh: source it + call after wait_for_client_ready; step N/4 -> N/5. - install-k8s.ps1: Install-TraceblocCli (runs the CLI's install.ps1 in a CHILD process so its exit-on-failure can't abort us); Step 5/5; renumber + roadmap. - common.sh roadmap + summary.sh "what to do next": surface tracebloc dataset push. - docs (README quick-install + INSTALL.md callout) note the CLI is installed. - tests: scripts/tests/install-cli.bats asserts the non-fatal property. Closes #201 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
👋 Heads-up — Code review queue is at 14 / 8 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.) |
common.sh declares CURL_SECURE readonly and load_lib sources it, so the
setup() reassignment errored ("readonly variable") and failed all three
install-cli cases. Drop it — curl is mocked in every test, so the value is
irrelevant. (Refs #201.)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- install-k8s.sh: source + call install_tracebloc_cli only if present, so a stale bootstrap (e.g. a not-yet-updated tracebloc.io/i.sh, whose FILES list is hand-maintained) degrades gracefully — Step 5 is skipped instead of aborting the whole installer under `set -e`. Uses `if` blocks, not `[[ -f ]] && source` (a false `&&` test would itself trip `set -e`). - install-k8s.Tests.ps1: Pester coverage for Install-TraceblocCli — asserts the non-fatal property (warns, never throws) when the CLI installer exits non-zero and when Start-Process throws, plus success on exit 0. Parity with the bash-side install-cli.bats. Refs #201 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
$env:TEMP is null under Linux pwsh (which the ubuntu-latest Pester job exercises), so `Join-Path $env:TEMP ...` threw. Use [System.IO.Path]::GetTempPath() (%TEMP% on Windows, /tmp on Linux). The function is Windows-only in production, but the Pester suite runs on Linux too. Refs #201 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…rsion probe - install-k8s.ps1 (Install-TraceblocCli): Start-Process -Wait -PassThru with redirected output can leave .ExitCode $null on Windows, misreporting a successful install as a failure. Refresh PATH and use `Has tracebloc` as the primary success signal, with ExitCode as a secondary check. Added a Pester case for the null-ExitCode quirk. - install-cli.sh: the cosmetic `$(tracebloc version | head -1)` could fail under `set -o pipefail` (incl. SIGPIPE from head) and, in some bash semantics, abort the "non-fatal" step. Capture into a `local` with `|| true` so it can never abort the client install. Refs #201 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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 7ab391b. Configure here.
Bugbot: the previous fix accepted "tracebloc already on PATH OR exit 0" as success, so a failed re-install on a machine that already had the CLI was misreported as success (the bash step warns on installer failure regardless). Gate on the installer's exit status alone, mirroring bash (`if sh installer`). To keep that exit code reliable on Windows (where -Wait -PassThru with redirected output can leave .ExitCode $null), switch to -PassThru + cache .Handle + WaitForExit(). Replaced the obsolete null-ExitCode test with a regression test: failed re-install + CLI already on PATH must still warn. Refs #201 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
aptracebloc
previously approved these changes
Jun 4, 2026
client/develop's ruleset requires the status contexts `Lint` and `Unit tests`, but this repo's CI emitted equivalents under other names (Static analysis / bats / Pester) — so every PR sat blocked at "Expected — waiting for status to be reported". Add a Standard checks workflow that emits exactly `Lint` (bash -n + shellcheck) and `Unit tests` (bats), reusing installer-tests.yaml's proven steps. It is NOT path-filtered: a required check must report on every PR, or a PR that doesn't touch the filtered paths re-creates the same "Expected" deadlock. Refs #201 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
aptracebloc
approved these changes
Jun 4, 2026
This was referenced Jun 4, 2026
saadqbal
added a commit
that referenced
this pull request
Jun 4, 2026
…er (#203) feat(installer): install the tracebloc CLI as part of the client install (Step 5, both OSes)
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 free
to 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.

Closes #201.
When a user installs the client (
scripts/install.shon macOS/Linux,install.ps1on Windows), the tracebloc CLI is now installed too — so they can immediatelytracebloc dataset push ./dataagainst the client they just set up.Design
scripts/lib/install-cli.sh→install_tracebloc_cli()runs the CLI's own released installer (tracebloc/cli,releases/latest/download/install.sh), which downloads the right build for the OS/arch and verifies it (SHA256 + cosign). No install logic duplicated here.return 0s on every path — it does not rely on the caller'sset -o pipefail(so nocurl | shmis-reporting a failed download as success).wait_for_client_ready;step N 4→N 5across the orchestrator + helm lib + roadmap.FILES=()ininstall.sh(else it wouldn't be downloaded).Windows parity
install-k8s.ps1:Install-TraceblocCliruns the CLI'sinstall.ps1in a childpowershellprocess (its$ErrorActionPreference='Stop'/exit can't abort the parent installer); Step 5/5; roadmap + summary updated.UX / docs
tracebloc dataset push ./data.docs/INSTALL.mdcallout note the CLI is installed.Tests / validation
scripts/tests/install-cli.batsasserts the non-fatal property (download-fail, install-fail, success paths all return 0).bash -nclean on all touched shell files;install-k8s.ps1parses clean; renumbering verified (no leftoverN 4).🤖 Generated with Claude Code
Note
Medium Risk
Installers now fetch and execute external release scripts from github.com/tracebloc/cli at install time; Step 5 is designed to be non-fatal, but network or supply-chain issues could still affect users who expect the CLI to be present immediately.
Overview
Adds Step 5/5 to the client installers so the tracebloc CLI is installed after the client is connected, enabling
tracebloc dataset push ./datawithout a separate setup step.On macOS/Linux, new
scripts/lib/install-cli.shdelegates to the CLI repo’s releasedinstall.sh(download to temp, then run — notcurl | sh). Bootstrapinstall.shincludes the lib in its download list;install-k8s.shsources it only if present so older bootstraps skip Step 5 instead of failing underset -e. Install flow renumbers steps from 4 to 5 in roadmap, helm sub-steps, and orchestrators.On Windows,
Install-TraceblocCliruns the CLI’sinstall.ps1in a child PowerShell process so the CLI installer’s stop-on-error behavior cannot abort the parent; success is judged solely by child exit code.Step 5 is non-fatal everywhere: failures warn and manual install hints are shown; the overall install still succeeds if the client is up. Success summaries and README /
docs/INSTALL.mdquick-install text now mention CLI install andtracebloc dataset push.Tests: new
install-cli.bats(non-fatal paths) and Pester coverage forInstall-TraceblocCli. New.github/workflows/standard-checks.ymlruns unconditional Lint and Unit tests jobs for branch protection.Reviewed by Cursor Bugbot for commit defefea. Bugbot is set up for automated code reviews on this repo. Configure here.