Uh oh!
There was an error while loading. Please reload this page.
fix: Bugbot findings from promotion PR #383 (probe timeout + kubectl version + Windows leftover-data guard) - #406
Merged
Conversation
…version + Windows leftover-data guard) A) Probe hangs on wedged Docker (High): _probe_runtime_usable ran bare `docker info` (no timeout) on every install, so a wedged daemon hung a headless SSH install forever. Bound it with timeout/gtimeout when present (fallback to bare call); read-only and never fatal. B) Retry notices corrupt kubectl version (High): KUBE_VER captured retry's stdout notices, polluting the version and breaking the download URL. Isolate it the way the Helm resolver does — tail -1 + tr + a version-tag regex that fails closed on an unresolvable value. C) Windows missing leftover-data guard (Medium): New-K3dCluster silently adopted prior data. Port guard_leftover_data to PowerShell (detect flat + per-release layouts, prompt reuse/wipe/new/abort, honor TB_LEFTOVER_ACTION / HOST_DATA_DIR / TRACEBLOC_SKIP_LEFTOVER_GUARD, non-interactive fail-safe abort). Windows is hostpath-only (node-local has no Windows path). Refactored HOST_DATA_DIR validation into a shared Confirm-DataDir. Regenerate scripts/manifest.sha256 (probe.sh, setup-linux.sh, install-k8s.ps1). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…d-probe-kubever # Conflicts: # scripts/manifest.sha256 # scripts/tests/install-k8s.Tests.ps1
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 6c282d7. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
…llow-ups) 1) Pester (ubuntu-latest) failed: the new leftover-data-guard tests hardcoded Windows '\' separators, which are literal chars (not separators) under Linux pwsh, so Get-LeftoverDataDirs (Join-Path -> '/') never matched the expected paths. Build all test paths with Join-Path / [IO.Path]::Combine so they pass on both Windows and Linux pwsh. Behavior/coverage unchanged. 2) Wipe could follow nested junctions (Bugbot r3655703571): Remove-LeftoverData guarded only the TOP-LEVEL reparse point, then `Remove-Item -Recurse`, which on Windows PowerShell 5.1 descends into nested junctions and can delete targets OUTSIDE HOST_DATA_DIR. Add Remove-TreeNoFollow (rm -rf semantics): walk depth-first and unlink any reparse point without descending, so a nested junction is removed but its target is never touched. Add a Pester test for it. Regenerate scripts/manifest.sha256 for the install-k8s.ps1 change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ugbot #383 A) Curl TLS section described CURL_SECURE as a hand-spliced constant with a stale "already missing" list. The real rule is the curl_secure() wrapper in common.sh, enforced by check-style.sh rule 3 ("no bare curl"). Rewrote the bullet to flag bare curl bypassing curl_secure(), with the real exemptions. B) Prod overlay section told reviewers CI ignores client/values-prod.yaml and to flag overlay digest edits. That overlay was deleted; the fleet-wide prod pin moved to the chart default images.ingestor.prodDigest, which ingestor-multiarch (helm-ci.yaml) reads and hard-fails on (empty or single-arch). Rewrote to the real contract. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
saadqbal
approved these changes
Jul 27, 2026
Uh oh!
There was an error while loading. Please reload this page.
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.

