feat(installer): stop prompting for location during register — auto-derive from timezone (#354)#355
Merged
Conversation
…erive from timezone (#354) The "Register this machine" step prompted for both a name and a location zone. The location prompt was an explicit INTERIM measure, kept only because the deployed CLI hard-required --name/--location without a TTY. cli#137 has since shipped (CLI v0.9.2 / main; the installer pulls the CLI from releases/latest): `client create` auto-names <firstname>-NN and treats --location as fully optional — never prompted, never required, sends nothing when absent so the backend records the client with no location. The blocker is gone. Now: prompt for the name only. Derive the carbon zone from the system timezone silently (no network); when detection yields nothing, provision with no --location rather than asking. A pinned TRACEBLOC_CLIENT_LOCATION still overrides for unattended installs. - provision.sh: drop the interactive location block (detected-zone accept + required-entry loop); refresh the interim comments and the _report_create_failure hint that referenced the removed prompt. - provision.bats: add coverage for the two new paths (auto-derive from timezone; no-detection → no --location, never prompts). - manifest.sha256: regenerated for the provision.sh change (R8 gate). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
👋 Heads-up — Code review queue is at 48 / 30 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.) |
aptracebloc
approved these changes
Jul 15, 2026
aptracebloc
left a comment
Contributor
There was a problem hiding this comment.
@saadqbal — Approved. Correctly-sequenced removal of the interim location prompt (the "KEEP THIS PROMPT until cli#137 ships" block from #341) — and importantly you waited for cli#137 to actually release, not just merge. I verified the load-bearing bits:
- ✅ cli#137 is shipped, not just closed. At the v0.9.2 tag (released today, the latest the installer pulls),
client create's--locationis a plain optionalStringVarwith noMarkFlagRequired— "optional … never prompted, never required … omitted if unset," request fieldomitempty(backend records no location, not a silent default), plus auto-naming. So a no-detectioncurl | bashinstall sendingclient create --name Xwith no--locationnow succeeds — the exact breakage the interim comment guarded against is gone. - ✅ Manifest hash matches — recomputed
provision.sh=bf283e1…==manifest.sha256. R8 intact. - ✅
--locationconditionally passed —[[ -n "$client_location" ]] && _create_args+=(--location "$client_location"); never--location "", clean array construction. - ✅ Clean removal — parses, no orphaned refs to the deleted locals/prompt strings,
_detect_location_zonestill defined + used by the silent fallback, and_report_create_failure's hint was updated in lockstep to point atTRACEBLOC_CLIENT_LOCATION. - ✅ Tests pin both paths — detection →
--location FRsilently, no prompt; no-detection → no--location, no prompt, non-fatal. Both feed only a name on stdin, so a lingering prompt would hang the test — good structural guard. (bats isn't installed locally; I parse-checked + logic-reviewed, CI runs the suite.)
⚪ Minor (non-blocking)
- No explicit CLI-version gate for optional-location: safety rests on "latest release carries cli#137" (v0.9.2 does). A run that pins an older
TRACEBLOC_CLI_VERSIONand has no detectable zone and noTRACEBLOC_CLIENT_LOCATIONwould send a--location-lessclient createto a pre-#137 CLI and fail. Edge case — the env override covers it and_report_create_failuresurfaces the real error rather than failing blind — but a one-line note wouldn't hurt.
Touches your code-owned provision.sh + manifest (R8); you're the author, so this is the approving second set of eyes. Clear to merge.
🤖 Generated with Claude Code
saadqbal
added a commit
that referenced
this pull request
Jul 16, 2026
…from timezone (#356) * Merge pull request #355 from tracebloc/feat/provision-drop-location-prompt feat(installer): stop prompting for location during register — auto-derive from timezone (#354) * fix(installer): attribute rejected-zone hint to its real source (Bugbot #356) (#357) * fix(installer): attribute rejected-zone hint to its real source (Bugbot #356) The invalid-location failure branch always told the operator the zone was auto-derived from the timezone and pointed them at TRACEBLOC_CLIENT_LOCATION as the fix. When the rejected value actually came FROM that env override, the hint read as "your override was ignored" — the opposite of what happened. Track whether the location was pinned via TRACEBLOC_CLIENT_LOCATION ("env") or timezone-derived ("auto") and pass the source into _report_create_failure so the fix hint names the real origin. Defaults to "auto" when the caller omits it. Adds three unit tests covering both sources plus the default. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * chore(installer): refresh manifest checksum for provision.sh (R8) The rejected-zone-hint edit changed scripts/lib/provision.sh; regenerate scripts/manifest.sha256 so the supply-chain "manifest is current" check passes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jul 16, 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 #354.
What
The installer's Register this machine step prompted for both a client name and a location zone. This drops the location prompt: we now prompt for the name only and derive the carbon zone silently from the system timezone. When detection yields nothing, we provision with no location rather than asking.
Why it's safe now
The location prompt was an explicit
INTERIMmeasure (provision.sh), kept only because the deployed CLI hard-required--name/--locationwithout a TTY. cli#137 has since shipped — in CLIv0.9.2andmain— sotracebloc client createnow auto-names<firstname>-NNand treats--locationas fully optional (never prompted, never required; sends nothing when absent, backend records no location). The installer pulls the CLI fromreleases/latest, so it already has this behavior. No CLI-repo change is needed.Behavior
--location, no promptTRACEBLOC_CLIENT_LOCATIONsetChanges
scripts/lib/provision.sh: remove the interactive location block (detected-zone accept + required-entry loop); refresh the now-stale interim comments and the_report_create_failurehint that referenced the removed prompt.scripts/tests/provision.bats: +2 tests (auto-derive from timezone →--location; no detection → no--location, never prompts). Full suite green (23/23).scripts/manifest.sha256: regenerated (R8 Static-analysis gate).shellcheck clean.
🤖 Generated with Claude Code
Note
Low Risk
Installer UX and provisioning-args logic only; name prompting and env overrides are unchanged, with new bats tests locking behavior.
Overview
Interactive Register this machine now asks only for the client name; carbon zone is never prompted.
When
TRACEBLOC_CLIENT_LOCATIONis unset,provision.shsilently derives a zone from the system timezone and passes--locationonly when one is found. If detection fails, it callsclient createwithout--locationinstead of blocking on a required-entry loop. Invalid-zone errors now tell users to setTRACEBLOC_CLIENT_LOCATIONrather than referring to the removed prompt.provision.batsadds coverage for silent auto-derive and no-location provisioning;manifest.sha256is updated for the changed script.Reviewed by Cursor Bugbot for commit 9ed7c27. Bugbot is set up for automated code reviews on this repo. Configure here.