Skip to content

Fix Falabella order filters, Substack cursor paging and empty Gemini answers - #1628

Merged
helpcodeai merged 2 commits into
mainfrom
fix/adapter-enums-substack-cursor
Nov 11, 2026
Merged

helpcodeai merged 2 commits into
mainfrom
fix/adapter-enums-substack-cursor

Conversation

@helpcodeai

Copy link
Copy Markdown
Contributor

Summary

Three adapter bugs seen in Cloud tool errors on 11-10, all in the adapter JSON we ship.

  • Falabella Seller Center get_orders: the sort_by enum offered createdat / updatedat and the status enum readytoship. Falabella refuses them (E075: Invalid sort filter on 6 of 6 calls, E036: Invalid status filter on 3 of 3). The GetOrders reference documents created_at / updated_at and pending, canceled, ready_to_ship, delivered, returned, shipped, failed.
  • Substack list and search: Substack changed its archive endpoint. It now answers { posts, nextCursor } instead of an array, refuses any offset (even 0) and refuses limit above 25. Our excludes ([*].body_html …) no longer matched, so full post bodies went back to the model, and every second-page call failed. Checked live on three publications today.
  • Gemini generate_text / generate_content / analyze_file_url: a candidate without content.parts (safety stop, empty answer) made join() fail on null, and the raw response went back unshaped (about once a day).

Changes

  • falabella-seller-center.json: correct sort_by and status enums (adds failed).
  • substack.json: limit maximum 25, offset replaced by cursor (the previous nextCursor), excludes now under posts[*], descriptions and instructions explain the new paging.
  • gemini.json: join('', … .text || \[]`)` in the three mappings.
  • Specs: enum check for Falabella; Substack shape, cursor and limit checks (static) and the live smoke test moved to the new shape; Gemini mapping without parts.

Description and instruction changes sync on their own. The parameter changes (Substack cursor, the enums) are structural, so installed connectors get them after "Apply update"; new installs get them at once.

Type

  • Bug fix
  • New feature
  • Documentation
  • Refactoring
  • Performance improvement
  • Other (describe below)

Testing

  • Added/updated unit tests
  • Tested manually (describe steps below)
  • No tests needed (explain why)

In packages/backend (Prisma client generated in the worktree):

  • npx jest src/adapters/intl/substack src/adapters/intl/gemini src/adapters/intl/falabella-seller-center: 4 suites, 71 passed (8 live tests skipped).
  • RUN_SUBSTACK_LIVE=1 npx jest src/adapters/intl/substack: 25 passed against lennysnewsletter.com.
  • npx eslint on the three specs: clean.
    From the root: node scripts/validate-adapters.mjs --warn (no warning for these adapters), node scripts/regenerate-catalog.mjs (no diff), node scripts/adapter-count.mjs --check OK.

Checklist

  • My code follows the existing code style
  • I have tested my changes locally
  • I have updated documentation (if applicable)
  • All existing tests pass (npm test) (adapter suites locally, full suite in CI)
  • This PR has a descriptive title

Same behaviour in Cloud and self-hosted.

Related Issues

None (found in the 11-11 daily check).

@helpcodeai
helpcodeai requested a review from D3nisty as a code owner November 11, 2026 08:27
@helpcodeai
helpcodeai merged commit af50dfd into main Nov 11, 2026
16 checks passed
@helpcodeai
helpcodeai deleted the fix/adapter-enums-substack-cursor branch November 11, 2026 08:47
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant