Skip to content

fix(context): bootstrap host entry from BKT_TOKEN when host not found#141

Closed
avivsinai wants to merge 2 commits intomasterfrom
fix/134-bkt-token-bootstrap
Closed

fix(context): bootstrap host entry from BKT_TOKEN when host not found#141
avivsinai wants to merge 2 commits intomasterfrom
fix/134-bkt-token-bootstrap

Conversation

@avivsinai
Copy link
Copy Markdown
Owner

Summary

  • When BKT_TOKEN is set and the host doesn't exist in config, context create now bootstraps a minimal host entry using the new --kind flag
  • Adds --kind (dc/cloud) and --base-url flags to context create
  • Unblocks headless/CI workflows that rely on BKT_TOKEN

Closes #134

Test plan

  • 6 table-driven tests covering bootstrap DC, Cloud, missing --kind, no BKT_TOKEN, --base-url override, existing host
  • go test ./... passes
  • go build ./cmd/bkt compiles

🤖 Generated with Claude Code

avivsinai and others added 2 commits April 9, 2026 08:39
When BKT_TOKEN is set and the host doesn't exist in config, context create
now bootstraps a minimal host entry using the new --kind flag instead of
requiring a prior `bkt auth login` (which refuses to run when BKT_TOKEN is
set). This unblocks headless/CI workflows that rely on BKT_TOKEN.

Closes #134

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sentry
Copy link
Copy Markdown

sentry Bot commented Apr 9, 2026

Codecov Report

❌ Patch coverage is 84.61538% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pkg/cmd/context/context.go 84.61% 2 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

@avivsinai
Copy link
Copy Markdown
Owner Author

Closing in favor of #138, which implements the full env-var-driven headless auth solution (option D). No point shipping a tactical stopgap when the strategic fix is ready.

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.

BKT_TOKEN requires regular authentication first

1 participant