Install product API versions independently with shared services #45

Merged
tech merged 2 commits from product-api-44 into dev-env-42 2026-09-13 08:34:34 +00:00
Owner

Closes #44.

Product API versions previously shared one environment-derived prefix, while middleware opened stores and installed auth routes. Versions now have explicit installers selected by api.versions, with independent routers, cookie scopes and URL providers over one set of typed dependencies. The product registry ships v1; additional contracts can be registered without editing the runtime. Auth and second-factor transports own their v1 handlers and wire contracts.

Omitted version configuration preserves existing v1 URLs and JSON; an empty list disables application routes. Invalid, duplicate and overlapping mounts fail startup. Bootstrap opens shared stores and notification resources once, and cleanup runs once after failed installation or shutdown. Existing health and metrics URLs remain available. No database migration; internal Go composition APIs change. Moving an existing mount requires reauthentication because refresh cookies remain path-scoped.

Validation passed on the final code: make test (backend race tests and frontend suites), make lint-backend, and git diff --check. Added tests cover independent contracts, shared dependencies, disabled routes, invalid configuration, scoped links and cookie set/delete, failed bootstrap/installation cleanup, repeated/concurrent shutdown, and runtime import boundaries. Existing auth/factor tests moved with their transports; Mongo-backed default v1 startup passes. Initial focused-test compilation and relative-route failures were corrected before the successful full runs. No live deployment or optional security scans.

Stacked on PR #43 (dev-env-42). Merge #43 into main first, then retarget this PR to main before merging. The current base keeps infrastructure changes out of this review. The user's uncommitted notification sender configuration is excluded.

See docs/api-versions.md for installation, compatibility and lifecycle details.

Closes #44. Product API versions previously shared one environment-derived prefix, while middleware opened stores and installed auth routes. Versions now have explicit installers selected by `api.versions`, with independent routers, cookie scopes and URL providers over one set of typed dependencies. The product registry ships v1; additional contracts can be registered without editing the runtime. Auth and second-factor transports own their v1 handlers and wire contracts. Omitted version configuration preserves existing v1 URLs and JSON; an empty list disables application routes. Invalid, duplicate and overlapping mounts fail startup. Bootstrap opens shared stores and notification resources once, and cleanup runs once after failed installation or shutdown. Existing health and metrics URLs remain available. No database migration; internal Go composition APIs change. Moving an existing mount requires reauthentication because refresh cookies remain path-scoped. Validation passed on the final code: `make test` (backend race tests and frontend suites), `make lint-backend`, and `git diff --check`. Added tests cover independent contracts, shared dependencies, disabled routes, invalid configuration, scoped links and cookie set/delete, failed bootstrap/installation cleanup, repeated/concurrent shutdown, and runtime import boundaries. Existing auth/factor tests moved with their transports; Mongo-backed default v1 startup passes. Initial focused-test compilation and relative-route failures were corrected before the successful full runs. No live deployment or optional security scans. Stacked on PR #43 (`dev-env-42`). Merge #43 into main first, then retarget this PR to main before merging. The current base keeps infrastructure changes out of this review. The user's uncommitted notification sender configuration is excluded. See `docs/api-versions.md` for installation, compatibility and lifecycle details.
tech added the backend label 2026-09-13 08:26:24 +00:00
tech added 1 commit 2026-09-13 08:26:25 +00:00
tech added 1 commit 2026-09-13 08:27:12 +00:00
tech merged commit 9f9525df56 into dev-env-42 2026-09-13 08:34:34 +00:00
tech deleted branch product-api-44 2026-09-13 08:34:34 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: tech/sxchnge#45