FED-M1-01 — extend mosaic.config.json schema with federated tier and align tier vocabulary with the federation PRD.
Tier reconciliation:
The existing code used local | team while docs/federation/PRD.md line 247 defines the canonical vocabulary as local | standalone | federated. team was conceptually identical to PRD standalone (Postgres + Valkey, no pgvector). This PR renames team → standalone and adds federated as the third tier value. team continues to validate via a deprecated alias path that warns to stderr, so existing 0.0.x headless installs keep working without modification.
What ships:
StorageTier / GatewayStorageTier unions: local | standalone | federated
DEFAULT_STANDALONE_CONFIG (renamed from DEFAULT_TEAM_CONFIG) — Postgres on 5432, keyword memory (corrected to match PRD; the old team default had pgvector which contradicted the spec)
DEFAULT_FEDERATED_CONFIG — Postgres on 5433, pgvector memory
Wizard interactive promptTier() now offers all three with hint copy
Wizard headless MOSAIC_STORAGE_TIER: accepts standalone / federated directly, accepts team with a deprecation warning, hard-rejects unknown values with a message naming all three valid tiers (was a silent fallback to local before; pre-review fix-up)
This is enum + types + defaults + alias only. No federation runtime behavior is gated on the new value yet.
Review chain (orchestrator-driven):
Implementation: sonnet subagent on feat/federation-m1-tier-config
Independent review: feature-dev:code-reviewer (sonnet) — verdict ship-with-followup, raised four issues
Independent verification: separate sonnet subagent verified all 9 implementation claims against the diff and PRD
Two of the four review issues directly caused by this PR (silent unknown-value fallback, wrong DB port pre-fill) were fixed pre-merge; haiku verifier confirmed the fixes
Two pre-existing issues (hardcoded tier: 'local' in stage resume branches; dist/ tracking hygiene) tracked as follow-ups, not blocking this PR
pnpm --filter @mosaicstack/config typecheck + test (10/10)
pnpm --filter @mosaicstack/mosaic typecheck + test (279/279)
pnpm typecheck (38/38 tasks)
pnpm lint (21/21 tasks)
pnpm format:check
CI green on merge
Generated with Claude Code
## Summary
FED-M1-01 — extend `mosaic.config.json` schema with `federated` tier and align tier vocabulary with the federation PRD.
**Tier reconciliation:**
The existing code used `local | team` while `docs/federation/PRD.md` line 247 defines the canonical vocabulary as `local | standalone | federated`. `team` was conceptually identical to PRD `standalone` (Postgres + Valkey, no pgvector). This PR renames `team` → `standalone` and adds `federated` as the third tier value. `team` continues to validate via a deprecated alias path that warns to stderr, so existing 0.0.x headless installs keep working without modification.
**What ships:**
- `StorageTier` / `GatewayStorageTier` unions: `local | standalone | federated`
- `DEFAULT_STANDALONE_CONFIG` (renamed from `DEFAULT_TEAM_CONFIG`) — Postgres on 5432, **keyword** memory (corrected to match PRD; the old `team` default had `pgvector` which contradicted the spec)
- `DEFAULT_FEDERATED_CONFIG` — Postgres on 5433, pgvector memory
- Wizard interactive `promptTier()` now offers all three with hint copy
- Wizard headless `MOSAIC_STORAGE_TIER`: accepts `standalone` / `federated` directly, accepts `team` with a deprecation warning, **hard-rejects unknown values** with a message naming all three valid tiers (was a silent fallback to `local` before; pre-review fix-up)
- Wizard interactive DATABASE_URL pre-fill is tier-aware: `standalone` → 5432, `federated` → 5433
- 10 new unit tests (`packages/config/src/mosaic-config.spec.ts`) + 3 new wizard headless tests
**What does NOT ship (deferred per FED-M1 plan):**
- pgvector enforcement / extension creation → FED-M1-03
- tier-detector with fail-fast → FED-M1-04
- `docker-compose.federated.yml` overlay → FED-M1-02
- Migration script `local`/`standalone` → `federated` → FED-M1-05
This is enum + types + defaults + alias only. No federation runtime behavior is gated on the new value yet.
**Review chain (orchestrator-driven):**
- Implementation: sonnet subagent on `feat/federation-m1-tier-config`
- Independent review: `feature-dev:code-reviewer` (sonnet) — verdict `ship-with-followup`, raised four issues
- Independent verification: separate sonnet subagent verified all 9 implementation claims against the diff and PRD
- Two of the four review issues directly caused by this PR (silent unknown-value fallback, wrong DB port pre-fill) were fixed pre-merge; haiku verifier confirmed the fixes
- Two pre-existing issues (hardcoded `tier: 'local'` in stage resume branches; `dist/` tracking hygiene) tracked as follow-ups, not blocking this PR
**Refs** #460
## Test plan
- [x] `pnpm --filter @mosaicstack/config typecheck` + `test` (10/10)
- [x] `pnpm --filter @mosaicstack/mosaic typecheck` + `test` (279/279)
- [x] `pnpm typecheck` (38/38 tasks)
- [x] `pnpm lint` (21/21 tasks)
- [x] `pnpm format:check`
- [ ] CI green on merge
Generated with Claude Code
Aligns mosaic.config tier vocabulary with the federation PRD:
- Adds `federated` to the tier enum (Postgres + Valkey + pgvector)
- Renames `team` → `standalone` in StorageTier / GatewayStorageTier
- Keeps `team` as a deprecated alias that warns to stderr and maps to standalone
- Adds DEFAULT_FEDERATED_CONFIG (port 5433, pgvector memory)
- Corrects DEFAULT_STANDALONE_CONFIG.memory to keyword (PRD line 247)
- Wizard interactive promptTier offers local/standalone/federated
- Wizard headless env path now hard-rejects unknown MOSAIC_STORAGE_TIER
values with a message naming all three valid tiers
- Interactive DATABASE_URL pre-fill is tier-aware: standalone→5432, federated→5433
- 10 new unit tests for the validator + 3 new wizard headless tests
No new behavior beyond the enum and defaults — pgvector enforcement,
tier-detector, and docker-compose overlays land in FED-M1-02..04.
Refs #460
Co-Authored-By: Claude Opus 4.7 <[email protected]>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
FED-M1-01 — extend
mosaic.config.jsonschema withfederatedtier and align tier vocabulary with the federation PRD.Tier reconciliation:
The existing code used
local | teamwhiledocs/federation/PRD.mdline 247 defines the canonical vocabulary aslocal | standalone | federated.teamwas conceptually identical to PRDstandalone(Postgres + Valkey, no pgvector). This PR renamesteam→standaloneand addsfederatedas the third tier value.teamcontinues to validate via a deprecated alias path that warns to stderr, so existing 0.0.x headless installs keep working without modification.What ships:
StorageTier/GatewayStorageTierunions:local | standalone | federatedDEFAULT_STANDALONE_CONFIG(renamed fromDEFAULT_TEAM_CONFIG) — Postgres on 5432, keyword memory (corrected to match PRD; the oldteamdefault hadpgvectorwhich contradicted the spec)DEFAULT_FEDERATED_CONFIG— Postgres on 5433, pgvector memorypromptTier()now offers all three with hint copyMOSAIC_STORAGE_TIER: acceptsstandalone/federateddirectly, acceptsteamwith a deprecation warning, hard-rejects unknown values with a message naming all three valid tiers (was a silent fallback tolocalbefore; pre-review fix-up)standalone→ 5432,federated→ 5433packages/config/src/mosaic-config.spec.ts) + 3 new wizard headless testsWhat does NOT ship (deferred per FED-M1 plan):
docker-compose.federated.ymloverlay → FED-M1-02local/standalone→federated→ FED-M1-05This is enum + types + defaults + alias only. No federation runtime behavior is gated on the new value yet.
Review chain (orchestrator-driven):
feat/federation-m1-tier-configfeature-dev:code-reviewer(sonnet) — verdictship-with-followup, raised four issuestier: 'local'in stage resume branches;dist/tracking hygiene) tracked as follow-ups, not blocking this PRRefs #460
Test plan
pnpm --filter @mosaicstack/config typecheck+test(10/10)pnpm --filter @mosaicstack/mosaic typecheck+test(279/279)pnpm typecheck(38/38 tasks)pnpm lint(21/21 tasks)pnpm format:checkGenerated with Claude Code