Repository navigation
fix(zapier): send the create-memory request body - #13542
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Disable unmatched network access in tests and add the test suite to CI.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Fixes the Zapier Create Memory action by sending its request body and aligning input validation with the backend contract.
Changes:
- Replaces the empty async body with a declarative payload map.
- Requires valid source and geolocation inputs.
- Adds Nock regression tests and dependency updates.
File summaries
| File | Summary |
|---|---|
plugins/zapier/omi-zap/test/creates/create_memory.test.js |
Verifies complete and minimal request payloads. |
plugins/zapier/omi-zap/package.json |
Adds Nock for HTTP mocking. |
plugins/zapier/omi-zap/package-lock.json |
Locks Nock and related dependencies. |
plugins/zapier/omi-zap/creates/create_memory.js |
Defines request serialization and input validation. |
Review details
Files not reviewed (1)
- plugins/zapier/omi-zap/package-lock.json: Generated file
- Files reviewed: 3/4 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
All reported issues were addressed across 4 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
…eolocation Review feedback on BasedHardware#13542: nock only intercepts matching requests, so without disableNetConnect a URL or query drift would have POSTed to the live Modal endpoint instead of failing. Also adds the case where the geolocation carries only its required children (latitude/longitude are the contract's sole required fields) and the optional children must be absent from the posted body rather than nulled into it. Verified: npm test in plugins/zapier/omi-zap — 4 tests pass.
Review feedback on BasedHardware#13542: the new request-body regression tests were not discovered by any CI lane. Registers the suite in checks-manifest.yaml through a wrapper that reuses an installed dependency tree when it satisfies package.json and otherwise falls back to a lockfile-pinned npm ci, so the local lane needs no network once provisioned. Verified: python3 .github/scripts/run_checks.py --lane ci --check-id omi-zap-tests --base origin/main -> PASS; --lane local --list selects omi-zap-tests via plugins/zapier/omi-zap/** on this diff; .github/scripts/test_run_checks.py -> 52 passed.
|
Verified end to end — this is a complete, correct fix for the create-memory action. Per file:
Great first contribution — fix, regression coverage, and CI registration together fully close #13541. Since this adds a devDependency and registers a new CI check, those two surfaces need a human maintainer's sign-off before merge; both verified clean from my side. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
kodjima33
left a comment
There was a problem hiding this comment.
Legit zapier create-memory body fix with checks-manifest test wiring; holding at approve (dependency-review + workflow-review gate labels touch package-lock.json/checks-manifest.yaml) per standing policy to not auto-merge gated PRs.
32ffea0 to
de73cd1
Compare
…eolocation Review feedback on BasedHardware#13542: nock only intercepts matching requests, so without disableNetConnect a URL or query drift would have POSTed to the live Modal endpoint instead of failing. Also adds the case where the geolocation carries only its required children (latitude/longitude are the contract's sole required fields) and the optional children must be absent from the posted body rather than nulled into it. Verified: npm test in plugins/zapier/omi-zap — 4 tests pass.
Review feedback on BasedHardware#13542: the new request-body regression tests were not discovered by any CI lane. Registers the suite in checks-manifest.yaml through a wrapper that reuses an installed dependency tree when it satisfies package.json and otherwise falls back to a lockfile-pinned npm ci, so the local lane needs no network once provisioned. Verified: python3 .github/scripts/run_checks.py --lane ci --check-id omi-zap-tests --base origin/main -> PASS; --lane local --list selects omi-zap-tests via plugins/zapier/omi-zap/** on this diff; .github/scripts/test_run_checks.py -> 52 passed.
|
Re-verified after the rebase (head is now
by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
de73cd1 to
2906b06
Compare
…eolocation Review feedback on BasedHardware#13542: nock only intercepts matching requests, so without disableNetConnect a URL or query drift would have POSTed to the live Modal endpoint instead of failing. Also adds the case where the geolocation carries only its required children (latitude/longitude are the contract's sole required fields) and the optional children must be absent from the posted body rather than nulled into it. Verified: npm test in plugins/zapier/omi-zap — 4 tests pass.
Review feedback on BasedHardware#13542: the new request-body regression tests were not discovered by any CI lane. Registers the suite in checks-manifest.yaml through a wrapper that reuses an installed dependency tree when it satisfies package.json and otherwise falls back to a lockfile-pinned npm ci, so the local lane needs no network once provisioned. Verified: python3 .github/scripts/run_checks.py --lane ci --check-id omi-zap-tests --base origin/main -> PASS; --lane local --list selects omi-zap-tests via plugins/zapier/omi-zap/** on this diff; .github/scripts/test_run_checks.py -> 52 passed.
kodjima33
left a comment
There was a problem hiding this comment.
Genuine bug fix: create_memory's request body was a dead async function that never returned, so every Zap POSTed an empty body and 422'd against the backend model. Root cause verified, replaced with correct declarative body map, CI green, hermetic tests added.
|
Keeping this open on DIRTY zapier create-memory request body + tests; kodjima APPROVE ≠ merge while conflicting. kodjima APPROVE is the size gate, not maintainer merge. I am not approving or merging this SHA. |
|
Zapier — Astar, on behalf of @aryanorastar |
The Create Memory action's request shorthand held `body` as an async
function that never returned, so Zapier's request pipeline received
undefined and every Zap run POSTed /zapier/action/memories with an
empty body — rejected 422 because `text` and `source` are required by
ZapierActionCreateConversation (plugins/zapier/models.py).
Replace the dead function with the shorthand's declarative body map so
each declared input field reaches the wire; zapier-platform-core
substitutes whole-value {{bundle.inputData.*}} references with their
raw values and removeMissingValuesFrom.body drops unsupplied
optionals.
Tests: new nock-based regression test intercepts the POST and asserts
the input fields land in the JSON body while unset optionals are
omitted; it failed before the fix (request arrived with no body) and
passes after. `npm test` in plugins/zapier/omi-zap: 3 tests, 2 suites
green.
Failure-Class: none
With the body now actually sent, a Zap configured without a required key still 422s: source has no backend default, and Geolocation needs latitude/longitude (backend/models/geolocation.py). Mark all three required at the form boundary and expose the `message` source value the backend accepts but the Zap could not select. Tests: nock regression test now asserts the whole posted body, including a whole-value geolocation object and finished_at. `npm test` in plugins/zapier/omi-zap: 3 tests, 2 suites green. Failure-Class: none
…eolocation Review feedback on BasedHardware#13542: nock only intercepts matching requests, so without disableNetConnect a URL or query drift would have POSTed to the live Modal endpoint instead of failing. Also adds the case where the geolocation carries only its required children (latitude/longitude are the contract's sole required fields) and the optional children must be absent from the posted body rather than nulled into it. Verified: npm test in plugins/zapier/omi-zap — 4 tests pass.
Review feedback on BasedHardware#13542: the new request-body regression tests were not discovered by any CI lane. Registers the suite in checks-manifest.yaml through a wrapper that reuses an installed dependency tree when it satisfies package.json and otherwise falls back to a lockfile-pinned npm ci, so the local lane needs no network once provisioned. Verified: python3 .github/scripts/run_checks.py --lane ci --check-id omi-zap-tests --base origin/main -> PASS; --lane local --list selects omi-zap-tests via plugins/zapier/omi-zap/** on this diff; .github/scripts/test_run_checks.py -> 52 passed.
2906b06 to
75cdff6
Compare
|
Rebased onto current main (e9ece01). The only conflict was in .github/checks-manifest.yaml — upstream added a block of new check entries; ours is appended after them. omi-zap-tests and the manifest self-tests pass locally on the new head. |
aryanorastar
left a comment
There was a problem hiding this comment.
Create Memory on main still uses an async body that never returns, so the POST to /zapier/action/memories goes out empty and 422s. 75cdff696a6e sends the declarative map (text, source, language, times, geolocation). source is required and includes message; latitude/longitude are required only inside the optional geolocation group. That matches ZapierActionCreateConversation and Geolocation.
Hygiene on this SHA ran omi-zap-tests and passed both Jest files. nock is dev-only. The manifest only appends that check. The two queued Desktop Swift jobs do not touch these files.
Not merging. kodjima’s approval is on 2906b06, not this head. #14369 is a later mixed copy and stays open.
|
The Zapier create-memory body is still empty on main. Hygiene is green on — Astar, on behalf of @aryanorastar |
kodjima33
left a comment
There was a problem hiding this comment.
Genuine bug fix (dead async body -> 422 on every Zap run), scoped diff, CI green, tests added, trusted reviewer aryanorastar confirmed — confidence 5/5, merging.
Summary
The Create Memory Zapier action could never work: its request shorthand defined
bodyas anasyncfunction that never returned, so Zapier's request pipeline resolved it toundefinedand every Zap runPOSTed/zapier/action/memorieswith an empty body — rejected with HTTP 422 becausetextandsourceare required byZapierActionCreateConversation(plugins/zapier/models.py).Replaced the dead function with the shorthand's declarative body map covering every declared input field (
text,source,language,started_at,finished_at,geolocation).zapier-platform-coresubstitutes whole-value{{bundle.inputData.*}}references with their raw values (objects survive as objects), andremoveMissingValuesFrom.bodydrops unsupplied optionals.The same PR closes the residual 422 paths the now-live body exposed:
sourcehas no backend default andGeolocationrequireslatitude/longitude(backend/models/geolocation.py), so those fields are nowrequiredat the Zap form boundary; themessagevalue the backend accepts is now selectable.Test plan
finished_at, and a whole-valuegeolocationobject — plus that unset optionals are omitted. It fails on the old code (request arrived with no body) and passes after.npm testinplugins/zapier/omi-zap: 3 tests, 2 suites green (jest --testTimeout 10000, parallel and--runInBandboth verified).audio_transcript/message/other_text), and the required/optional split verified againstZapierActionCreateConversationinplugins/zapier/models.py,ExternalIntegrationConversationSourceinbackend/models/conversation_enums.py,Geolocationinbackend/models/geolocation.py, and the handler inplugins/zapier/conversation_created.py— these are the external source for the rewritten test's expectations.Notes: the replaced placeholder test made a live network call; the new tests are hermetic. No CI lane currently discovers this package's jest tests — they run via
npm testin the package directory. Could not exercise a real Zapier run (no app deployment/credentials); the test drives the action throughappTesterand the realzapier-platform-coreHTTP pipeline against a mocked endpoint.Failure-Class: none
Closes #13541