Bug: `sprite exec` stdout silently drops bytes by volume on large streams

オープン
#202 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
領域
cli, networking

調査の方向性

まず、既知のサイズまたはハッシュで検証可能な大きなストリームを使い、sprite exec の stdout エントリーポイントを通じて問題を再現してから、WebSocket のフレーミング経路を調査します。大きな stdout がバイト単位で完全に一致するか、意図されたサイズ制限によってしきい値で明示的な非ゼロ終了エラーが発生すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Summary

sprite exec stdout silently drops bytes by volume on large outputs. There is no error and no non-zero exit — the receiving side just gets corrupted/truncated data.

Reproduction

Run an in-box command that emits a large, verifiable stream to stdout (e.g. a known-size payload or a hash-checkable blob) and compare what the host receives against what the box produced.

Observed in our usage:

  • Corruption begins at roughly 512 KB of stdout.
  • Loss reaches ~76% at around 4 MB.

The failure is silent: exit code 0, no stderr, no truncation marker — the bytes are simply missing.

Impact

Any workflow that moves a sizable payload through sprite exec stdout (for example a base64-encoded file, a large log, or a build artifact manifest) receives corrupted data with no signal that anything went wrong. This is especially dangerous because a naive integrity assumption ("exec succeeded, so stdout is complete") silently holds false.

Our workaround

We abandoned moving any sizable data through sprite exec stdout and route every transfer through sprite file pull/push instead, which is byte-exact in our testing (verified byte-for-byte to ~16 MB pull / ~8 MB push). We additionally carry a sha256 + byte-count header end-to-end and re-verify on landing, so a lossy channel surfaces as an integrity error rather than corrupt input.

Ask

Either:

  • fix the WebSocket framing so sprite exec stdout is byte-exact for large streams, or
  • if a hard size limit on exec stdout is intended, surface it as an explicit, non-zero-exit error at the threshold instead of silently truncating.

Happy to provide a minimal repro script if useful.

主要言語
MDX
スター
53
フォーク
5
平均マージ
1日 15時間
マージ済み PR(30日)
4

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

superfly/sprites-docs のほかの issue

superfly/sprites-docs の issue をすべて見る

似ている issue

CLI の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。