From 3b71714bce1536a5bf3eacf768b93878a7666e32 Mon Sep 17 00:00:00 2001 From: Roy Osherove <575051+royosherove@users.noreply.github.com> Date: Wed, 6 May 2026 06:38:03 +0000 Subject: [PATCH 1/2] fix(roundhouse): move done marker ahead of telemetron; log sidecar bootstrap P2a: _telemetron_sidecar runs synchronously and can block for up to ~60s (install) + 30s (detect) + AWS probe timeouts before the pack's done marker is written. That delays completion signaling for callers that wait on the marker, contradicting the section's 'never blocks main install' contract. Call write_done_marker *before* running the sidecar, wrapped in '|| true' so optional sidecar work can't gate pack success. P2b: the telemetron first-install 'curl ... | bash' ran without stdout/stderr redirection, so on fresh hosts its output leaked to the user terminal. Redirect to $log so the silent-only contract holds for first installs too. Addresses Codex P2 x2 on PR #47 (post-merge follow-up). --- packs/roundhouse/install.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packs/roundhouse/install.sh b/packs/roundhouse/install.sh index bb63187..ce331d0 100755 --- a/packs/roundhouse/install.sh +++ b/packs/roundhouse/install.sh @@ -275,11 +275,16 @@ _telemetron_sidecar() { printf '[telemetron] detect completed successfully\n' >>"$log" } +# ── Done ────────────────────────────────────────────────────────────────────── +# Mark install complete BEFORE running the telemetron sidecar so callers that +# wait on the done marker aren't blocked by sidecar work (which has bounded +# but real timeouts: 60s install + 30s detect + AWS probe waits). The sidecar +# is optional — its success or failure must not gate pack completion. +write_done_marker "roundhouse" + ( set +e _telemetron_sidecar ) || true -# ── Done ────────────────────────────────────────────────────────────────────── -write_done_marker "roundhouse" printf "\n[PACK:roundhouse] INSTALLED — Telegram bot connected (systemd: roundhouse)\n" From 1c68e56247757356eb8fc73f37d2a0de5bc73f67 Mon Sep 17 00:00:00 2001 From: Roy Osherove <575051+royosherove@users.noreply.github.com> Date: Wed, 6 May 2026 06:38:41 +0000 Subject: [PATCH 2/2] fix(roundhouse): redirect telemetron curl|bash bootstrap to $log Follow-up to 3b71714 \u2014 the previous commit covered P2a (done marker) but the P2b edit for redirecting the first-install bootstrap output didn't land. Append '>>$log 2>&1' to the 'timeout 60 bash -c ...' wrapper so the section's silent-only contract also holds on fresh hosts where telemetron is missing. Addresses the second half of Codex review on PR #47. --- packs/roundhouse/install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packs/roundhouse/install.sh b/packs/roundhouse/install.sh index ce331d0..31edcea 100755 --- a/packs/roundhouse/install.sh +++ b/packs/roundhouse/install.sh @@ -235,6 +235,8 @@ _telemetron_sidecar() { # Install telemetron binary if not already present. # No env vars = install.sh only downloads the binary, skips setup. # We use `telemetron detect` for configuration instead. + # Redirect to $log so first-install curl|bash output doesn't leak to the + # user terminal (this section's contract is silent, log-only). if ! command -v telemetron >/dev/null 2>&1 \ && [[ ! -x /var/lib/telemetron/bin/telemetron ]]; then local connect_to=5 @@ -242,7 +244,7 @@ _telemetron_sidecar() { timeout 60 bash -c " set -euo pipefail curl --connect-timeout $connect_to --max-time $max_to -fsSL '$install_url' | bash - " || { + " >>"$log" 2>&1 || { printf '[telemetron] install failed (exit %d) — continuing\n' "$?" >>"$log" return 0 }