buildmymcpserver/apps
Marco Sadjadi 092290bb38
All checks were successful
Deploy to Production / deploy (push) Successful in 1m21s
fix(preview/stream): await onSpec/onError handlers
The llm package called the user-supplied onSpec/onError handlers
without awaiting them. In the /preview/stream route onSpec is async
(it does `await cacheSpec(...)` then writes the SSE `spec` event), so
the api handler's `await streamSpecFromAnthropic(...)` returned BEFORE
the terminal event had been written. The route's finally block then
ran `reply.raw.end()`, the queued `send('spec', ...)` hit a closed
stream and silently no-op'd, and the browser saw zero terminal
events — frontend ran into the "Spec generation failed." fallback
even though Anthropic had delivered a perfectly valid spec.

Verified against prod log: req-8 ran 66s with 200 and produced no
preview_spec_* log line, which is exactly the success-but-event-lost
signature.

Fix:
- StreamHandlers.onSpec / onError typed as Promise<void> | void
- Both call sites in streamSpecFromAnthropic now `await` them
- /preview/stream sets `resolved = true` at the END of each handler
  (after the SSE write completes) so the post-stream "unresolved"
  fallback only fires on a genuine programming bug
- Added preview_spec_ready info log on the happy path so future
  diagnosis doesn't have to infer success from the absence of error
  logs
2026-05-28 22:00:03 +02:00
..
api fix(preview/stream): await onSpec/onError handlers 2026-05-28 22:00:03 +02:00
generator fix(runner): alias params/input to args so tool implementations don't ReferenceError 2026-05-28 21:39:11 +02:00
runner-template fix(docker): healthcheck must hit 127.0.0.1, not localhost 2026-05-21 18:07:01 +02:00
web feat(dashboard): delete button on server detail page 2026-05-28 21:44:52 +02:00