Skip to content

feat(installer): non-interactive credentials + softer connect copy (#834)#266

Merged
saadqbal merged 2 commits into
developfrom
feat/rfc-0001-installer-phase0
Jun 19, 2026
Merged

feat(installer): non-interactive credentials + softer connect copy (#834)#266
saadqbal merged 2 commits into
developfrom
feat/rfc-0001-installer-phase0

Conversation

@LukasWodka

@LukasWodka LukasWodka commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Summary

RFC-0001 Phase 0 (epic backend#830) — the no-backend-dependency installer quick wins. Part of tracebloc/backend#834 (partial — ships env-var credentials + softer copy; the --token / TRACEBLOC_ENROLL_TOKEN enrollment token and full removal of the create-a-client step need backend work and land in a later phase).

  1. Non-interactive credentials — accept TRACEBLOC_CLIENT_ID / TRACEBLOC_CLIENT_PASSWORD so CI / automation / golden images can provision without typing the secret inline. They're verified exactly like the prompt (verify_credentials), and a bad credential fails the install (no re-prompt in non-interactive mode). The interactive prompt path is unchanged — it's just moved into the else branch.
  2. Softer "connect" copy — stop framing client-creation as a mandatory pre-step ("to connect this machine you need a client / create one") and reframe to "already have one? enter it (or set the env vars) — need one? create it." Browser sign-in replaces this entirely in Phase 1.

Why now

Phase 0 needs no backend work and removes the two sharpest onboarding pain points immediately: a secret typed into a curl | bash process, and the forced detour to /clients.

Test plan

  • bash -n clean.
  • ✅ Two new bats cases: env creds → non-interactive (no prompt), writes values.yaml, runs helm; rejected env creds → errors, no helm.
  • ✅ The interactive flow tests all still pass unchanged (re-prompt-on-invalid, inactive→error, unverified→proceeds, dev-mode values-file, defaults reuse, max-attempts, one-client guard).

⚠️ Pre-existing, not from this PR: bats #16 _extract_yaml_value: single-quoted with '' escape fails in my local run (macOS bash). The diff doesn't touch _extract_yaml_value (confirmed — 0 occurrences in the diff), so it's a pre-existing failure; flagging so it's not attributed here, and worth confirming against CI / a separate fix.

🤖 Generated with Claude Code

…834)

RFC-0001 Phase 0 (no backend dependency):

- Accept TRACEBLOC_CLIENT_ID / TRACEBLOC_CLIENT_PASSWORD so CI / automation /
  golden images can provision without typing the secret inline. Verified the
  same way as the prompt (verify_credentials); a bad credential fails the
  install (no re-prompt in non-interactive mode). The interactive prompt path
  is unchanged — just wrapped in the else branch.
- Soften the "to connect this machine you NEED a tracebloc client / create
  one" copy to "already have one? enter it (or set the env vars) / need one?
  create it" — so we stop framing client-creation as a mandatory pre-step
  (browser sign-in lands in Phase 1).

Tests: two new bats cases (env path -> non-interactive write + helm with no
prompt; rejected env creds -> error, no helm). The interactive flow tests
(re-prompt / inactive / unverified / defaults / max-attempts / one-client
guard) still pass unchanged.

NOTE: bats #16 (_extract_yaml_value single-quote '' un-escape) fails locally
on macOS bash — pre-existing and untouched by this PR (the diff doesn't go
near that function); flagging for confirmation against CI.

Part of backend#830. Closes #834.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@LukasWodka

Copy link
Copy Markdown
Contributor Author

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

Resolve conflict in scripts/tests/install-client-helm.bats. Both develop
(#262 / backend#743 — HOST_DATASET_DIR datasetPath + host uid/gid tests)
and this branch (#834 — TRACEBLOC_CLIENT_* non-interactive credential
tests) inserted new @test blocks at the same spot, so git interleaved
them. Kept all four tests as contiguous blocks.

scripts/lib/install-client-helm.sh auto-merged cleanly: #266 touches the
credential-gathering block, develop touches the values.yaml heredoc
(HOST_UID/GID + datasetPath) — non-overlapping. Verified the merged file
is the exact union of both parents.

install-client-helm.bats: 40/41 pass. The lone failure (#16
_extract_yaml_value single-quote escape) is byte-identical to develop and
fails only under macOS bash 3.2.57 — pre-existing and environmental, not
from this merge.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@saadqbal saadqbal merged commit 3def19d into develop Jun 19, 2026
22 checks passed
@saadqbal saadqbal deleted the feat/rfc-0001-installer-phase0 branch June 19, 2026 07:07
Sign up for free to 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.

2 participants