Tenant, Repo, and App Surface Model

Tenant, Repo, and App Surface Model

1) Why this change

Conman currently models one "App" as one Git repository.

That assumption breaks for real config repos like hepquant-config, where one tenant has multiple user-facing app surfaces in the same repo, each with its own URL/domain and access model.

Examples observed in current config repos:

2) New domain model

Use three layers:

Cardinality:

3) Scope boundaries (important)

Repo-scoped concerns stay repo-scoped:

Surface-scoped concerns move to app-surface level:

This preserves atomic Git/release behavior while supporting multi-app repos.

4) Runtime profile impact

Current runtime profile design assumes a single URL. We need multi-surface routing in each profile.

Add per-profile surface routing config, for example:

Keep existing precedence model:

Apply precedence per surface endpoint and per variable/secret.

5) API and naming changes

Current Conman "App" is effectively a repo object (repo_path, integration_branch). To reduce confusion:

Suggested API shape (incremental):

Compatibility strategy for v1 implementation:

6) Data model changes (minimum)

Add tenants collection:

Update app/repo document (currently apps):

Add app_surfaces collection:

Update environments/runtime profiles:

7) Release/deploy semantics

No change to queue-first release model:

Add visibility metadata:

8) Migration plan

Phase 1 (non-breaking):

Phase 2:

Phase 3:

9) Decisions captured