Kill hub boot env-credential plant - #706
Merged
Merged
Conversation
Two DB-gated boot tests (process boot via startHub and in-process createHub) boot against a scratch database with a resolved operator bench and OLLAMA_BASE_URL pointed at a local fake Ollama whose probe succeeds. Both fail today: the env-key auto-plant inserts a credential row at boot. They are the acceptance proof for deleting that plant.
Hub boot no longer reads provider credentials from the environment. Operators connect a provider through the onboarding connect flow (or the same connect API from a granted setup step); setting ANTHROPIC_API_KEY or any other curated provider's env var now does nothing at boot. Deletes apps/hub/src/env-credential-plant.ts, its scheduleEnvProviderCredentialPlant call site, and the now-dead HubConfig fields (envProviderKeys, envProviderBaseUrls, envCredentialPlantAdmin) with their env parsing; HUB_ADMIN_EMAIL/HUB_ADMIN_PASSWORD are no longer hub configuration, and scripts/dev.ts keeps reading them directly for its own sign-up. @workbench/onboarding's connect flow is untouched.
The .env.example, README, IMPLEMENTATION, and the local-dev, local-rip, tenancy, and seed-reconciliation docs no longer describe an env-key auto-plant: hub boot plants no credentials, so setting ANTHROPIC_API_KEY or any other provider's env var has no effect and operators connect a provider in the UI instead. OLLAMA_BASE_URL stays documented for bun run dev's memory setup, which still reads it directly.
The seed log no longer points operators at a boot-time plant, the kept onboarding module no longer describes itself as a boot counterpart, and seed-reconciliation states which flow actually plants today.
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.
Linear: CL-7579
Summary
Hub boot no longer plants provider credentials from environment variables.
apps/hub/src/env-credential-plant.tsis deleted, along with thescheduleEnvProviderCredentialPlantcaller and theenvProviderKeys/envProviderBaseUrls/envCredentialPlantAdminconfig fields. Booting withANTHROPIC_API_KEY(or any curated provider key) set inserts zero credential or catalog rows. Operators connect a provider in the UI or through a granted setup step.Not gated, not moved into system-seed.
@workbench/onboarding'splantEnvProviderCredentialsis kept as a library for a future granted setup step; nothing in production calls it today.ORG_SLUGstill aliasesWORKBENCH_DEFAULT_TENANT;scripts/dev.ts's local sign-up is untouched.Test plan
OLLAMA_BASE_URLpointed at a local fake provider and pollcredential/offeringfor 15s — red before the fix ("boot planted state: 1 credential row(s)"), green afterbun test apps/hub/test/boot-does-not-seed.test.ts— 5 passbun test packages/seeding— 81 passbun run typecheck— exit 0bun run check— exit 0