Repository navigation
legacy-retire: mount enrichment + provider-STT on the role map; store conformance in emulator proofs - #22498
Conversation
…e map; run store conformance On top of lane 7's role map (#22470), main.py is unchanged: - app_roles.py: Mount(enrichment) and Mount(batch_provider_stt) on API_WORKERS (contract (a) phase 1: the consumer routes mount on every serving role; lane 9's C4 sweep needs the API role too). - test_app_roles_route_census.py: nothing is pending mount any more. - route_policy_manifest.yaml: reviewed policy for /v2/enrichment/run and /v2/batch-pipeline/provider-stt/run (service_oidc Cloud Tasks targets, like recover-quarantine). - run-emulator-proofs.sh: lane 12's job-store conformance suite (sim + emulator legs). Supersedes #22463 (main.py-shaped mount). Verified: test_app_roles_route_census + test_enrichment_route + test_batch_provider_stt 102 passed; check_duplicate_routes ok (891); check_route_policy_baseline current. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2d69651791
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Mount(enrichment, roles=API_WORKERS), # Cloud Tasks /v2/enrichment/run (lane 9; contract (a) phase 1) | ||
| Mount(batch_provider_stt, roles=API_WORKERS), # Cloud Tasks /v2/batch-pipeline/provider-stt/run (lane 8) |
There was a problem hiding this comment.
Add task-duration timeouts before mounting these consumers
When enrichment or provider transcription takes longer than two minutes, both newly mounted POST routes fall through to TimeoutMiddleware's 120-second default because main.py has no paths_timeout entry for either path, despite their manifest entries declaring sync_job and their Cloud Tasks dispatch deadline being 1500 seconds. The request therefore returns 504 while its executor thread may continue detached, prompting a retry that can observe the existing lease as busy and acknowledge it; on request-scoped-CPU deployments this can leave long jobs stalled. Add explicit path overrides comparable to /v2/sync-jobs/run and /v2/batch-pipeline/recover-quarantine.
Useful? React with 👍 / 👎.
| # Job-store conformance (legacy-retire lane 12): sim + Firestore emulator legs here; the Postgres leg | ||
| # skips in CI (no Postgres service, decision S6) and is proven locally/staging. | ||
| run_proof "job-store conformance (sim + emulator)" \ | ||
| "$PYTHON" -m pytest -q -p no:cacheprovider tests/integration/test_store_conformance.py |
There was a problem hiding this comment.
Trigger the emulator workflow for conformance-suite changes
When a later PR changes tests/integration/test_store_conformance.py or its testing/store_fixtures.py harness without also touching backend/database/**, this newly added proof does not run: backend-emulator-proofs.yml has path filters for the runner script and database code but not for either suite source, while the normal backend test selector explicitly excludes tests/integration/. Add the conformance test and its support files to both the push and pull-request path filters so changes to the proof cannot merge without exercising it.
AGENTS.md reference: backend/AGENTS.md:L215-L215
Useful? React with 👍 / 👎.
feat(backend): mount enrichment and provider-STT consumers on the role map; run store conformance
On top of lane 7's role map (#22470), main.py is unchanged:
phase 1: the consumer routes mount on every serving role; lane 9's C4 sweep needs the API
role too).
/v2/batch-pipeline/provider-stt/run (service_oidc Cloud Tasks targets, like recover-quarantine).
Supersedes #22463 (main.py-shaped mount).
Verified: test_app_roles_route_census + test_enrichment_route + test_batch_provider_stt 102 passed;
check_duplicate_routes ok (891); check_route_policy_baseline current.
Product invariants affected
INV-DATA-1: the pre-push base is main, so this PR inherits lane 7's (#22430) gcp_*.yml lock lines on integration. This PR itself changes no Firebase/Firestore project, auth authority or serving endpoint.
Failure class
Integration carries fix commit db45689; this PR has no fix commit.
Failure-Class: none
🤖 Generated with Claude Code