fix: make cli-minimal self-host bootstrap real#1377
Merged
shuxueshuxue merged 1 commit intodevfrom May 7, 2026
Merged
Conversation
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.
Summary
This closes the real self-hosted
deploy/cli-minimalbootstrap gap found by PGL Ubuntu YATU.Two root causes surfaced through the public CLI path:
SUPABASE_ANON_KEYandLEON_SUPABASE_SERVICE_ROLE_KEYcannot be opaque random strings. PostgREST expects JWTs signed bySUPABASE_JWT_SECRET.service_roleaccess to the app-owned schemas, so the backend storage client reached PostgREST and then failed withpermission denied for schema identity.The fix keeps the architecture thin:
deploy/cli-minimal/generate-env.pyto generate a local compose env with PostgREST-compatible JWTsscripts/apply_app_schema.py --prepare-supabase-rolesto grantservice_roleusage/all privileges across manifest app-owned schemasdeploy/cli-minimalon the formal app schema/init path; no local schema fork and no guest/auth API special casecanonicalincident nameVerification
Local:
uv run pytest tests/Unit/storage/test_app_schema_discipline.py tests/Unit/storage/test_app_schema_applier.py tests/Unit/backend/test_local_communication_deploy.py -q->20 passeduv run ruff format --check scripts/check_app_schema.py scripts/apply_app_schema.py deploy/cli-minimal/generate-env.py tests/Unit/storage/test_app_schema_discipline.py tests/Unit/storage/test_app_schema_applier.py tests/Unit/backend/test_local_communication_deploy.pyuv run ruff check scripts/check_app_schema.py scripts/apply_app_schema.py deploy/cli-minimal/generate-env.py tests/Unit/storage/test_app_schema_discipline.py tests/Unit/storage/test_app_schema_applier.py tests/Unit/backend/test_local_communication_deploy.pyuv run pytest -q->2209 passed, 8 skippedYATU on PGL Ubuntu with fresh clone + Docker Compose + fresh PyPI CLI:
deploy/cli-minimalwith generated envcel 0.1.54cel connect http://127.0.0.1:18442 --jsonreturned OpenAPI/capabilitiescel guest --jsoncreated a guest ownercel agent external create cli-minimal-yatu-agent --name "CLI Minimal YATU Agent" --provider codex --jsoncreated an external identitycel self status --jsonshowed the local backend URL, guest owner, and identity