Skip to content

legacy-retire: mount enrichment + provider-STT on the role map; store conformance in emulator proofs - #22498

Merged
Git-on-my-level merged 1 commit into
integration/legacy-retirefrom
lr/01-mounts2
Oct 19, 2026
Merged

Git-on-my-level merged 1 commit into
integration/legacy-retirefrom
lr/01-mounts2

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

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:

  • 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.

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

View guided diff Turn on auto-fix

…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]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T13:43:40.819354Z 2d69651 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread backend/app_roles.py
Comment on lines +223 to +224
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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@Git-on-my-level
Git-on-my-level merged commit 626cdbe into integration/legacy-retire Oct 19, 2026
26 checks passed
@Git-on-my-level
Git-on-my-level deleted the lr/01-mounts2 branch October 19, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant