Vacancy Legacy Host Retirement Plan
Remaining Legacy-Host Items
| Item | Path | Current Role | Classification | Notes |
| --- | --- | --- | --- | --- |
| Legacy Vacancy route mount and wiring | services/svc-tenders/src/server.ts | keeps old Vacancy host reachable on :4020 | needed temporarily for rollback | remove when rollback window closes |
| Legacy Vacancy route registration | services/svc-tenders/src/routes/registerVacancyRoutes.ts | fallback-only Vacancy HTTP surface | needed temporarily for rollback | remove with legacy mount |
| Legacy Vacancy route support | services/svc-tenders/src/routes/support/vacancyRouteSupport.ts | fallback-only auth/parser adapter for Vacancy routes | needed temporarily for rollback | remove with legacy route slice |
| Legacy preferred Vacancy runtime copy | services/svc-tenders/src/vacancy/readRepository.ts | fallback host still serves mixed public truth and owner/applicant reads through this file | needed temporarily for rollback | remove when old route host is retired |
| Legacy Vacancy command/runtime copy | services/svc-tenders/src/vacancy/commandHandlers.ts, domain.ts, projections.ts, readModel.ts, validation.ts, contracts.ts | fallback host still executes Vacancy writes and preferred runtime reads | needed temporarily for rollback | remove with legacy route host if no remaining in-process callers depend on them |
| Root compatibility residue for Vacancy public/owner/applicant reads | services/svc-tenders/src/repository.ts | older callers and compatibility helpers still reach Vacancy reads here | safe to retire soon | retirement can follow after host deletion if no remaining callers survive |
| Vacancy compatibility readers | services/svc-tenders/src/vacancy/compatibilityReadRepository.ts, compatibilityApplicationRepository.ts | legacy read truth and older compatibility call paths | unresolved | these may survive route-host deletion a bit longer if compatibility callers remain |
| Vacancy JS residue in src/ | services/svc-tenders/src/vacancy/*.js, route JS copies if present | compiled residue, not canonical TS source | safe to retire soon | not part of the real route-host decision, but removable in a later hygiene pass |
| Live API seam | services/api/src/routes/vacancies.ts and sibling Vacancy routes | routes traffic to primary or fallback target | shared on purpose | stays shared after host retirement |
| Primary/fallback env seam | services/api/.env, root package.json startup flow | live API points Vacancy traffic to svc-vacancies, but default root startup still does not provision the service | unresolved | this is the current rollback-window blocker |
| Vacancy-focused opt-in API helper | package.json dev:api:vacancies-extracted | still useful as an explicit extracted-target helper while default startup remains incomplete | safe to retire soon | remove after startup normalization and host retirement |
What Can Be Retired Next
Retire with the legacy Vacancy host cut:
- Vacancy mount in
services/svc-tenders/src/server.ts services/svc-tenders/src/routes/registerVacancyRoutes.tsservices/svc-tenders/src/routes/support/vacancyRouteSupport.ts- fallback-only preferred Vacancy runtime copy in
services/svc-tenders/src/vacancy/*
Possibly retire in the same or immediately following cut:
package.jsondev:api:vacancies-extracted- stale Vacancy JS residue inside
services/svc-tenders/src/
What Must Stay For Now
Must stay shared on purpose:
- API gateway Vacancy route family
VACANCIES_SERVICE_URL ?? TENDERS_SERVICE_URL- shared auth ingress behavior
- shared auth/identity resolution behind
/auth/me
Must stay explicit even after route-host retirement planning:
- public Vacancy compatibility-backed behavior in
GET /vacancies - public Vacancy compatibility-backed behavior in
GET /vacancies/:id
Those are architecture-truth notes, not reasons to keep the old route host forever.
Prerequisites For Deletion
Before deleting the old Vacancy host, verify:
svc-vacanciesremains the default primary runtime through a stabilization window the team accepts- no active operator/dev workflow still depends on hitting Vacancy routes through
svc-tenders - the rollback window is explicitly closed
- the team accepts that public Vacancy read compatibility residue can remain explicit inside the extracted runtime
- any remaining callers of root Vacancy compatibility methods are inventoried so route-host deletion does not silently strand them
- normal root startup paths provision
svc-vacanciesinstead of silently depending on the old host staying up
Rollback Cutoff Criteria
Rollback can close when all of the following are true:
- live gateway traffic has remained stable on
svc-vacancies - the team no longer wants
svc-tendersto remain as the fast Vacancy rollback target - default root startup and runbook docs clearly treat
svc-vacanciesas normal primary truth - default root startup actually provisions
svc-vacancies - there is no open incident or known parity concern requiring the old route host to stay live
Compatibility-Backed Public-Read Notes
Retiring the old Vacancy route host does not, by itself, clean up public read truth.
After old-host retirement, the extracted runtime may still honestly preserve:
- projection-backed preferred Vacancy truth where available
- fallback to legacy
vacancieswhere currentVacancyReadRepositorystill does that
That mixed public-read behavior remains explicit until a later public-read cleanup sprint changes it on purpose.