chore: add manual supabase profile migration workflow

This commit is contained in:
732642856
2026-07-19 10:01:34 +08:00
parent b5a416bc21
commit ab04cd70c5
4 changed files with 109 additions and 2 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ def test_onboarding_and_agent_suggestion_contract() -> None:
assert "saveOnboardingName" in page
assert "saveOnboardingBirth" in page
assert "saveOnboardingPlace" in page
assert "<BirthMomentFields value={profileDraft}" in page
assert "<BirthTimeIntakeFields value={value}" in page
assert "<BirthLocationFields value={profileDraft}" in page
assert "Enter 确认称呼" in page
assert 'fetch("/api/onboarding"' in page
@@ -0,0 +1,27 @@
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
WORKFLOW = ROOT / ".github" / "workflows" / "apply-supabase-profile-migrations.yml"
def test_profile_migration_workflow_is_manual_and_uses_vps_env_without_printing_secrets() -> None:
text = WORKFLOW.read_text(encoding="utf-8")
assert "workflow_dispatch:" in text
assert "PRODUCTION_SSH_PRIVATE_KEY" in text
assert "SUPABASE_DB_URL" in text
assert "DATABASE_URL" in text
assert "docker run --rm -i postgres:16-alpine" in text
assert "set +x" in text
assert "cat \"$SQL_FILE\" |" in text
def test_profile_migration_workflow_targets_only_account_profile_migrations() -> None:
text = WORKFLOW.read_text(encoding="utf-8")
assert "20260718010000_recover_missing_profile_rows.sql" in text
assert "20260718020000_profiles_service_role_upsert_grants.sql" in text
assert "20260718050000_profiles_service_role_upsert_grants.sql" in text
assert "20260718070000_profiles_service_role_upsert_id.sql" in text
assert "20260718080000_profiles_service_role_account_upsert_selects.sql" in text
+2 -1
View File
@@ -109,7 +109,8 @@ def test_chat_page_uses_authenticated_cloud_persistence() -> None:
assert 'if (ownsInterface && !partialReply)' in source
assert 'await persistSession(interruptedSession)' in source
assert 'await persistence' in source
assert 'disabled={Boolean(pendingSessionId) || cancellationPending}' in source
assert "pendingSessionId || cancellationInFlight.current || pendingConsultation.current" in source
assert "setCancellationPending(true)" in source
assert 'localStorage.setItem(chartLibraryStorageKey(accountId)' in source
assert 'localStorage.setItem("chat_sessions"' not in source