Skip to content

fix(#562): soften API-wait and readiness timeouts for slow/proxied laptops - #625

Merged
divyasinghds merged 2 commits into
developfrom
fix/562-soften-slow-laptop-timeouts
Aug 7, 2026
Merged

fix(#562): soften API-wait and readiness timeouts for slow/proxied laptops#625
divyasinghds merged 2 commits into
developfrom
fix/562-soften-slow-laptop-timeouts

Conversation

@divyasinghds

@divyasinghdsdivyasinghds commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Closes#562.

Fix

_wait_for_api 60s → env-tunable 180s (TB_API_WAIT_S); READY_TIMEOUT 300s → 600s, kept in sync across all three consumers, to stop false-failing slow/proxied laptops.

Files

  • scripts/lib/cluster.sh, scripts/lib/summary.sh, scripts/spec/facts.env, scripts/install-k8s.ps1

Validation

bash -n, check-facts.sh passes (drift check).

Changes runtime wait behavior — worth an end-to-end run on a slow/proxied machine.

🤖 Generated with Claude Code


Note

Low Risk
Only installer wait budgets and error copy change; no cluster security or app logic, though installs may sit longer before timing out on genuinely broken setups.

Overview
Addresses #562 by giving slow or proxied laptops more time before the installer reports failure while the cluster is still coming up.

API readiness (_wait_for_api in cluster.sh): Replaces the fixed 60s loop (30 × 2s) with a 180s default budget and an env override TB_API_WAIT_S. The wait uses a wall-clock deadline instead of a fixed iteration count, and the failure message tells users they can extend the wait and that re-running is safe.

Workload readiness: Raises READY_TIMEOUT from 300s → 600s in facts.env, bash (summary.sh), and PowerShell (install-k8s.ps1), with check-facts / bats fixtures updated so those three stay aligned. manifest.sha256 is refreshed for the touched scripts.

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

@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 1 potential issue.

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 7a2af28. Configure here.

Comment threadscripts/spec/facts.env
divyasinghds added a commit that referenced this pull request Aug 6, 2026
#625 Bugbot CID 3727520250)
The spec (facts.env) raised READY_TIMEOUT 300 -> 600, but the bats fixtures still
seeded the summary.sh / install-k8s.ps1 consumers at 300. That made the green-path
--check test false-fail (a real drift the gate must NOT report) and left the drift
test rewriting 300 -> 600, which no longer exercised drift once the spec was 600.
Seed both consumers at 600 to match the spec, push the ps1 to a wrong value (900)
in the drift test so the gate genuinely reports ReadyTimeout drift, and bump the
--write test spec to 900 so it actually re-stamps both bash and PowerShell budgets.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@divyasinghds
divyasinghdsforce-pushed the fix/562-soften-slow-laptop-timeouts branch from 7a2af28 to d210a81CompareAugust 6, 2026 11:05
saadqbal
saadqbal previously approved these changes Aug 6, 2026
divyasinghds added a commit that referenced this pull request Aug 6, 2026
#625 Bugbot CID 3727520250)
The spec (facts.env) raised READY_TIMEOUT 300 -> 600, but the bats fixtures still
seeded the summary.sh / install-k8s.ps1 consumers at 300. That made the green-path
--check test false-fail (a real drift the gate must NOT report) and left the drift
test rewriting 300 -> 600, which no longer exercised drift once the spec was 600.
Seed both consumers at 600 to match the spec, push the ps1 to a wrong value (900)
in the drift test so the gate genuinely reports ReadyTimeout drift, and bump the
--write test spec to 900 so it actually re-stamps both bash and PowerShell budgets.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@divyasinghds
divyasinghdsforce-pushed the fix/562-soften-slow-laptop-timeouts branch from d210a81 to 9799bacCompareAugust 6, 2026 12:29
divyasinghds added a commit that referenced this pull request Aug 6, 2026
#625 Bugbot CID 3727520250)
The spec (facts.env) raised READY_TIMEOUT 300 -> 600, but the bats fixtures still
seeded the summary.sh / install-k8s.ps1 consumers at 300. That made the green-path
--check test false-fail (a real drift the gate must NOT report) and left the drift
test rewriting 300 -> 600, which no longer exercised drift once the spec was 600.
Seed both consumers at 600 to match the spec, push the ps1 to a wrong value (900)
in the drift test so the gate genuinely reports ReadyTimeout drift, and bump the
--write test spec to 900 so it actually re-stamps both bash and PowerShell budgets.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@divyasinghds
divyasinghdsforce-pushed the fix/562-soften-slow-laptop-timeouts branch from 9799bac to 46a0ad2CompareAugust 6, 2026 13:46
shujaatTracebloc
shujaatTracebloc previously approved these changes Aug 6, 2026

@shujaatTraceblocshujaatTracebloc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed the code and all checks: LGTM.

  • READY_TIMEOUT 300→600 kept in lockstep across the three enforced sites (install-k8s.ps1 $ReadyTimeout, summary.sh, spec/facts.env), so the #435 drift guard stays honest.
  • _wait_for_api converted from a fixed 30×2s cap to a wall-clock deadline with the new TB_API_WAIT_S (default 180s), sanitised via the ''|*[!0-9]* guard; --request-timeout still bounds each call so a black-holed localhost can't hang the loop.
  • check-facts.bats drift tests updated (not removed) to re-seed at the new 600 default and push a fresh wrong value, so they still fail on real drift.

Green across the board; no unresolved Bugbot/review threads. Satisfies #562.

divyasinghdsand others added 2 commits August 7, 2026 11:45
…ptops
F8 (_wait_for_api): the hard 60s cap (max=30 x sleep 2) false-failed a slow
machine still loading images on its first kubectl even after `k3d --wait`
returned. Replace with a seconds-based, env-tunable budget (TB_API_WAIT_S,
default raised to 180s), and update the error to note a re-run is safe and how
to extend the wait.
F9 (READY_TIMEOUT): raise the default 300s -> 600s so several GB of images
over a slow/proxied link doesn't leave a healthy-but-slow machine reported as
CLIENT_STATE=starting / "not connected". Updated in all three synced
consumers (scripts/spec/facts.env, summary.sh, install-k8s.ps1); check-facts.sh
passes. Still overridable via the READY_TIMEOUT env var.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
#625 Bugbot CID 3727520250)
The spec (facts.env) raised READY_TIMEOUT 300 -> 600, but the bats fixtures still
seeded the summary.sh / install-k8s.ps1 consumers at 300. That made the green-path
--check test false-fail (a real drift the gate must NOT report) and left the drift
test rewriting 300 -> 600, which no longer exercised drift once the spec was 600.
Seed both consumers at 600 to match the spec, push the ps1 to a wrong value (900)
in the drift test so the gate genuinely reports ReadyTimeout drift, and bump the
--write test spec to 900 so it actually re-stamps both bash and PowerShell budgets.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@divyasinghds
divyasinghds merged commit 742e17c into developAug 7, 2026
46 checks passed
@LukasWodka
LukasWodka deleted the fix/562-soften-slow-laptop-timeouts branch August 14, 2026 14:18
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.

_wait_for_api 60s and READY_TIMEOUT 300s can false-fail a slow/proxied laptop

4 participants

@divyasinghds@saadqbal@shujaatTracebloc@LukasWodka