Skip to content

[Initiative] Remove init script and migrate to API-first repository bootstrap #144

@juliuskrah

Description

@juliuskrah

Summary

Deprecate and remove script-based catalog bootstrap (scripts/init-demo-catalog.sh) and replace all setup guidance with API-driven repository creation.

The new bootstrap flow must be namespace-aware and deterministic:

  • If no namespaces exist, create repository in default
  • If user belongs to exactly one namespace, create repository there when namespace is omitted
  • If user belongs to multiple namespaces and namespace is omitted, fail with an explicit error

In Scope

  • Remove script-based repository bootstrap from user/developer workflows
  • Mark scripts/init-demo-catalog.sh as deprecated, then remove it once API parity is complete
  • Replace documentation examples that use the init script with API-first steps
  • Define and implement namespace resolution logic for repository creation when namespace is not provided
  • Return actionable API errors for ambiguous namespace selection
  • Add tests for namespace-selection behavior and bootstrap success/failure modes

Out of Scope

  • UI-driven repository creation experience
  • Authorization model redesign
  • Non-repository initialization scripts (license checks, git hooks, etc.)

Acceptance Criteria

  • API can create and initialize a repository without requiring scripts/init-demo-catalog.sh
  • If no namespaces exist, omitted namespace resolves to default
  • If user belongs to one namespace, omitted namespace resolves to that namespace
  • If user belongs to multiple namespaces, omitted namespace returns a deterministic error requiring explicit namespace
  • docs/developer-guide.md and docs/user-guide.md no longer instruct users to run init script for bootstrap
  • API-first documentation includes examples for explicit namespace and omitted namespace behavior
  • Script removal/deprecation plan is documented and tracked to completion

Implementation Notes

This change removes an avoidable source of environment drift between local files and service data mounts, and aligns onboarding with production behavior. Script-based bootstrap can silently create repos in paths not used by running services, causing confusing empty-repo outcomes. API-first creation enforces one authoritative control plane and enables consistent namespace policy behavior.

The namespace fallback rules are sensible and user-friendly:

  • default for zero namespaces preserves quick-start ergonomics
  • single-namespace inference avoids unnecessary verbosity
  • multi-namespace ambiguity must fail to prevent accidental writes to the wrong tenant

Dependencies

Tracking

  • Area: infra
  • Priority: p2 – high
  • Target Milestone / Release: TBD

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions