API Tender Legacy Bridge Modularization Status
Date: 2026-03-19 Sprint: Platform Cleanup Sprint 105
What Bridge Logic Was Moved
The gateway-side tender legacy bridge logic was moved out of:
and into:
Moved bridge logic now includes:
enqueueLegacyTenderBridgeEvent(...)LEGACY_TENDERS_OUTBOX_ENABLEDLEGACY_TENDERS_OUTBOX_PATH- bridge event type definition
intentIdderivationdedupeKeyderivation- bridge-specific request body parsing for
intentId - POST to
TENDERS_SERVICE_URL + LEGACY_TENDERS_OUTBOX_PATH - bridge failure mapping contract via
legacy_outbox_enqueue_failed
Where It Lives Now
Dedicated bridge module:
That file now owns the gateway-side compatibility bridge boundary.
What Still Remains In Route-Shell Code
Route-shell behavior remains in:
It still owns:
/api/v1/tenders/legacy/*route mounting- feature-flag gating through
ensureLegacyTenderLocalEngineEnabled(...) - gateway-local viewer resolution
- request input parsing for route actions
- local-engine action execution through engine.ts
- route-level success/error response shaping
Dependency Notes
Who calls the bridge helper now
- only legacyRoutes.ts
What the bridge depends on
Requestmetadata forx-intent-id/ request body inspectionTENDERS_SERVICE_URLLEGACY_TENDERS_OUTBOX_PATHLEGACY_TENDERS_OUTBOX_ENABLEDfetch
What remains local to services/api
- the route shell
- the bridge module
- the API-local legacy tender engine
What still blocks removal planning later
- the bridge is still operationally real because it appends to the documented legacy tender outbox flow
- no canonical upstream replacement for these legacy actions has been established here yet
What Later Cleanup This Enables
This modularization enables a cleaner next step:
- evaluate route-shell removal planning separately from bridge retirement planning
- reason about bridge dependencies without rereading route-handler logic
- isolate or retire the bridge later without treating the whole route file as one mixed ownership blob
Notes
- Behavior was intentionally kept unchanged.
- This is a modularization step, not a removal step.