Repository navigation
Delete the workbench CLI; seed at hub boot (CL-7382) - #580
Merged
Merged
Conversation
TheGreatAxios
force-pushed
the
cl-7382-delete-cli
branch
from
September 2, 2026 19:54
e948cc1 to
280db2a
Compare
TheGreatAxios
force-pushed
the
cl-7382-delete-cli
branch
from
September 2, 2026 19:54
280db2a to
8881e64
Compare
TheGreatAxios
marked this pull request as ready for review
September 2, 2026 20:05
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.
Replaces the
workbenchCLI'ssetup/seed/resetverbs with boot-time seeding and two thin root scripts, then deletes the package.What each verb became
workbench setup→ the tenant/roles/admin-membership half was already handled byensureDefaultTenantat hub boot (predates this PR). The remaining piece — publishing thecorbits-toolsregistry onto the root tenant — moves intoapps/hub/src/system-seed.ts, which now publishes it on every boot (content-addressed; a re-publish of an unchanged tarball is a no-op).workbench seed→apps/hub/src/system-seed.ts'srunSystemSeed, scheduled once the hub's real HTTP server starts listening (Bun.serve, not the in-processfetchshortcutenv-credential-plant.tsuses —seedTenant's workflow push shells out a realgit pushover HTTP, so it needs a reachable origin). It signs in as the same administrator identity (HUB_ADMIN_EMAIL/HUB_ADMIN_PASSWORD, same defaults), resolves the root tenant, then runs the sameseedTenant→seedCatalog→ensureDefaultRoutinessequence the CLI ran, using the hub's ownconfig.seedModel(a real key) or a placeholder whenANTHROPIC_API_KEYis unset — identical to the CLI's own fallback. The deploy step polls with a 60s bounded deadline (mirroringscripts/e2e/local-rip.test.ts's own retry loop) since it needs a connected sidecar; a failure past the deadline is logged and left for the next boot — every step is ensure-then-create, so retrying is safe.WORKBENCH_SEED_CATALOG_TEST_WORKFLOWS, a CLI-only dev/CI opt-in with no other consumer in the repo, was dropped rather than carried into hub config.workbench reset→ root scriptbun run reset(scripts/reset.ts), same as before minus the CLI wrapper;bun run setupnow callsscripts/db-setup.tsdirectly.ensureDefaultRoutinesandfindPersonalTenantare newly exported from@workbench/hub-clientand@workbench/onboardingrespectively sosystem-seed.tscan reuse them instead of reimplementing.Net LOC
232 insertions(+), 2192 deletions(-) across this PR's 3 commits (stacked on #579).
Testing
bun run typecheck,check:licenses,generate-tsconfig-references.ts --check,check:browser-safe-subpathsall pass.bun test packages/hub-client packages/onboarding apps/hub/src— 445 pass, 0 fail.scripts/e2e/local-rip.test.tsagainst a local Postgres: fails on both this branch and its base (cl-7381-delete-echo) with a pre-existingcheck:tool-package-freshnessfalse positive (noorigin/mainref available in this worktree to diff against) — unrelated to this change.packages/cli/test/{config,helpers,reset,setup}.test.ts) were deleted outright; the CLI-specificseed.tswrapper tests were not ported 1:1 — the underlying primitives (seedTenant,seedCatalog,ensureDefaultRoutines) remain covered inpackages/hub-client/test/, andscripts/e2e/local-rip.test.tsexercises the real end-to-end seed path.Resolves CL-7382