fix(data-api): wrap Postgres counterparty drilldowns#4959
Conversation
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
metagraphed-data-api | bed0d1c | Jul 12 2026, 03:30 PM |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4959 +/- ##
=======================================
Coverage 97.94% 97.94%
=======================================
Files 163 163
Lines 19431 19433 +2
Branches 7381 7382 +1
=======================================
+ Hits 19031 19033 +2
Misses 53 53
Partials 347 347
🚀 New features to boost your workflow:
|
|
Caution 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥 🛑 Gittensory review result - fixes requiredReview updated: 2026-07-12 15:03:15 UTC
🛑 Suggested Action - Manual Review
Review summary Blockers
Nits — 5 non-blocking
Why this is blocked
CI checks failing
Review context
Contributor next steps
Signal definitions
[BETA] Chat with GittensoryAsk Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
…ty wrap codecov/patch flagged the transfer_count===0 branch of the new counterparties-array wrapping as only partially covered (patch coverage 66.67%) -- the existing test only exercised a populated relationship.
c74b273 to
bed0d1c
Compare
Motivation
relationshipobject, while the public handler expects the D1 loader's envelope with a nestedrelationshipproperty, causing a TypeError and a 500 for public unauthenticated requests when Postgres is enabled.Description
workers/data-api.mjsto the D1-compatible envelope includingcounterpartiesand the nestedrelationshipobject sodata.relationship.last_seen_atis safe to dereference.buildCounterpartiesunchanged.tests/data-api.test.mjsto assert the wrapped counterparty drilldown envelope shape and expected fields.tests/request-handlers-entities.test.mjsto verify the public handler accepts a Postgres-sourced relationship envelope and does not fall back to D1.Testing
npx vitest run tests/data-api.test.mjs tests/request-handlers-entities.test.mjs --testNamePattern "counterparties|handleAccountCounterparties", which completed successfully with the relevant tests passing.npm run format:check(prettier --check) which reported no style issues.git diff --checkreported no whitespace errors.Codex Task