Repository navigation
fix(hume-ai): post emotion memories to served v2 integration route (#14340) - #14679
shuoYun114 wants to merge 1 commit into
Conversation
Git-on-my-level
left a comment
There was a problem hiding this comment.
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.pyregistersPOST /v2/integrations/{app_id}/user/memories(create_memories_via_integration) and serves no/v1/integrations/{app_id}/memoriesPOST, which confirms the 404 diagnosis in #14340. Payload compatibility also checks out:ExternalIntegrationCreateMemory(backend/models/integrations.py:41) takes optionaltextand doesn't forbid extra keys, so thetimestamp/emotionsfields pass through ignored and the route's text-or-memories validation is satisfied bytext. Bearer auth matches what the route expects. Minor pre-existing, non-blocking nit:uidis interpolated unquoted on line 276 while the notification path on line 228 usesquote(uid).plugins/test_hume_omi_memory_route.py— I ran this suite in a network-isolated container against this PR'sapp.py: all 3 checks pass (route pinned to/v2/integrations/{app_id}/user/memories?uid=…, dead v1 route gone, non-2xx still returnssuccess: False). It drives the realcreate_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— theplugin-hume-ai-omi-memory-route-testsentry is registered in bothlocalandcilanes, 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.
…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
110ec55 to
2dffc0d
Compare
|
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. |
|
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:
Before your next PR, please skim:
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! |
Failure-Class: none
Summary & Root Cause
Fixes #14340.
In
plugins/hume-ai/app.py,create_omi_memory()posted tohttps://api.omi.me/v1/integrations/{app_id}/memories?uid={uid}.However,
backend/routers/integration.pydoes not serve a/v1/integrations/{app_id}/memoriesendpoint; 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 currentupstream/main(93e9e8806ab9).Changes
plugins/hume-ai/app.py:create_omi_memory()from/v1/integrations/{app_id}/memoriesto/v2/integrations/{app_id}/user/memories.text,timestamp,emotions) and Bearer auth which the v2 route natively accepts.plugins/test_hume_omi_memory_route.py:/v2/integrations/{app_id}/user/memories?uid={uid}.success: False..github/checks-manifest.yaml:plugin-hume-ai-omi-memory-route-testsinlocalandcilanes.Verification
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 passedManifest Local Lane Gate:
$ python .github/scripts/run_checks.py --lane local --base upstream/main Manifest checks passed: 15 check(s).Diff Hygiene:
$ git diff --check # CleanPayout Details
TGKmfSUmt2dggErAo8BicaCoXhkMwLetxV1NkUnv23H65ZYJn64pseAcWRA6sJitxh2f[email protected]cc @kodjima33 @Git-on-my-level @josancamon19