Skip to content

Document app.stream() write's ~2KB per-message payload limit - #6

Merged
cscaff merged 2 commits into
mainfrom
docs/stream-burst-payload-limit
Jul 12, 2026
Merged

Document app.stream() write's ~2KB per-message payload limit#6
cscaff merged 2 commits into
mainfrom
docs/stream-burst-payload-limit

Conversation

@cscaff

@cscaff cscaff commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • docs/guides/sdk.md's app.stream() section didn't document any limit on burst write size.
  • Added a note: a single burst write() is capped at ~2KB (~500 32-bit words). Going over it closes the connection, raised client-side as ConnectionClosedError with a misleading "FPGA is busy with a run job" reason. Chunk large writes into sub-2KB pieces; fixed_address=True composes fine across chunked calls.

Test plan

  • Docs-only change, no code affected.
  • Rendered the added section locally to confirm Markdown formatting.

🤖 Generated with Claude Code

cscaff added 2 commits July 12, 2026 14:20
Discovered while sweeping a SAT-solver design at real hardware scale:
a single stream write() burst above ~500 32-bit words gets its
connection closed by the relay before a response arrives, surfaced
client-side as ConnectionClosedError with reason "FPGA is busy with a
run job" -- misleading, since it reproduces deterministically by size
alone regardless of session/concurrency state (504 words: fine, 576
words: fails, every time). Undocumented previously; callers streaming
large arrays need to chunk writes themselves.
Reference docs should tell readers what the limit is and how to stay
under it, not how it was found.
@cscaff
cscaff merged commit 875eb0e into main Jul 12, 2026
1 check passed
@cscaff
cscaff deleted the docs/stream-burst-payload-limit branch July 12, 2026 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant