Skip to content

legacy-retire: mount enrichment + provider-STT routers; store conformance in emulator proofs - #22463

Closed
Git-on-my-level wants to merge 4 commits into
integration/legacy-retirefrom
lr/01-mounts
Closed

Git-on-my-level wants to merge 4 commits into
integration/legacy-retirefrom
lr/01-mounts

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 the enrichment and provider-STT consumer routers; run store conformance

  • main.py mounts routers/enrichment.py and routers/batch_provider_stt.py once, right after
    batch_pipeline (the lane-1 mount block, now that fix: make cap-held recovery durable across restarts #22388's main.py edit is on integration).
  • app_roles.py: the matching ROUTER_MOUNTS rows on the workers role, so the B8 census still
    equals main.py's include order. Under today's default role (all) both are served.
  • run-emulator-proofs.sh: lane 12's job-store conformance suite (sim + Firestore emulator legs;
    the Postgres leg skips in CI per S6).

Verified: test_app_roles_route_census.py 20 passed; check_duplicate_routes.py ok (889 routes).

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

…; run store conformance

- main.py mounts routers/enrichment.py and routers/batch_provider_stt.py once, right after
  batch_pipeline (the lane-1 mount block, now that #22388's main.py edit is on integration).
- app_roles.py: the matching ROUTER_MOUNTS rows on the workers role, so the B8 census still
  equals main.py's include order. Under today's default role (all) both are served.
- run-emulator-proofs.sh: lane 12's job-store conformance suite (sim + Firestore emulator legs;
  the Postgres leg skips in CI per S6).

Verified: test_app_roles_route_census.py 20 passed; check_duplicate_routes.py ok (889 routes).

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-19T11:24:38.421860Z 4b4c2ec New commits
ℹ️ 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: 27805ce977

ℹ️ 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/main.py
Comment on lines +296 to +297
app.include_router(enrichment.router)
app.include_router(batch_provider_stt.router)

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 Implement the consumers before mounting their empty routers

When either Cloud Tasks edge dispatches to /v2/enrichment/run or /v2/batch-pipeline/provider-stt/run, these mounts still return 404 because both imported modules contain only router = APIRouter() and define no route decorators. The route-census test nevertheless passes because _module_for_path finds the paths in the modules' docstrings and now sees the modules in ROUTER_MOUNTS, so this commit advertises worker coverage without registering either consumer; implement the handlers before mounting them or retain the pending-stub treatment.

Useful? React with 👍 / 👎.

Comment on lines +70 to +71
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 proof workflow when its conformance suite changes

This adds tests/integration/test_store_conformance.py to the emulator proof runner, but the push and pull_request path filters in .github/workflows/backend-emulator-proofs.yml lines 21-47 do not include that test file or its containing directory. A PR that changes only the conformance contract will therefore skip this workflow, and the normal backend selector will not compensate because integration tests are excluded from its auto-discovery; add this test path to both filters.

AGENTS.md reference: backend/AGENTS.md:L215-L215

Useful? React with 👍 / 👎.

Git-on-my-level and others added 3 commits October 19, 2026 16:48
…peline/provider-stt/run

Both are Cloud Tasks targets behind service OIDC (verify_configured_cloud_tasks_oidc dependency),
shaped like /v2/batch-pipeline/recover-quarantine: internal_task, internal, sync_job timeout.

Verified: check_route_policy_baseline.py --base-ref origin/main: 0 new missing entries.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@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: 4b4c2ec0cc

ℹ️ 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 on lines +4638 to +4639
- {route_type: http, method: POST, path: /v2/enrichment/run, policy: {review_status: reviewed, auth: {mechanisms: [service_oidc], placement: dependency, scopes: []}, byok: not_applicable, rate_limit: {policy_name: none, key_subject: none, enforcement: none, placement: none}, timeout_class: sync_job, surface: internal_task, visibility: internal, data_domain: conversations, deprecation: {state: active}, owner: backend}}
- {route_type: http, method: POST, path: /v2/batch-pipeline/provider-stt/run, policy: {review_status: reviewed, auth: {mechanisms: [service_oidc], placement: dependency, scopes: []}, byok: not_applicable, rate_limit: {policy_name: none, key_subject: none, enforcement: none, placement: none}, timeout_class: sync_job, surface: internal_task, visibility: internal, data_domain: sync_audio, deprecation: {state: active}, owner: backend}}

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 Add task timeouts for the new consumers

Both new routes are declared as sync_job operations, but main.py does not add either path to paths_timeout, so TimeoutMiddleware applies the default 120-second POST timeout instead of the Cloud Tasks edge's 1500-second deadline. When enrichment or a provider-STT call runs longer than two minutes, the request returns 504 while its executor thread continues running, prompting a retry against work that may still be in flight; add explicit path overrides before enabling these dispatch modes.

Useful? React with 👍 / 👎.

Comment thread backend/main.py
app.include_router(batch_pipeline.router)
# Legacy-sync retirement consumers (contracts (a)/(d)); lane 7's B8 role map owns where they serve.
app.include_router(enrichment.router)
app.include_router(batch_provider_stt.router)

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 Implement the provider-STT outbox before mounting its route

On every valid authenticated provider-STT delivery, run_delivery() calls outbox_for(OutboxKind.PROVIDER_STT), but the only selected implementation is firestore_outbox(), which raises NotImplementedError for every kind except ENRICHMENT; consequently this newly mounted endpoint returns 500 before it can claim any row. Fresh evidence beyond the earlier 404 report is that the route now exists, but its default runtime dependency still cannot construct the provider-STT outbox; implement that backend or defer mounting the route.

Useful? React with 👍 / 👎.

@Git-on-my-level

Copy link
Copy Markdown
Member Author

Superseded by the role-map version on lr/01-mounts2 (lane 7's #22470 moved mounting into app_roles.py, so main.py stays untouched).

@github-actions

Copy link
Copy Markdown
Contributor

Hey @Git-on-my-level 👋

Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request.

After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:

  • Project standards — Ensuring consistency across the codebase
  • User needs — Making sure changes align with what our users need
  • Code best practices — Maintaining code quality and maintainability
  • Project direction — Keeping aligned with our product principles and locked invariants

Before your next PR, please skim:

  • PRODUCT.md — product north star
  • Product invariants — locked rules (shared chat, memory tiers, agent control plane, integrations, brand)

If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing.

Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out.

Thank you for being part of the Omi community!

Git-on-my-level added a commit that referenced this pull request Oct 19, 2026
…e map; run store conformance (#22498)

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]>
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