Skip to content

fix(hume-ai): post emotion memories to served v2 integration route (#14340) - #14679

Closed
shuoYun114 wants to merge 1 commit into
BasedHardware:mainfrom
shuoYun114:fix/hume-ai-memories-v2-route
Closed

shuoYun114 wants to merge 1 commit into
BasedHardware:mainfrom
shuoYun114:fix/hume-ai-memories-v2-route

Conversation

@shuoYun114

@shuoYun114 shuoYun114 commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Failure-Class: none

Summary & Root Cause

Fixes #14340.

In plugins/hume-ai/app.py, create_omi_memory() posted to https://api.omi.me/v1/integrations/{app_id}/memories?uid={uid}.
However, backend/routers/integration.py does not serve a /v1/integrations/{app_id}/memories endpoint; the backend only registers the v2 import route:
POST /v2/integrations/{app_id}/user/memories (create_memories_via_integration).
Every attempt to save emotion-derived memories failed with HTTP 404 ({"detail":"Not Found"}), silently dropping emotion memories in production.

This issue and fix was reviewed with Confidence 5/5 by @kodjima33 and verified by @Git-on-my-level on #14499 (Confidence 5/5 (fixes #14340, scoped, tests added, no CI failures) but mergeStateStatus is UNKNOWN/DIRTY — approve only, do not merge). The previous author abandoned the branch without rebasing onto current main. This PR delivers the clean, tested fix rebased directly on current upstream/main (93e9e8806ab9).


Changes

  1. plugins/hume-ai/app.py:

    • Update target endpoint in create_omi_memory() from /v1/integrations/{app_id}/memories to /v2/integrations/{app_id}/user/memories.
    • Preserves exact payload shape (text, timestamp, emotions) and Bearer auth which the v2 route natively accepts.
  2. plugins/test_hume_omi_memory_route.py:

    • 100% hermetic stdlib-only test suite with mocked Hume SDK and httpx client.
    • Asserts route pinning to /v2/integrations/{app_id}/user/memories?uid={uid}.
    • Asserts dead v1 route is never hit.
    • Asserts non-2xx error handling preserves success: False.
  3. .github/checks-manifest.yaml:

    • Register plugin-hume-ai-omi-memory-route-tests in local and ci lanes.

Verification

  1. Hermetic Suite:

    $ python plugins/test_hume_omi_memory_route.py
    PASS route pinned: https://api.omi.me/v2/integrations/app_x/user/memories?uid=u1
    PASS dead v1 route no longer used
    PASS non-2xx still reported as failure
    
    3 checks passed
  2. Manifest Local Lane Gate:

    $ python .github/scripts/run_checks.py --lane local --base upstream/main
    Manifest checks passed: 15 check(s).
  3. Diff Hygiene:

    $ git diff --check
    # Clean

Payout Details

  • USDT (TRC20): TGKmfSUmt2dggErAo8BicaCoXhkMwLetxV
  • Bitcoin (BTC): 1NkUnv23H65ZYJn64pseAcWRA6sJitxh2f
  • Email: [email protected]

cc @kodjima33 @Git-on-my-level @josancamon19

Review in cubic

@Git-on-my-level Git-on-my-level left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @shuoYun114 — verified end to end; the fix itself is correct and properly tested. The open question on this PR is coordination, not code.

Technical verification (checked against upstream/main @ 93e9e880):

  • plugins/hume-ai/app.py — the one-line route change is correct. backend/routers/integration.py registers POST /v2/integrations/{app_id}/user/memories (create_memories_via_integration) and serves no /v1/integrations/{app_id}/memories POST, which confirms the 404 diagnosis in #14340. Payload compatibility also checks out: ExternalIntegrationCreateMemory (backend/models/integrations.py:41) takes optional text and doesn't forbid extra keys, so the timestamp/emotions fields pass through ignored and the route's text-or-memories validation is satisfied by text. Bearer auth matches what the route expects. Minor pre-existing, non-blocking nit: uid is interpolated unquoted on line 276 while the notification path on line 228 uses quote(uid).
  • plugins/test_hume_omi_memory_route.py — I ran this suite in a network-isolated container against this PR's app.py: all 3 checks pass (route pinned to /v2/integrations/{app_id}/user/memories?uid=…, dead v1 route gone, non-2xx still returns success: False). It drives the real create_omi_memory() through a capturing fake httpx client with the Hume SDK stubbed — genuinely hermetic, no network, no keys. The _load_plugin_app()/_load_app() wrapper pair at the bottom is redundant indirection; cosmetic only.
  • .github/checks-manifest.yaml — the plugin-hume-ai-omi-memory-route-tests entry is registered in both local and ci lanes, and this PR's own Hygiene CI job log shows the check being selected and passing (0.21s), so the registered test genuinely runs in CI rather than only on a contributor machine.

Coordination — maintainer decision needed. This is now the third open PR fixing #14340 with substantially the same change:

  • #14342 (Suyann) — approved by kodjima33 on 09-17, re-approved on 09-18 (its test lives at plugins/hume-ai/test_create_omi_memory_route.py).
  • #14499 (tluangtea-lab) — approved by kodjima33 on 09-18 with an explicit "approve only, do not merge" note.
  • this PR — opened after both of those approvals; the issue thread also records a bounty-lock claim and a counter-note that #14342 already covers the fix.

The code across the three is equivalent, so exactly one should land and the others should be closed with credit to their authors — that pick is a maintainer call, not an automated one. The payout addresses in the PR description are bounty logistics and likewise a maintainer decision, outside review scope. If maintainers do choose this PR, it is technically merge-ready pending the two in-flight Desktop Swift checks.

Leaving for human maintainer review: the decision needed here is which of the three duplicate PRs for #14340 lands (and the attached bounty), not the correctness of this diff.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@Git-on-my-level Git-on-my-level added needs-maintainer-review Needs a human maintainer to sign off before merge python labels Sep 19, 2026

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

5/5: clean rebase of previously-approved fix for #14340 (dead v1 memories route, backend only serves v2); CI all green, not yet fixed on main.

…asedHardware#14340)

- Point create_omi_memory target URL to /v2/integrations/{app_id}/user/memories which is served by backend integration router
- Add hermetic regression test suite in test_hume_omi_memory_route.py asserting route pinning and failure handling
- Register plugin-hume-ai-omi-memory-route-tests in checks-manifest.yaml across local and ci lanes
@shuoYun114
shuoYun114 force-pushed the fix/hume-ai-memories-v2-route branch from 110ec55 to 2dffc0d Compare September 20, 2026 10:22
@aryanorastar

Copy link
Copy Markdown
Collaborator

Closing as duplicate of already-landed #14342.

origin/main already POSTs to /v2/integrations/{app_id}/user/memories and already has hermetic coverage at plugins/hume-ai/test_create_omi_memory_route.py (hume-ai-create-memory-route-tests). This PR does not change plugins/hume-ai/app.py; it only adds a second test file at plugins/test_hume_omi_memory_route.py plus a second manifest id.

Issue #14340 is closed.

@github-actions

Copy link
Copy Markdown
Contributor

Hey @shuoYun114 👋

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-maintainer-review Needs a human maintainer to sign off before merge python

Projects

None yet

5 participants