Bootstrap self-managed workspace listings#17
Merged
rowantrollope merged 1 commit intocodex/fix-config-state-and-checkpointsfrom May 6, 2026
Merged
Conversation
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
0a86a6a
into
codex/fix-config-state-and-checkpoints
1 check passed
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.
Stacked on #12.
Problem
In self-managed mode, the control plane could start against a Redis instance that already contained real workspaces, but
/v1/workspacesstill came back empty until someone manually created a database record withPOST /v1/databases.That made existing workspace data look missing on first boot even though the Redis state was already there. It also made workspace-first routes look less reliable than they actually were.
Why this change
The startup path was only loading catalog database profiles. If the catalog was empty, the manager refreshed nothing, so catalog-backed workspace listing had no database to fan out through.
The fix needs to restore first-run visibility without changing the separate blank-store flow. If Redis is actually empty, startup should still stay empty and let
ListDatabases,Quickstart, or an explicit database create drive bootstrap.What changed
OpenDatabaseManagernow performs a startup-only bootstrap pass before the initial catalog refresh.Local Developmentrecord.ListDatabasesandQuickstartflows.POST /v1/databasesTesting
go test ./internal/controlplanego test ./cmd/afs -run 'TestCmdImportSelfHostedForceReplacePreservesVersioningHistory|TestCloudModeUsesHTTPControlPlaneBackend|TestOpenAFSControlPlaneSelfHostedSingleDatabaseStillWorksWithoutConfiguredDatabase|TestPrepareSyncBootstrapSelfHostedIgnoresStaleConfiguredDatabaseForWorkspaceFirstRoutes|TestDatabaseListAndUseSelfHosted|TestRunSetupWizardSelfHostedPicksExistingWorkspace|TestRunSetupWizardSelfHostedSupportsLiveMountMode'make test