8000 T45 — Box logs strips terminal control codes when stdout is not a terminal · Issue #3332 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

T45 — Box logs strips terminal control codes when stdout is not a terminal #3332

Closed

Description

@agent-137
9599

Task

slice size difficulty model who estimated lines
Run tasks and wait on them S needs care strongest an agent 130 (50 code, 80 tests)

Piped min box logs of a PTY box prints the text without terminal control sequences; --raw keeps them.

Found in the owner's test run on 2026-11-12. min box logs bench replays the box's PTY transcript with raw terminal control codes, for example ESC[?2004h, and these pollute piped output. The owner chose (2026-11-12): when stdout isn't a terminal, strip terminal control sequences from a PTY transcript, and add --raw to keep them. On a terminal, output is unchanged.

Covers:

  • BCLI-012 (min box logs prints the box output BOX-155 captures)

Layers:

  • client:
    • crates/minimal/src/cli.rs: min box logs and the type nouns' logs take --raw
    • crates/minimal/src/cmd/boxes.rs: box_logs_on_hosts strips terminal control sequences (CSI, OSC and other escape sequences) from a PTY box's transcript when stdout isn't a terminal and --raw isn't given
    • crates/minimal/src/tests.rs: the in-process minimald test harness gains this layer's tests
    • cargo nextest run -p minimal box_logs_piped_pty_transcript_has_no_control_codes
    • cargo nextest run -p minimal box_logs_raw_keeps_control_codes
Plan block
### T45 — Box logs strips terminal control codes when stdout is not a terminal
  slice: S2
  kind: task
  covers: BCLI-012
  size: S
  est: 50 code, 80 tests
  executor: agent
  difficulty: needs care
  model: strongest
  diagnostics: none new
  observability: none new
  layers:
    - client:
      - crates/minimal/src/cli.rs: `min box logs` and the type nouns' `logs` take `--raw`
      - crates/minimal/src/cmd/boxes.rs: `box_logs_on_hosts` strips terminal control sequences (CSI, OSC and other escape sequences) from a PTY box's transcript when stdout isn't a terminal and `--raw` isn't given
      - crates/minimal/src/tests.rs: the in-process minimald test harness gains this layer's tests
      test: cargo nextest run -p minimal box_logs_piped_pty_transcript_has_no_control_codes
      test: cargo nextest run -p minimal box_logs_raw_keeps_control_codes
  produces: none
  consumes: none
  proof: `min box logs <pty box> | cat` prints the transcript text with no terminal control sequences; `--raw` prints them unchanged; a terminal still gets the raw stream.

Activity

  1. minimal-foundry commented on Nov 12, 2026

    @minimal-foundry
    Contributor

    Done. #3335 merged.

    branch agent/3332-box-logs-strips-terminal-control-codes-when-stdo · epic #2879 · PR #3335

    round outcome job
    1 changed nothing: Revise round 1: the directive lists only the failed macOS 'unit' check (and the 'ci-macos-success' aggregator that follows it). On macOS, 'just test' runs '-p minvmd -p boxes -p bep' (justfile 'scope' 598a96ae
    2 pushed 973d30c6
    3 pushed 04b35a15
    4 pushed cb6377e8
    5 changed nothing: The directive asks for the fix to thread PRRT_kwDOPdfcxM622ZH_. Commit 33b8f33 (fix(minimal): end unterminated CSI at a line end in box logs) already makes this change on the branch. In ControlStripp 81397a84
    6 changed nothing: Revise round 6 addressed a failed 'tests' job and its 'ci-linux-native-success' aggregator. The job log excerpt in the directive does not name a failing test. It shows only passing 'decode' tests and 2441aa09

    Updated 2026-11-13T02:51:35.652Z.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0