Skip to content

fix(backend): Firestore test fake missing update() for cron promotion - #9250

Merged
kodjima33 merged 2 commits into
mainfrom
fix/cron-firestore-fake-update
Jul 8, 2026
Merged

kodjima33 merged 2 commits into
mainfrom
fix/cron-firestore-fake-update

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Jul 8, 2026 •

Copy link
Copy Markdown
Member

Merge order & dependencies

PR Dependencies
9250 None — merge first (unblocks CI)
9252 None — parallel with #9253, #9254
9253 None — parallel with #9252, #9254
9254 None — parallel with #9252, #9253; #9255 should merge after this
9255 Merge after #9254 (registers teardown tests). Merge after #9250 recommended.
9256 Independent code PR; PR6b prod deploy after merge. Related #9255 not blocking.
9257 Draft. Merge after #9255 (workflow contract CI).
9258 Draft. Independent; merge after wave 1.
9260 Draft. Independent; merge after wave 1.
9261 Draft. Merge after wave 1; PR10c proxy routing follow-up optional.

Summary

  • Add update() to shared _DocRef fakes in cron/ws unit tests so KG promotion maintenance tests match production Firestore semantics.
  • Add test_firestore_fake_contract.py ratchet so shared fakes must implement get/set/update with merge behavior.

Related: #9211

Test plan

cd backend && python3 -m pytest tests/unit/test_canonical_short_term_maintenance_cron.py tests/unit/test_firestore_fake_contract.py -v -q
# 12 passed

Merge with a regular merge (no squash).

Closes #9234

Made with Cursor

Review in cubic

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@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: c5b3365775

ℹ️ 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".

Git-on-my-level and others added 2 commits July 8, 2026 15:20
Assert shared WS-B/WS-I _DocRef fakes implement get/set/update with merge
semantics so cron promotion tests cannot regress when fakes drift.

Closes #9234

Verification: cd backend && python3 -m pytest \
    tests/unit/test_canonical_short_term_maintenance_cron.py \
    tests/unit/test_firestore_fake_contract.py -v
  → 12 passed
Co-authored-by: Cursor <[email protected]>
@Git-on-my-level
Git-on-my-level force-pushed the fix/cron-firestore-fake-update branch from c5b3365 to d38c936 Compare July 8, 2026 08:23
@Git-on-my-level

Copy link
Copy Markdown
Member Author

Monitor follow-up for PR #9250:

  • Updated the shared WS-B/WS-I Firestore test fakes so missing-document update() raises google.api_core.exceptions.NotFound, matching production Firestore semantics.
  • Updated the fake contract test to assert NotFound instead of KeyError.
  • Resolved the addressed Codex review thread.

Verification:

  • cd backend && python3 -m pytest tests/unit/test_canonical_short_term_maintenance_cron.py tests/unit/test_firestore_fake_contract.py -v -q — 12 passed.
  • GitHub checks after push: Backend unit suite, Hermetic Backend E2E, Public Developer API contract, Desktop Swift Build & Tests, Formatting, Hygiene, and Static Contracts all passed; irrelevant lanes skipped.
  • Final re-scan found no unresolved review threads.

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

test-only backend stabilization: Firestore fake update() contract for cron/KG promotion, CI green

@kodjima33
kodjima33 merged commit 90eef6d into main Jul 8, 2026
19 checks passed
@kodjima33
kodjima33 deleted the fix/cron-firestore-fake-update branch July 8, 2026 14:34
Git-on-my-level added a commit that referenced this pull request Jul 9, 2026
## Merge order & dependencies

| PR | Dependencies |
|----|--------------|
| 9250 | None — **merge first** (unblocks CI) |
| 9252 | None — parallel with #9253, #9254 |
| 9253 | None — parallel with #9252, #9254 |
| 9254 | None — parallel with #9252, #9253; **#9255 should merge after
this** |
| 9255 | Merge after #9254 (registers teardown tests). Merge after #9250
recommended. |
| 9256 | Independent code PR; **PR6b prod deploy** after merge. Related
#9255 not blocking. |
| 9257 | **Draft.** Merge after #9255 (workflow contract CI). |
| 9258 | **Draft.** Independent; merge after wave 1. |
| 9260 | **Draft.** Independent; merge after wave 1. |
| 9261 | **Draft.** Merge after wave 1; **PR10c** proxy routing
follow-up optional. |


## Summary
- Register `listen_pusher_pipeline` in `workflow_contracts.json`
including PR4 teardown test.
- Run `check_workflow_contracts.py` from pre-push and
`backend-checks.yml` static-contracts; extend detect-changes.

Related: #9194

## Test plan
```bash
cd backend && .venv/bin/python scripts/check_workflow_contracts.py
cd backend && .venv/bin/python -m pytest tests/unit/test_workflow_contracts.py -v
# 5 passed
```

Merge with a **regular merge** (no squash).

Closes #9238

Made with [Cursor](https://cursor.com)

<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/9255?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
Git-on-my-level added a commit that referenced this pull request Jul 9, 2026
## Merge order & dependencies

| PR | Dependencies |
|----|--------------|
| 9250 | None — **merge first** (unblocks CI) |
| 9252 | None — parallel with #9253, #9254 |
| 9253 | None — parallel with #9252, #9254 |
| 9254 | None — parallel with #9252, #9253; **#9255 should merge after
this** |
| 9255 | Merge after #9254 (registers teardown tests). Merge after #9250
recommended. |
| 9256 | Independent code PR; **PR6b prod deploy** after merge. Related
#9255 not blocking. |
| 9257 | **Draft.** Merge after #9255 (workflow contract CI). |
| 9258 | **Draft.** Independent; merge after wave 1. |
| 9260 | **Draft.** Independent; merge after wave 1. |
| 9261 | **Draft.** Merge after wave 1; **PR10c** proxy routing
follow-up optional. |


## Summary
- Wire `MCP_OAUTH_CLIENTS_JSON` / `MCP_OAUTH_CLAUDE_*` into
`runtime_env.yaml`, Helm secrets, and prod backend-listen values.
- Extend `smoke_mcp_chatgpt_review.py` authorize checks, add
`check_mcp_oauth_deploy_contract.py`, and gate `pre-deploy-check.sh`.
- Remove stale `("oauth_client_id", "omi")` automation fallback in
`MemoryExportService.swift`.

**Deploy follow-up (PR6b):** run backend-listen prod deploy +
`smoke_mcp` after merge (requires deploy credentials; not done in this
PR).

## Test plan
```bash
cd backend && .venv/bin/python scripts/check_mcp_oauth_deploy_contract.py
cd backend && .venv/bin/python -m pytest tests/unit/test_mcp_oauth.py -v -k claude
# 1 passed
```

Merge with a **regular merge** (no squash).

Closes #9149
Closes #8537

Made with [Cursor](https://cursor.com)

<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/9256?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
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.

Backend Unit Tests: cron promotion fails — Firestore test fake missing update()

2 participants