Repository navigation
docs(rtk): record RTK_TELEMETRY_DISABLED as the supported opt-out (#117) - #125
Merged
Merged
Conversation
rtk-ai/rtk#1307 is fixed: PR rtk-ai/rtk#2477 (in v0.44.0+, and #121 has now pinned the images to 0.48.0) makes RTK_TELEMETRY_DISABLED=1 short-circuit the telemetry consent prompt before the TTY heuristic. The env var is therefore no longer a workaround but the documented opt-out, so the three "remove when upstream fixes it" comments were actively misleading. Upstream deliberately did not add non-TTY auto-detection — the original TTY check is what failed, because a devcontainer postCreateCommand is handed a pseudo-TTY and the prompt believes it is interactive. Record that, so nobody drops the env var on the assumption that rtk now detects CI by itself. Keep the `timeout` guard as a deliberate backstop rather than deleting it as redundant: rtk-ai/rtk#3693 (open, priority:high) is a live bug against this same `rtk init -g` invocation, and the root .devcontainer/Dockerfile resolves rtk from releases/latest at build time, so a future regression would land unpinned. Comment-only; no behaviour change. Refs #117
Review follow-ups on this branch. The previous commit silently flipped .devcontainer/init-plugins.sh and ralphex-fe/init-docker.sh from 100755 to 100644. Neither is executed via its exec bit (the first two are templates invoked as `bash <path>`, the third is chmod +x'd at ralphex-fe/Dockerfile:154), so nothing broke — but the change was undeclared, and the "every changed line begins with #" check that vouched for this branch cannot see mode bits. Restored both. ralphex-fe/init-docker.sh claimed the rtk init covers "standalone usage (no host mount)", but the block sits inside `if [ -d /mnt/claude ]` — precisely the condition that is false without the mount, so rtk is silently inert there. Say what the code actually does instead. The behavioural gap is left alone: fixing it needs the mkdir/chown above moved out of the guard too, which is more than a docs branch should carry.
This was referenced Sep 9, 2026
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 #117.
Why now
The trigger recorded in #117 — "stable v0.44.0 or later in
/releases/latest" — is met: rtk/releases/latestreturns v0.48.0 (2026-09-04), and #121 has pinned both images toRTK_VERSION=0.48.0.Upstream rtk-ai/rtk#1307 is closed, fixed by rtk-ai/rtk#2477 (merged 2026-07-20, released in v0.44.0). Verified the fix commit
66e09cbeis an ancestor of bothv0.44.0andv0.48.0(behind_by=0), rather than trusting the milestone.What changed
Across the three
rtk initsites:.devcontainer/init-plugins.shclaude-code/.devcontainer/init-plugins.shralphex-fe/init-docker.shAgainst the #117 checklist:
/releases/latest>=v0.44.0— v0.48.0, and images now pinned to itRTK_TELEMETRY_DISABLED=1— it is now the canonical suppression mechanism# Remove when upstream fixes itcommentsDrop the— deliberately kept, see belowtimeout 10guardTwo judgement calls
The env var must not be dropped later. Upstream fixed this by making
RTK_TELEMETRY_DISABLED=1short-circuit the consent prompt before the TTY heuristic — it did not add non-TTY auto-detection. The original TTY check is precisely what failed, because a devcontainerpostCreateCommandis handed a pseudo-TTY and the prompt believes it is interactive. The new comments say this explicitly so nobody removes the env var assuming rtk detects CI on its own.timeoutstays, though #117 listed it as droppable:priority:high,area:security) against this samertk init -ginvocation — it deletes~/.claude/hooks/rtk-rewrite.shand can silently leave rtk fully unregistered, exiting 0 with a success banner..devcontainer/Dockerfileresolves rtk fromreleases/latestat build time, so a future regression lands there unpinned.ralphex-fe/init-docker.shthe var is passed throughgosu; it does propagate, but withtimeoutgone that propagation becomes the only thing preventing an indefinite hang.Cost is one word; the failure it prevents is a container that never finishes creating.
On the
10specifically — reviewed and kept as-is.timeout Nis a ceiling, not a sleep: it returns the instant the command does, so the value costs nothing on the happy path. Measuredrtk init -g --hook-only --auto-patch(rtk 0.48.0) at 18 ms against a warm$HOMEand 8 ms against a fresh one, with no network call. Lowering it to 1–3 s would save zero time and would only risk false-killing a working init under QEMU emulation or a loaded runner — silently, since all three call sites end in|| true.Review follow-ups (second commit)
Two things the first commit got wrong:
Exec bits. It flipped
.devcontainer/init-plugins.shandralphex-fe/init-docker.shfrom100755to100644. Nothing broke — the twoinit-plugins.share templates invoked asbash <path>, andinit-docker.shischmod +x'd atralphex-fe/Dockerfile:154— but the change was undeclared, and the verification below could not have caught it. Restored.A stale claim left standing.
ralphex-fe/init-docker.shsaid the rtk init covers "standalone usage (no host mount)", but the block sits insideif [ -d /mnt/claude ]— exactly the condition that is false without the mount, so rtk is silently inert there. The comment now describes what the code does. The behavioural gap is deliberately not fixed here: moving the init outside the guard also needs themkdir -p/chownabove it moved, which is more than a docs branch should carry.Verification
bash -nandshellcheckclean on all three scriptsgit diff --summaryused to confirm the tree has no remaining mode changes (the first commit's "every changed line begins with#" check was blind to mode bits — that is how the exec-bit flip got through)Not in scope — filed separately
.shfile modes repo-wide (this PR restores rather than normalizes).ralphex-festandalone (no/mnt/claude) never initialises rtk. Pre-existing; the fix has to hoist themkdir -p/chownout of the guard too.timeoutstays.< /dev/nullto the three invocations, which prevents the consent-prompt hang outright rather than killing it after 10 s.