Skip to content

fix(installer): attribute rejected-zone hint to its real source (Bugbot #356) - #357

Merged
saadqbal merged 2 commits into
developfrom
fix/bugbot-356-location-hint-source
Jul 16, 2026
Merged

fix(installer): attribute rejected-zone hint to its real source (Bugbot #356)#357
saadqbal merged 2 commits into
developfrom
fix/bugbot-356-location-hint-source

Conversation

@saadqbal

@saadqbalsaadqbal commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

What

Fixes the one Cursor Bugbot finding on #356 ("Misleading invalid-zone failure hint", scripts/lib/provision.sh#L85-88).

When client create rejects a location as not a valid carbon zone, _report_create_failure always said the zone was auto-derived from the timezone and pointed the operator at TRACEBLOC_CLIENT_LOCATION as the remedy. But when the rejected value came fromTRACEBLOC_CLIENT_LOCATION, that hint reads as "your override was ignored" — misleading.

How

  • Track the location's origin in provision_client: "env" when pinned via TRACEBLOC_CLIENT_LOCATION, "auto" when timezone-derived.
  • Pass it as a third arg to _report_create_failure, which now words the fix hint to the actual source (defaults to "auto" if omitted — back-compatible).
  • Adds 3 unit tests to provision.bats (env source, auto source, default).

All 26 provision.bats tests pass locally. bash -n clean.

Merging into develop updates the develop→main release PR #356.

Rolls up under the location-drop task (#356) — Bugbot drive-by, no separate ticket.


Note

Low Risk
Installer-only messaging and test coverage; no change to provisioning logic, credentials, or API behavior.

Overview
When client create rejects a carbon zone, _report_create_failure no longer always blames timezone auto-derivation. provision_client records whether the location came from TRACEBLOC_CLIENT_LOCATION (env) or timezone detection (auto), passes that into _report_create_failure, and the invalid-zone hints point operators at the right fix (correct the env var vs set TRACEBLOC_CLIENT_LOCATION). The third argument defaults to auto for backward compatibility.

Three provision.bats cases cover env-sourced, auto-sourced, and omitted-source behavior. scripts/manifest.sha256 is updated for provision.sh.

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

#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>
@saadqbalsaadqbal self-assigned this Jul 16, 2026
@LukasWodka

Copy link
Copy Markdown
Contributor

👋 Heads-up — Code review queue is at 37 / 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.)

shujaatTracebloc
shujaatTracebloc previously approved these changes Jul 16, 2026
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>
@saadqbal
saadqbal merged commit 684b98c into developJul 16, 2026
31 checks passed
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>
@saadqbal
saadqbal deleted the fix/bugbot-356-location-hint-source branch July 16, 2026 08:53
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.

4 participants

@saadqbal@LukasWodka@saqlainsyed007@shujaatTracebloc