Issue #8959 tracks a route policy manifest and generated inventory for backend routes.
The rollout is metadata-only. It does not change request handling, middleware, authentication, rate limiting, or OpenAPI output.
The full manifest coverage check remains report-only while legacy routes are baselined. CI also runs a strict missing-route baseline check: new backend routes must add a matching policy entry instead of expanding the legacy baseline.
The initial manifest covers the primary FastAPI app created in backend/main.py:
- Service id:
backend-main - Application HTTP routes: included in inventory and manifest coverage checks
- Application WebSocket routes: included in inventory and manifest coverage checks
- FastAPI-generated docs/OpenAPI/Redoc system routes: listed as excluded system routes in generated inventory
Sibling FastAPI services such as pusher, llm_gateway, diarizer, modal, and parakeet should get their own service ids or manifests later.
The canonical route identity is:
service:route_type:METHOD:/path/{param}
Example:
backend-main:http:GET:/v1/conversations/{conversation_id}
Do not use function names or OpenAPI operation ids as the policy identity. They are useful evidence, but they are not the governed route surface.
Run the report-only check:
cd backend
scripts/openapi_runner.sh scripts/route_policy_inventory.py --manifest route_policy_manifest.yaml --check --report-onlyRun the CI baseline gate:
cd backend
scripts/openapi_runner.sh scripts/route_policy_inventory.py --manifest route_policy_manifest.yaml --enforce-missing-baselinePrint deterministic JSON inventory:
cd backend
scripts/openapi_runner.sh scripts/route_policy_inventory.py --manifest route_policy_manifest.yaml --printWrite deterministic JSON inventory:
cd backend
scripts/openapi_runner.sh scripts/route_policy_inventory.py --manifest route_policy_manifest.yaml --write-inventory /tmp/backend-route-inventory.jsonRegenerate the legacy missing-route baseline after reviewed routes are added to the manifest or removed:
cd backend
scripts/openapi_runner.sh scripts/route_policy_inventory.py --manifest route_policy_manifest.yaml --write-missing-baseline route_policy_legacy_missing_routes.txtDo not add newly introduced routes to route_policy_legacy_missing_routes.txt. That file is only for the pre-existing route inventory from the initial rollout.
On pull requests, CI compares this file with the target branch copy and fails if the legacy baseline grows.
- Add or update the FastAPI route.
- Run the route policy inventory command and the CI baseline gate.
- Add or update the matching manifest entry in
backend/route_policy_manifest.yaml. - Prefer
review_status: reviewedwhen the route policy has been checked by the route owner. - Use
review_status: legacy_unreviewedonly for baseline migration entries that still need policy review. - Use
review_status: exemptonly with anexempt_reason.
Keep declared policy separate from observed evidence. Dependency names, OpenAPI tags, timeout override hints, and endpoint modules are generated to help review, but they are not a substitute for owner-reviewed policy.