Skip to content

wasi cli: passthrough had a consumer (polymorph-iroh EXAM_GUEST_LOGS); a chunk-sink option would restore it #285

Description

@lannbot

PR #260 removed CliOptions.passthrough from @polyengine/wasi's cli() as "set by nobody". It had one consumer: polymorph-iroh's endpoint exam (host-polyengine/src/harness.ts) set it from the EXAM_GUEST_LOGS=1 knob to stream guest stdout/stderr to the console while the long-running scenarios execute — the only way to watch a hang in progress, since captured.stdoutText() is only readable after the fact.

polymorph-iroh#103 (the 0.6.3 adoption) deleted the knob rather than vendor a replacement, so nothing is blocked. Filing so the consumer record is accurate and the design question is on the table.

The removal rationale also called the old implementation buggy (newline-injecting console.log per chunk). If a live sink comes back, a chunk callback is the honest shape — no console formatting, the application decides:

cli({ stdout?: (chunk: Uint8Array) => void, stderr?: (chunk: Uint8Array) => void })

invoked alongside the capture push on both the 0.2 OutputStream and the 0.3 write-via-stream paths. Consumer: polymorph-iroh (EXAM_GUEST_LOGS). No urgency.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestp2Minor bugs; desirable lower-priority features

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions