Skip to content

🧪 Flake: repl-repositories-pty fails intermittently when the runtime's progress writer clears rows inside a frame #1007

Open

Description

@taras

What was observed

packages/cli/tests/repl-repositories-pty.test.ts failed once and passed on the
very next run with nothing changed between them, at signed
552bd15ea18d73cb082477fb914c2b3cd39779d4 under Deno on macOS (tmux-allocated
pty).

  • First output: FAILED | 0 passed (2 steps) | 1 failed (3 steps) (2m33s).
  • Immediate repeat, same revision, same host:
    ok | 1 passed (5 steps) | 0 failed (2m12s).

Both runs are retained in the implementation evidence for that revision
(implementation/implementor-33/receipts/repl-repositories-pty.log holds the
green one; the red one is recorded in that phase's command receipts).

The cause this is most likely an instance of

While diagnosing a stable version of the same symptom in
repl-include-pty.test.ts, the raw pty bytes were captured with
tmux pipe-pane and replayed through an independent emulator. In the middle of
one full-screen frame the stream carried \x1b[0G\x1b[2K\x1b[J — a progress-line
clear. It erases the cursor's row and every row below it. The REPL's renderer
writes diffs: it had already written those rows, was never told they had gone,
and did not write them again. The History rail and the directions came back
blank in tmux's own emulator and in the independent replay alike.

The same byte sequence appears four times at the head of every such stream,
before the command enters the alternate screen, and appears nowhere in this
repository's sources. It is the runtime's own progress writer on the terminal
the command owns. Whether it lands inside a frame depends on when a module load
finishes, which is exactly the shape of an intermittent failure.

packages/test-support/launch.ts now launches the Deno CLI with --quiet, which
stops that writer. It suppresses nothing the command itself says.

Why this issue stays open

A green repeat does not prove a fix and does not close this. It closes when
repl-repositories-pty has been observed green across the runtimes CI runs it
on, after the correction above, and the regression evidence is recorded here.

Activity

  1. added
    flakeIntermittent or timing-sensitive failure that can pass without a code change
    on Oct 28, 2026
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

    flakeIntermittent or timing-sensitive failure that can pass without a code change

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions