Commit a051c81
authored
🤖 ci: improve integration test reliability (#1085)
## Summary
Fix flaky integration tests for image handling and MCP screenshot
functionality.
## Changes
### Image Test Fix (`sendMessage.images.test.ts`)
- **Use 8-bit RGB PNGs instead of 1-bit indexed**: The original PNGs
were using 1-bit colormap encoding which may not be properly processed
by vision APIs. Now using explicit `-define png:color-type=2` for proper
8-bit per channel RGB encoding.
- **Increase image size**: Changed from 1x1 to 4x4 pixels for more
reliable vision model processing
- **Better prompts**: Updated to explicitly describe the solid-color
image and request just the color name
- **Add debug logging**: Added logging when `sendMessage` fails to help
diagnose future CI failures
- **Both RED_PIXEL and BLUE_PIXEL fixtures updated** to use proper RGB
encoding
### MCP Screenshot Test Fix (`mcpConfig.test.ts`)
- **More directive prompts**: Changed prompts to explicitly specify the
tool names that MUST be used (`chrome_navigate_page`,
`chrome_take_screenshot`)
- **Add diagnostic logging**: When screenshot tool call is missing, log
which tools were actually called and the model response
## Root Cause Analysis
The image test was failing because:
1. First retry: API call returns `success=false` (transient API issue)
2. Subsequent retries: API call succeeds but returns no text deltas
(`deltas.length === 0`)
Investigation revealed the PNG images were using 1-bit indexed colormap
format instead of proper RGB, which may cause issues with vision API
processing.
_Generated with `mux`_1 parent d45c0d5 commit a051c81
2 files changed
+36
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | | - | |
| 202 | + | |
| 203 | + | |
203 | 204 | | |
204 | 205 | | |
205 | 206 | | |
206 | 207 | | |
207 | 208 | | |
208 | | - | |
| 209 | + | |
209 | 210 | | |
210 | 211 | | |
211 | 212 | | |
| |||
245 | 246 | | |
246 | 247 | | |
247 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
248 | 258 | | |
249 | 259 | | |
250 | 260 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
| 29 | + | |
29 | 30 | | |
30 | | - | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | | - | |
| 35 | + | |
| 36 | + | |
35 | 37 | | |
36 | | - | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
65 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
66 | 77 | | |
67 | 78 | | |
68 | 79 | | |
| |||
81 | 92 | | |
82 | 93 | | |
83 | 94 | | |
84 | | - | |
| 95 | + | |
85 | 96 | | |
86 | 97 | | |
87 | 98 | | |
| |||
100 | 111 | | |
101 | 112 | | |
102 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
103 | 118 | | |
104 | 119 | | |
105 | 120 | | |
| |||
0 commit comments