Skip to content

Commit aae3cc3

Browse files
authored
Fix Etsy listing includes, Telegram getUpdates timeout, Odoo message_post hint (#1324)
Co-authored-by: helpcode.ai <[email protected]>
1 parent 60eec8a commit aae3cc3

6 files changed

Lines changed: 30 additions & 4 deletions

File tree

‎packages/backend/src/adapters/intl/etsy.json‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,8 @@
378378
},
379379
"includes": {
380380
"type": "string",
381-
"description": "Optional extra data, comma-separated, any of: Images, Shop, User, Translations, Videos, Personalization, BuyerPrice. Etsy rejects anything else: inventory (SKUs, quantities, prices per variation) is not available here, and shipping comes with the shop's shipping profiles, not with the listing."
381+
"description": "Optional extra data, comma-separated, any of: Images, Shop, User, Translations, Videos, Personalization, BuyerPrice. Etsy answers 400 to anything else, Inventory included: for SKUs, quantities and prices per variation call etsy_read_listing_inventory. Shipping comes with the shop's shipping profiles, not with the listing.",
382+
"pattern": "^(Images|Shop|User|Translations|Videos|Personalization|BuyerPrice)(,(Images|Shop|User|Translations|Videos|Personalization|BuyerPrice))*$"
382383
}
383384
},
384385
"required": [
@@ -405,7 +406,8 @@
405406
},
406407
"includes": {
407408
"type": "string",
408-
"description": "Optional extra data, comma-separated, any of: Images, Shop, User, Translations, Videos, Personalization, BuyerPrice. Etsy rejects anything else: inventory (SKUs, quantities, prices per variation) is not available here, and shipping comes with the shop's shipping profiles, not with the listing."
409+
"description": "Optional extra data, comma-separated, any of: Images, Shop, User, Translations, Videos, Personalization, BuyerPrice. Etsy answers 400 to anything else, Inventory included: for SKUs, quantities and prices per variation call etsy_read_listing_inventory. Shipping comes with the shop's shipping profiles, not with the listing.",
410+
"pattern": "^(Images|Shop|User|Translations|Videos|Personalization|BuyerPrice)(,(Images|Shop|User|Translations|Videos|Personalization|BuyerPrice))*$"
409411
},
410412
"currency": {
411413
"type": "string",

‎packages/backend/src/adapters/intl/etsy.live.spec.ts‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,22 @@ describe('etsy adapter — static spec conformance', () => {
4040
* in Etsy's OpenAPI spec. The adapter had `/active` appended and got 404
4141
* "Resource not found" on all 37 calls (19 workspaces, 8-22 Oct 2026).
4242
*/
43+
/**
44+
* getListing accepts only these includes. Models kept asking for
45+
* includes=Inventory and got 400 on every call (22 in 6 workspaces on
46+
* 28 Oct 2026); inventory has its own tool.
47+
*/
48+
it('limits listing includes to the values Etsy accepts', () => {
49+
for (const name of ['etsy_get_listing', 'etsy_get_listings_by_ids']) {
50+
const tool = (adapter as any).tools.find((t: any) => t.name === name);
51+
const includes = new RegExp(tool.parameters.properties.includes.pattern);
52+
expect(includes.test('Images,Shop')).toBe(true);
53+
expect(includes.test('Images,Inventory')).toBe(false);
54+
expect(includes.test('Inventory')).toBe(false);
55+
expect(tool.parameters.properties.includes.description).toContain('etsy_read_listing_inventory');
56+
}
57+
});
58+
4359
it('lists a shop section with the path from the Etsy OpenAPI spec', () => {
4460
const tool = (adapter as any).tools.find((t: any) => t.name === 'etsy_get_listings_by_shop_section');
4561
expect(tool.endpointMapping.path).toBe('/shops/{shop_id}/shop-sections/listings');

‎packages/backend/src/adapters/intl/odoo.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@
472472
},
473473
"ids": {
474474
"type": "array",
475-
"description": "Record ids the method operates on. Use [] for model-level methods such as name_search or create. Many workflow actions handle one record at a time and fail with \"Expected singleton\" on several ids: then call the method once per id.",
475+
"description": "Record ids the method operates on. Use [] for model-level methods such as name_search or create. Many workflow actions handle one record at a time and fail with \"Expected singleton\" on several ids, message_post (a chatter message or note) among them: call those once per id.",
476476
"items": {
477477
"type": "number"
478478
}

‎packages/backend/src/adapters/intl/odoo.live.spec.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ describe('odoo adapter — static spec conformance', () => {
6464
expect(call?.parameters.properties.kwargs.description).toContain('{"vals": {...}}');
6565
expect(call?.parameters.properties.kwargs.description).toContain('vals_list');
6666
expect(call?.parameters.properties.ids.description).toContain('Expected singleton');
67+
expect(call?.parameters.properties.ids.description).toContain('message_post');
6768
});
6869

6970
it("ships both a generic search_read and the common wrappers", () => {

‎packages/backend/src/adapters/intl/telegram-bot.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@
464464
"properties": {
465465
"offset": { "type": "integer", "description": "Return updates with update_id >= this value. Pass last_seen_id+1 to ack prior batch." },
466466
"limit": { "type": "integer", "description": "Max updates 1-100 (default 100)." },
467-
"timeout": { "type": "integer", "description": "Long-poll wait in seconds 0-50 (default 0 = short poll). Don't use long timeouts in a request/response MCP." },
467+
"timeout": { "type": "integer", "minimum": 0, "maximum": 25, "description": "Long-poll wait in seconds 0-25 (default 0 = short poll). The call is cut off after 30 s, so a longer wait fails instead of returning updates." },
468468
"allowed_updates": { "type": "array", "description": "Update types to receive, e.g. ['message','callback_query']. Omit for all except chat_member." }
469469
}
470470
},

‎packages/backend/src/adapters/intl/telegram-bot.live.spec.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ describe('telegram-bot adapter — static spec conformance', () => {
3232
expect(a.connector.authType).toBe('NONE');
3333
});
3434

35+
it('caps the getUpdates long poll below the 30 s request timeout', () => {
36+
const t = a.tools.find((x) => x.name === 'telegram_bot_get_updates')! as unknown as {
37+
parameters: { properties: { timeout: { maximum: number } } };
38+
};
39+
expect(t.parameters.properties.timeout.maximum).toBe(25);
40+
});
41+
3542
it('downloads a file from the /file/bot<token>/ host path, not the method path', () => {
3643
const download = a.tools.find((t) => t.name === 'telegram_bot_download_file')!;
3744
expect(download.endpointMapping).toEqual({

0 commit comments

Comments
 (0)