Skip to content

ci(backend): wire listen/pusher workflow contracts - #9255

Merged
Git-on-my-level merged 3 commits into
mainfrom
fix/workflow-contracts-listen-pusher
Jul 9, 2026
Merged

Git-on-my-level merged 3 commits into
mainfrom
fix/workflow-contracts-listen-pusher

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

  • 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

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

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 5 files

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: 0f7738f60b

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

"tests/unit/test_pusher_conversation_retry.py",
"tests/unit/test_transcribe_decisions.py",
"tests/unit/utils/test_listen_pusher_session.py",
"tests/unit/test_transcribe_teardown_flush.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 Point the teardown contract at an existing test

This manifest lists tests/unit/test_transcribe_teardown_flush.py, but I checked git ls-files for test_transcribe_teardown_flush.py / teardown_flush and no such test exists. Since select_backend_unit_tests.workflow_contract_tests_for_path() silently keeps only manifest tests present in all_tests, listen/pusher source changes will drop this PR4 teardown coverage instead of running it; point this entry at the actual test or add the missing file.

Useful? React with 👍 / 👎.

Git-on-my-level and others added 2 commits July 8, 2026 11:17
Add listen_pusher_pipeline to workflow_contracts.json with hermetic
contract tests, run check_workflow_contracts.py from pre-push and the
backend-checks static-contracts job, and extend detect-changes so manifest
edits trigger the checker.

Closes #9238

Related #9194

Verification: cd backend && python3 scripts/check_workflow_contracts.py
  cd backend && python3 -m pytest tests/unit/test_workflow_contracts.py -v
Co-authored-by: Cursor <[email protected]>
The 'Check workflow contracts' step was gated only on
has_backend_workflow_contracts, which matches infrastructure files
(manifest, checker, CI config) but not contracted source files. Editing
a contracted source like projection_repair.py would skip the contract
check. Also trigger on has_backend_async_gate (any backend/*.py change)
so the checker runs when contracted sources are edited.
@Git-on-my-level
Git-on-my-level force-pushed the fix/workflow-contracts-listen-pusher branch from 0f7738f to 984f609 Compare July 8, 2026 04:19
@Git-on-my-level

Copy link
Copy Markdown
Member Author

test_transcribe_teardown_flush.py is a deliberate forward reference: it is created by #9254, and this PR's body documents "#9255 should merge after #9254." The workflow_contract_tests_for_path() silent-drop is the intended graceful behavior for the pre-#9254 state — once #9254 lands, the test is picked up automatically.

@Git-on-my-level

Copy link
Copy Markdown
Member Author

Monitor run summary

Fixed (Thread 1 — detect-changes/action.yml:85): The Check workflow contracts CI step was gated only on has_backend_workflow_contracts, which matches infrastructure files (manifest, checker, CI config) but not contracted source files. A source-only change to a contracted path (e.g. backend/database/projection_repair.py) would skip the contract check. Added has_backend_async_gate to the step condition so the checker runs for any backend/*.py change.

Not actionable (Thread 2 — workflow_contracts.json:204): test_transcribe_teardown_flush.py is a deliberate forward reference to #9254 (merge order documented in the PR body). The silent-drop behavior is the intended graceful state until #9254 lands; no change needed.

Prior CI failure: test_canary_route_enforces_partial_rollout_percentage exceeded the fast-unit duration guard (0.14s > 0.12s). Pre-existing flake unrelated to this PR — passed on re-run.

Verification:

  • python3 backend/scripts/check_workflow_contracts.py — passed
  • pytest tests/unit/test_workflow_contracts.py -v — 5 passed
  • YAML lint on backend-checks.yml — valid
  • All 13 CI checks green (Backend unit suite, Static Contracts, Hermetic E2E, Build, Formatting, Hygiene, Frontend Lint, Rust Backend, Desktop Swift, Agent Runtime, Android Compile, Public API contract, Generated Files)

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

listen/pusher workflow contracts — approve; modifies .github/workflows (CI supply-chain) so not auto-merging

@Git-on-my-level

Copy link
Copy Markdown
Member Author

@cursor resolve merge conflicts

@cursor

cursor Bot commented Jul 9, 2026 •

Copy link
Copy Markdown

Merge conflicts are resolved and pushed.

Conflict: .github/actions/detect-changes/action.yml — our branch added has_backend_workflow_contracts; main added agent-logic-harness to the desktop agent runtime trigger.

Resolution: Kept both:

  • has_backend_workflow_contracts (this PR)
  • has_desktop_agent_runtime with agent-logic-harness (from main)

backend/testing/workflow_contracts.json merged cleanly.

Verification:

  • python scripts/check_workflow_contracts.py — passed
  • pytest tests/unit/test_workflow_contracts.py — 5 passed

Pushed merge commit f94de82c4 to fix/workflow-contracts-listen-pusher. CI should rerun on the updated branch.

Open in Web Open in Cursor 

Resolve detect-changes conflict: keep has_backend_workflow_contracts from
this branch and agent-logic-harness trigger from main.

Co-authored-by: David Zhang <[email protected]>
@Git-on-my-level
Git-on-my-level merged commit 009f048 into main Jul 9, 2026
20 checks passed
@Git-on-my-level
Git-on-my-level deleted the fix/workflow-contracts-listen-pusher branch July 9, 2026 03:33
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.

Listen/pusher pipeline missing from workflow_contracts.json and CI static checker

3 participants