ICPI Handoff Plan
Goal
This plan defines the safest real sequence for lifting ICPI out of svc-tenders while keeping:
- gateway behavior unchanged
Resolving locale, route permissions, and workspace projection.
Current scope: Guest
Category: 10_normative | Version: v1.0.0
Owner: DOCUMENT_CUSTODIAN | Review cycle: 90 days
Approval authority: GOVERNANCE_ADMIN
Documentation portal is read-only. Editing and mutation endpoints are disabled.
Kvary platform is originally created in Georgian. Where a Georgian version exists, Georgian is authoritative for platform UI, documentation, and legal interpretation.
Translations into other languages are provided for convenience. Some records may originate in other languages and carry their own source or legal locale for a specific flow, but where a Georgian version is available, the Georgian version prevails for platform-level wording and interpretation.
Metadata incomplete: Document ID, Version, Status, Owner Role, Last Review Date, Next Review Date, Change Log
This plan defines the safest real sequence for lifting ICPI out of svc-tenders while keeping:
ICPI should continue to rely on a very small shared shell during and immediately after extraction:
Everything else should be treated as ICPI-owned move material unless later evidence says otherwise.
Move or copy first:
0007 and 0008Do not change route shapes at this step.
Create the smallest possible runtime shell for the extracted ICPI host:
requireServiceAuthThis is the first step that replaces temporary hosting in svc-tenders.
Do not change:
GET /api/v1/icpi/*POST /api/v1/icpi/upsertOnly change the target behind ICPI_SERVICE_URL.
Deployment cutover should prefer:
ICPI_SERVICE_URL=<new-icpi-runtime>while leaving:
TENDERS_SERVICE_URLunchanged for other domains.
The fallback shape in services/api/src/routes/icpi.ts means rollback remains easy as long as the old colocated host still exists.
During the first cutover window:
svc-tenders ICPI host availableOnly after parity is proven:
services/svc-tenders/src/server.tssvc-tendersICPI_SERVICE_URLICPI_PROXY_TIMEOUT_MSDATABASE_URLJWT_SECRETAUTH_SERVICE_URLPORTGET /api/v1/icpi/pricesGET /api/v1/icpi/suggestGET /api/v1/icpi/latest/:itemCodeGET /api/v1/icpi/estimatePOST /api/v1/icpi/upsert200 / 400 / 404 behaviorreasonCode values for current known failuresservices/api build passessvc-tenders build still passes during staged migrationThe rollback path should be operationally simple:
ICPI_SERVICE_URL back to the old colocated host, or unset it so gateway falls back to TENDERS_SERVICE_URLsvc-tenders ICPI route registration intact until cutover confidence is highThis is why old colocated ICPI hosting should not be removed in the same first step as the initial gateway cutover.
502 / 504 rates for /api/v1/icpi/*401 behavior for POST /api/v1/icpi/upsertprices, suggest, latest, and estimatesvc-tenders implementation and the new ICPI hostICPI_SERVICE_URL, JWT_SECRET, or AUTH_SERVICE_URL