Skip to content

__BACKLOG__ #35

Description

@artiphishle

Things that have to be addressed:

  • It seems that infra is putting a .env.local into apps folder, but infra should be standalone and it cannot know that the infra/ folder is inside of a generated Ankhorage app.
  • Add safe supervision for genuinely stuck database migrations. Design a portable, configurable lifecycle deadline that distinguishes legitimate long-running migrations from hangs, propagates failure clearly, and terminates the complete child-process tree without leaving orphaned Supabase processes. Follow-up from fix: prevent generated Supabase migration lifecycle hangs #41.
  • Coordinate a defense-in-depth hardening in ankhorage/studio: the server-side infrastructure lifecycle runner should have a bounded supervisory deadline, cancellation support, and reliable child-process-tree cleanup so an external command cannot keep the HTTP request and dashboard spinner open indefinitely. Follow-up from fix: prevent generated Supabase migration lifecycle hangs #41.
  • Prevent database credentials from being exposed in the local process list. Investigate a supported way to run Supabase migrations without placing the full SUPABASE_DB_URL—including its password—in command-line arguments, while preserving compatibility with self-hosted Minikube PostgreSQL. Follow-up from fix: prevent generated Supabase migration lifecycle hangs #41.
  • Refactor the Infra adapter architecture so deployment targets, capabilities, service providers, and target-specific renderers are separate axes instead of being nested together. Follow-up from [auth 2] Reconcile dynamic GoTrue redirects and Auth runtime rollout #48 / [auth 2].
    • Current debt: paths such as src/adapters/minikube/auth/**, src/adapters/minikube/storage/**, and src/adapters/minikube/secrets/** make Minikube appear to own Auth, Storage, and Secret-provider semantics.
    • Current debt: src/adapters/minikube/auth/oauthRuntime.ts is located as if it were generic Auth/Minikube code, but it contains Supabase/GoTrue-specific concepts including SupabaseOAuthRuntimeModel, GOTRUE_* variables, the supabase namespace, and deployment/auth rollout commands.
    • Current debt: the public redirect helper currently derives the Supabase/GoTrue callback path /auth/v1/callback; generic OAuth redirect policy must not hard-code a specific Auth provider's callback contract.
    • Establish explicit architectural layers, for example:
      • provider- and target-neutral domain/policy code such as src/auth/redirectPolicy.ts;
      • provider semantics such as src/providers/supabase/auth/**;
      • deployment-target rendering such as src/targets/minikube/providers/supabase/**, with future peers such as src/targets/aws/** or src/targets/elastic-beanstalk/**;
      • a composition/registry layer that selects a target adapter and the configured capability providers without cross-importing concrete implementations.
    • Define neutral contracts for Auth, Storage, Database, Authorization, and Secret Store contributions before adding another deployment target or provider.
    • Provider-neutral modules must not import or mention Supabase, GoTrue, Kubernetes resource names, Minikube profiles, namespaces, kubectl, or provider-specific environment keys.
    • Target-neutral provider modules must not emit Minikube/Kubernetes shell commands directly; target renderers own those details.
    • Adding a second Auth provider or a non-Minikube target must be possible by registering a new implementation rather than editing existing Supabase/Minikube modules or extending if/else provider switches throughout the codebase.
    • Move tests to the layer they validate: domain-policy tests, provider-contract tests, target-renderer tests, and composition tests.
    • Preserve generated output and compatibility while migrating incrementally; avoid a broad rewrite in feature PRs unless explicitly scheduled.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions