Skip to content

Keep WooCommerce order lists small and state weclapp's sort syntax - #1619

Merged
helpcodeai merged 2 commits into
mainfrom
fix/woocommerce-weclapp-hints
Nov 10, 2026
Merged

helpcodeai merged 2 commits into
mainfrom
fix/woocommerce-weclapp-hints

Conversation

@helpcodeai

Copy link
Copy Markdown
Contributor

Summary

Two adapter definitions led models into slow or failing calls on Cloud (2026-11-09 daily check):

  • WooCommerce list_orders returns complete orders. At per_page 100 that is 5 to 9 MB per call: one workspace made 180 such calls in a day (865 MB, 8.2 s each on average) and 21 of the day's 104 event-loop stalls over 1 s came right after its bursts; another workspace timed out at 31 to 38 s. The tool offered no way to trim the response and no page-size guidance.
  • weclapp sort only said "Sort field, prefix with '-' for descending". Models sent invoiceDate:desc or fields the record does not have (bookingDate on stock movements), about 25 of 53 weclapp errors across 8 workspaces.

Changes

  • intl/woocommerce.json: woocommerce_list_orders and woocommerce_search_products get WordPress's _fields query parameter (optional, empty = complete records, so nothing changes for existing callers) and a per_page description that recommends 20 to 50. list_orders says to read one complete order with woocommerce_get_order.
  • de/weclapp.json: the sort description on all 25 list tools states the syntax (bare field name, - for descending), says field:desc fails, and gives an example that exists on that record (-invoiceDate for invoices, -postingDate for stock movements, -createdDate elsewhere).

Cloud and self-hosted behave the same. The new _fields parameter changes endpointMapping, so installed WooCommerce connectors get it after "Apply update"; the descriptions sync on their own.

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)

Definition-only change; the static catalog specs cover it. From the repo root: node scripts/validate-adapters.mjs --warn (no new warning for these tools), node scripts/regenerate-catalog.mjs (catalog.ts unchanged), node scripts/adapter-count.mjs --check (OK, 730 adapters). In packages/backend: npx jest src/adapters/de/weclapp.spec.ts and the WooCommerce static specs pass; the full suite runs in CI (local Prisma client was out of date for unrelated suites).

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) (CI)
  • This PR has a descriptive title

Related Issues

Found in the 2026-11-10 daily check (Cloud tool errors and event-loop stalls).

@helpcodeai
helpcodeai requested a review from D3nisty as a code owner November 10, 2026 08:26
@helpcodeai
helpcodeai merged commit 05b5694 into main Nov 10, 2026
16 checks passed
@helpcodeai
helpcodeai deleted the fix/woocommerce-weclapp-hints branch November 10, 2026 09:29
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 10, 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