Files
PaperClipAI/packages
Priya RamanandPaperclip 3e8d9d6f6b test(sandbox): add the local real-process duplex end-to-end harness
Spawn the generated gateway with plain node from a temporary file, attach
the real host broker to the child stdin and stdout, and forward each
request to a local fake API server on a real HTTP call. The harness needs
no provider credentials and adds no dependency.

The harness proves the composed duplex path over real kernel pipes:
- The child sends a valid liveness-only READY frame to the broker.
- One HTTP request travels through the child and the broker to the API and
  the response body returns unchanged.
- A large response spans many pipe chunks and returns complete.
- A multi-byte UTF-8 sequence split across chunk borders decodes correctly.
- Concurrent requests through one child each receive the matching response.
- A real stdin EOF makes the gateway answer 409 outcome_indeterminate to
  every outstanding request and 503 bridge_unavailable to every new one.
- A real process kill moves the broker to lost, stops all dispatch, and
  leaves no open pipe or socket handle after teardown.

Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-08-20 03:21:45 +00:00
..