Repository navigation
refactor: remove dead routing-plane routes and gateway routing state - #8
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
bff-backoffice PR #9 removed the routing plane from the BFF. This removes everything in the gateway that only existed to forward to it, plus the gateway's own routing code that nothing calls. The llama target path used by the Backoffice llama target card is untouched.
Removed routes and evidence
All evidence is a grep across every clone under
axiomnode/(Mobile-App, Backoffice, bff-backoffice, bff-mobile, ai-engine, microservice-*, shared-sdk-client, contracts-and-schemas, platform-infra, observability-platform, docs) on the current branch heads andorigin/main.GET /v1/backoffice/kubernetes/overviewGET/PUT/DELETE /v1/backoffice/service-targets[/:service]GET /v1/backoffice/routing/historyGET/POST /v1/backoffice/ai-engine/connections,PUT/DELETE .../connections/:presetId,POST .../connections/:presetId/activateGET/POST /v1/backoffice/ai-engine/presets,PUT/DELETE .../presets/:presetIdGET/PUT/DELETE /internal/admin/ai-engine/target(gateway-owned)syncAiEngineLlamaTargetcallsai-engine-apiat/internal/admin/llama-target, not the gateway. The only other hit isplatform-infra/scripts/smoke-stg-edge.sh, which asserts the path is NOT public (expects 404 with a bearer token), and that stays true after removalroutingStateStore.ts+GATEWAY_ROUTING_STATE_FILEAI_ENGINE_API_URL/AI_ENGINE_STATS_URLonlyFollow-on dead code removed with them:
API_GATEWAY_ADMIN_TOKEN(no admin route left, so it is no longer a required credential at startup),ALLOWED_ROUTING_TARGET_HOSTSandisTargetHostAllowed/CIDR helpers, and theparseJsonBodyopt-in of the raw JSON body parser (its only user was the admin PUT).Kept on purpose
GET/PUT/DELETE /v1/backoffice/ai-engine/target,POST /v1/backoffice/ai-engine/probe,GET /v1/backoffice/ai-engine/plugin/capabilities(Backoffice llama target card)./internal/ai-engine/*routes and theai-engine-api/ai-engine-statsupstreams.adminrate-limit category andRATE_LIMIT_ADMIN_MAX: now unreachable, but removing a public config knob is a separate decision.LOC
158 added, 1528 deleted across 18 files (net -1370). Production code: 353 deleted, 10 added in
src/appand.env.example(including the 111-lineroutingStateStore.ts); the rest is tests, fixture (62 -> 46 routes) and docs.Fixture
tests/fixtures/gatewayRoutes.jsonand the pinned counts inproxyRouteEquivalence.test.tswere updated together: 62 -> 46 routes, edge 44 -> 31, internal 7, none 8, backoffice routes 44 -> 31. A new test asserts every removed path now returns 404.Verification
npm ci,npm run build,npm run lintclean;npm run test:coverage: 255 tests pass, branch coverage 92.98% (gate 90%).Deploy note
platform-infrakubernetes/base/api-gateway/deployment.yamlstill setsGATEWAY_ROUTING_STATE_FILE; the gateway now ignores it, so it is harmless and can be dropped in platform-infra (thechore/remove-routing-leftoversbranch there is the natural place). If the runtime secrets defineAPI_GATEWAY_ADMIN_TOKEN, it can be removed too.