Accommodation Runtime Bootstrap Plan
Purpose
This document defines the safest first accommodation runtime/bootstrap path.
This sprint does not execute extraction or cutover.
It chooses a low-risk bootstrap direction that keeps rollback easy and keeps compatibility residue explicit.
Target runtime location
Prepared runtime target:
Current status:
- location reserved as the future accommodation runtime home
- no active route cutover
- no old host deletion
Bootstrap/server entry plan
Planned runtime shape:
services/svc-accommodations/package.jsonservices/svc-accommodations/tsconfig.jsonservices/svc-accommodations/src/server.tsservices/svc-accommodations/src/config.tsservices/svc-accommodations/src/db.tsservices/svc-accommodations/src/auth.tsservices/svc-accommodations/src/http/authTypes.tsservices/svc-accommodations/src/routes/registerAccommodationRoutes.tsservices/svc-accommodations/src/routes/support/accommodationRouteSupport.tsservices/svc-accommodations/src/routes/support/detailExtractionSupport.tscopied locally or replaced by a narrower local helperservices/svc-accommodations/src/accommodation/*copied from the accommodation-owned slice
Bootstrap wiring should mirror current route-time truth:
- resolve config
- create DB pool
- build shared auth ingress adapter
- create
AccommodationCommandHandlers - create
AccommodationReadRepository - create
AccommodationOwnerReadRepository - build
AccommodationRouteSupport - register accommodation routes
- expose
/health
Recommended bootstrap approach
Chosen direction for next execution sprint:
copy-first runtime creation
Reason:
- accommodation active routes already depend on dedicated accommodation modules
- gateway env seam already exists
- rollback should stay as
ACCOMMODATIONS_SERVICE_URLfallback toTENDERS_SERVICE_URL
Coexistence strategy with old host
During first runtime execution:
- old accommodation hosting in
svc-tendersstays active - gateway route shape stays unchanged
ACCOMMODATIONS_SERVICE_URLpoints to new runtime only during parity verification/cutover rehearsal- fallback remains old
svc-tendersaccommodation host
Rollback notes
Rollback path should stay:
- unset or change
ACCOMMODATIONS_SERVICE_URL - gateway falls back to
TENDERS_SERVICE_URL - old
svc-tendersaccommodation hosting serves the same routes again
This is the same env-first pattern proven on ICPI and should remain the accommodation cutover model.
Why this sprint did not create a runnable runtime yet
The runtime target is now concrete, but full copy-first scaffolding is deferred because:
- migration ownership is still mixed across accommodation-only and vacancy/accommodation legacy migrations
- compatibility residue is still explicit in
services/svc-tenders/src/accommodation/compatibilityReadRepository.ts detailExtractionSupport.tsis still shared with vacancy- this sprint was aimed at low-ambiguity bootstrap prep, not premature extraction execution
Main blockers before runtime execution
- define the exact copy-first accommodation source file set
- decide which migrations copy first versus stay as legacy residue
- copy or localize the small shell-local auth/parser helper types
- keep root compatibility hosting explicit until parity is proven