fix(agent): always fetch latest custom tool from DB when customToolId is present #10059
ci.yml
on: pull_request
Detect Version
0s
Test and Build
/
Test and Build
1m 18s
Check Docs Changes
0s
Matrix: Build AMD64
Matrix: Build ARM64 (GHCR Only)
Process Docs
/
Process Documentation Embeddings
Matrix: Create GHCR Manifests
Create GitHub Release
Annotations
5 errors and 2 warnings
|
Test and Build / Test and Build
Process completed with exit code 1.
|
|
Test and Build / Test and Build
sim#test: command (/home/runner/_work/sim/sim/apps/sim) /home/runner/.bun/bin/bun run test exited (1)
|
|
executor/handlers/agent/agent-handler.test.ts > AgentBlockHandler > execute > customToolId resolution - DB as source of truth > should use DB code for executeFunction when customToolId resolves:
apps/sim/executor/handlers/agent/agent-handler.test.ts#L2172
AssertionError: expected "spy" to be called with arguments: [ 'function_execute', …(3) ]
Received:
1st spy call:
[
"function_execute",
- ObjectContaining {
- "code": "if (channel === \"whatsapp\") { return JSON.stringify({ type: \"button\", phone: sender_id, header: header_value, body: body_value, buttons: button_array }); }",
+ {
+ "_context": {
+ "isDeployedContext": undefined,
+ "userId": undefined,
+ "workflowId": "test-workflow",
+ "workspaceId": undefined,
+ },
+ "blockData": {},
+ "blockNameMapping": {},
+ "blockOutputSchemas": {},
+ "channel": "whatsapp",
+ "code": "return JSON.stringify({ type: \"button\", phone: sender_id, header: header_value, body: body_value, buttons: button_array });",
+ "envVars": {},
+ "isCustomTool": true,
+ "sender_id": "123",
+ "timeout": 5400000,
+ "workflowVariables": {},
},
false,
- Any<Object>,
+ {
+ "activeExecutionPath": Set {},
+ "blockLogs": [],
+ "blockStates": Map {},
+ "completedLoops": Set {},
+ "decisions": {
+ "condition": Map {},
+ "router": Map {},
+ },
+ "environmentVariables": {},
+ "executedBlocks": Set {},
+ "loopExecutions": Map {},
+ "metadata": {
+ "duration": 0,
+ "startTime": "2026-02-12T19:15:26.359Z",
+ },
+ "workflow": {
+ "blocks": [],
+ "connections": [],
+ "loops": {},
+ "version": "1.0.0",
+ },
+ "workflowId": "test-workflow",
+ },
]
Number of calls: 1
❯ executor/handlers/agent/agent-handler.test.ts:2172:33
|
|
executor/handlers/agent/agent-handler.test.ts > AgentBlockHandler > execute > customToolId resolution - DB as source of truth > should fetch from DB when customToolId has no inline schema:
apps/sim/executor/handlers/agent/agent-handler.test.ts#L2066
AssertionError: expected +0 to be 1 // Object.is equality
- Expected
+ Received
- 1
+ 0
❯ executor/handlers/agent/agent-handler.test.ts:2066:30
|
|
executor/handlers/agent/agent-handler.test.ts > AgentBlockHandler > execute > customToolId resolution - DB as source of truth > should always fetch latest schema from DB when customToolId is present:
apps/sim/executor/handlers/agent/agent-handler.test.ts#L2037
AssertionError: expected [ 'sender_id', 'header_value', …(2) ] to include 'channel'
❯ executor/handlers/agent/agent-handler.test.ts:2037:46
|
|
Test and Build / Test and Build
Skipping sticky disk commit due to previous step failures
|
|
Test and Build / Test and Build
Found 2 failed/cancelled steps in previous workflow steps
|