Title: fix(mcp): coerce corrupted consecutiveFailures instead of crashing the whole server list by waleedlatif1 · Pull Request #5593 · simstudioai/sim · GitHub
Open Graph Title: fix(mcp): coerce corrupted consecutiveFailures instead of crashing the whole server list by waleedlatif1 · Pull Request #5593 · simstudioai/sim
X Title: fix(mcp): coerce corrupted consecutiveFailures instead of crashing the whole server list by waleedlatif1 · Pull Request #5593 · simstudioai/sim
Description: Summary Active production incident: 81 MCP servers across 69 workspaces currently have their entire "MCP tools" settings page blanked with "Response failed contract validation" — confirmed via direct DB query against the production database Root cause: updateServerStatus() in lib/mcp/service.ts only fell back to a default status config when the whole statusConfig column was null, not when it was a real-but-incomplete object (e.g. the column's '{}' default on server creation). This made consecutiveFailures undefined, undefined + 1 evaluate to NaN, and JSON.stringify(NaN) persist as a literal null the first time a freshly-created server hit a connection failure That corrupted null then failed the server-list contract's Zod parse client-side (consecutiveFailures: z.number() rejects null) — since the response is an array, one bad server blanks the entire list for the whole workspace Fixed in two places: service.ts now normalizes the read-back status config so consecutiveFailures is always a real number going forward; the contract schema also coerces any non-number consecutiveFailures (including already-corrupted null rows) to the default of 0, so all 69 currently-broken workspaces self-heal immediately on next page load — no DB migration needed Type of Change Bug fix (production incident) Testing Verified the fix against the exact corrupted production data shape with a standalone Zod parse script ({consecutiveFailures: null} → {consecutiveFailures: 0, ...}, no longer throws) Existing lib/mcp/service.test.ts suite passes (11/11) bun run check:api-validation passes Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)
Open Graph Description: Summary Active production incident: 81 MCP servers across 69 workspaces currently have their entire "MCP tools" settings page blanked with "Response failed contract validation"...
X Description: Summary Active production incident: 81 MCP servers across 69 workspaces currently have their entire "MCP tools" settings page blanked with "Response failed contract vali...
Opengraph URL: https://github.com/simstudioai/sim/pull/5593
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:e83f95e1-1820-d973-0094-f7e545340f00 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A3DC:1E946E:35E7323:4B94125:6A635BED |
| html-safe-nonce | 2a59ff66f0dccc29bcf8eb026617f4b376f92266f26f7ede79a93feff047d73f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBM0RDOjFFOTQ2RTozNUU3MzIzOjRCOTQxMjU6NkE2MzVCRUQiLCJ2aXNpdG9yX2lkIjoiNzMzNjIzNjY0MjI2NDYzNjM5NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | da1576d1d1d5acbcf3171ce3c54c60a310b5c6c27d578e63c796643fc119060e |
| hovercard-subject-tag | pull_request:4036316623 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/5593/files |
| twitter:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| og:image:alt | Summary Active production incident: 81 MCP servers across 69 workspaces currently have their entire "MCP tools" settings page blanked with "Response failed contract validation"... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 59e55daad7174ca59d63c6974d58276ccb5477442e550bebb3c035e1bef11c94 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 71b1218de2f2ab29c4d5ce72568e68e2c56044c6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width