Resolves three Cursor Bugbot findings on the client promotion PR (#383, develop → main).
Fixes:
_probe_runtime_usable(scripts/lib/probe.sh) ran a baredocker infowith no timeout, andrun_host_probescalls it on every install, so a wedged Docker daemon hung a headless SSH install indefinitely. Now bounded withtimeout/gtimeout(a 5s cap,TB_PROBE_TIMEOUT-overridable) when either is present, falling back to the bare call otherwise. Read-only and never fatal — a timeout just reads as "not usable". (Release develop → main #383 (comment))install_kubectl(scripts/lib/setup-linux.sh) capturedretry's stdout notices intoKUBE_VER, polluting the version and breaking the download URL. Isolated the value the same way the Helm resolver does:tail -1+tr -d '[:space:]'+ a version-tag regex that fails closed on an unresolvable value. (Release develop → main #383 (comment))New-K3dCluster(scripts/install-k8s.ps1) never checked for leftover data, so Windows reinstalls silently adopted prior MySQL/dataset data (bash hasguard_leftover_data; the README documents the guarantee). Ported the guard to PowerShell: detects leftover data (flat + per-release layouts), and on a fresh cluster prompts reuse / wipe / different-dir, honoring$env:TB_LEFTOVER_ACTION(reuse|wipe),$env:HOST_DATA_DIR(different dir), and$env:TRACEBLOC_SKIP_LEFTOVER_GUARD, with a non-interactive fail-safe abort — matching the bash contract and the README. Windows is hostpath-only (New-K3dClusteralways bind-mountsHOST_DATA_DIR), so it's scoped to hostpath; node-local (RFC-0003 Option C) is a Linux/k3s prototype with no Windows path. Refactored theHOST_DATA_DIRvalidation out ofConfirm-Configinto a sharedConfirm-DataDirrather than duplicating it. (Release develop → main #383 (comment))Coverage: bats tests for the bounded docker probe (timeout applied / fallback / non-zero → not usable) and the kubectl version isolation (clean capture / fails closed on a notice-only result); Pester tests for
Get-LeftoverDataDirsdetection andInvoke-LeftoverDataGuard(skip / reuse / wipe / non-interactive abort / interactive w / default abort).scripts/manifest.sha256refreshed for the probe.sh + setup-linux.sh + install-k8s.ps1 changes. No golden impact (probe/kubectl/leftover paths aren't captured in the copy-catalog goldens).Lands on develop; the promotion PR head picks these up on the next develop sync and Bugbot re-reviews.
🤖 Generated with Claude Code
Note
Medium Risk
Changes affect every install’s runtime probe and fresh Windows cluster creation (data wipe paths); mistakes could hang installs, fetch wrong kubectl, or mishandle user data—mitigated by fail-closed behavior and extensive tests.
Overview
Addresses three Bugbot findings from promotion PR #383: installer reliability on wedged Docker, corrupted kubectl version strings, and missing Windows parity for leftover-data protection.
Linux (
probe.sh,setup-linux.sh) —_probe_runtime_usablenow capsdocker infowithtimeout/gtimeout(default 5s,TB_PROBE_TIMEOUT) so every install’s host probe cannot hang on a wedged daemon; failures stay non-fatal (“not usable”).install_kubectlisolates the version fromdl.k8s.io/release/stable.txtwithtail -1, whitespace strip, and a tag regex soretrystdout notices no longer polluteKUBE_VERand break the download URL.Windows (
install-k8s.ps1) — Ports bashguard_leftover_databefore new k3d cluster creation: detects real MySQL/dataset data (flat and per-release layouts), prompts reuse / wipe / new dir / abort, honorsTB_LEFTOVER_ACTION,HOST_DATA_DIR, andTRACEBLOC_SKIP_LEFTOVER_GUARD, and fails closed when non-interactive with no choice. SharedConfirm-DataDirreplaces duplicatedHOST_DATA_DIRvalidation; wipe usesRemove-TreeNoFollowso nested junctions are unlinked without deleting targets outside the tree. Help documents reinstall behavior.Docs & supply chain —
.cursor/BUGBOT.mdupdates reviewer guidance (curl_secure(), ingestorprodDigestin chart defaults).scripts/manifest.sha256refreshed for touched bootstrap scripts.Tests — New/extended bats (
probe.bats,setup-linux.bats) and Pester coverage for detection, guard actions, and junction-safe wipe.Reviewed by Cursor Bugbot for commit 83dc2f4. Bugbot is set up for automated code reviews on this repo. Configure here.