Skip to content

DPS-76 - allow teams to configure multiple manifests#46

Merged
dantheuber merged 4 commits into
mainfrom
danessig/dps-76-allow-teams-to-configure-multiple-manifests
Mar 14, 2026
Merged

DPS-76 - allow teams to configure multiple manifests#46
dantheuber merged 4 commits into
mainfrom
danessig/dps-76-allow-teams-to-configure-multiple-manifests

Conversation

@dantheuber
Copy link
Copy Markdown
Member

Summary

Allow teams to configure multiple manifest URLs (up to 20) instead of being limited to one. This transitions every layer — database, stores, API, sync engine, and client UI — from single-config to multi-config architecture, enabling teams to manage different service groups, environments, or organizational boundaries with separate manifests.

Closes DPS-76.

Changes

Database

  • Migration 033_multi_manifest: removes UNIQUE(team_id) constraint on team_manifest_config, adds name column with UNIQUE(team_id, name), adds manifest_config_id FK columns to manifest_sync_history, drift_flags, and services tables with backfill

Server

  • Stores: ManifestConfigStore returns arrays from findByTeamId(), adds findById(), enforces 20-config limit per team with name uniqueness. ManifestSyncHistoryStore adds findByConfigId(). DriftFlagStore supports optional manifest_config_id filtering
  • Sync engine: New syncManifest(configId) method for per-config sync with per-config locking and cooldowns. syncTeam() iterates all enabled configs sequentially. Services scoped by manifest_config_id during diff/apply
  • API routes: Full rewrite to multi-config endpoints — GET/POST /:id/manifests, GET/PUT/DELETE /:id/manifests/:configId, per-config sync and sync-history routes
  • Admin routes: Return per-config rows with config_id/config_name, sync-all iterates individual configs

Client

  • API client: New functions (getManifestConfigs, createManifestConfig, updateManifestConfig, removeManifestConfig, triggerConfigSync, getConfigSyncHistory), legacy aliases preserved for transition
  • Hooks: New useManifestConfigs(teamId) for list view. useManifestConfig(teamId, configId) refactored for single-config operations. useSyncHistory(teamId, configId) scoped to config
  • ManifestList (new): Table listing all configs with inline create form, row navigation to detail view
  • ManifestPage: Dual-mode — list view (no configId) renders ManifestList, detail view (with configId) renders config/sync/drift/history
  • TeamDetail: Manifests tab replaced with ManifestList component. Overview card shows rolled-up multi-manifest summary
  • ManifestConfig: Added name field display and editing
  • ManifestAdmin: Per-config rows with config name column and links to config detail

Documentation

  • docs/spec/15-manifest-sync.md updated for multi-config architecture (routes, hooks, components, concurrency)
  • README.md updated for multiple manifests per team

Testing

  • New/updated tests included
  • All tests pass (npm test)
  • Linting passes (npm run lint)

60 files changed, 2301 insertions, 1095 deletions across:

  • Store tests: multi-config CRUD, 20-limit, name uniqueness, findByConfigId
  • Route tests: all new endpoints, validation, auth, sync guards
  • Sync engine tests: per-config sync, multi-config team sync, per-config locks
  • Client API tests: new multi-config functions
  • Hook tests: useManifestConfigs, updated useManifestConfig/useSyncHistory
  • Component tests: ManifestPage list/detail views, TeamDetail, ManifestStatusCard, ManifestAdmin, ManifestConfig

Results: 1495 client tests, 3002 server tests — all passing

Checklist

@dantheuber dantheuber merged commit 74309a9 into main Mar 14, 2026
3 checks passed
@dantheuber dantheuber deleted the danessig/dps-76-allow-teams-to-configure-multiple-manifests branch March 14, 2026 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant