8000 T48 — An interrupted in-box task run prints no socat or connection line · Issue #3421 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

T48 — An interrupted in-box task run prints no socat or connection line #3421

Closed

Description

@agent-137

Task

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

An interrupted or timed-out min task run inside a box prints no socat warning and no false connection line.

Found in the owner's test run of 2026-11-14 on 0.8.0-dev.527 (dd7d8cf), in checks H4 (Ctrl-C) and N8 (a task's timeout). The in-box min task run printed:

socat[4] W exiting on signal 15
error: the connection closed before the task reported its exit status

The exit codes were right.

Cause: the in-box min helper reaches the daemon through socat (crates/minimald/src/env_min_helper.sh:154 and :160). socat's stderr goes to the user's terminal, so socat's own warning prints when SIGTERM ends it. The helper then finds no exit: line on the stream and prints its "connection closed" line (env_min_helper.sh:274-278), although a signal, not a broken connection, ended the run.

Change:

  • socat's stderr goes to /dev/null in both invocations. The helper already reports a stream that ends without an exit status, so the user loses no fact.
  • When the helper's socat ended on a signal (its wait status is 128 or more), the helper prints no "connection closed" line. The exit code stays what it is today. When the stream ends with no exit: line and socat exited on its own, the helper still prints error: the connection closed before the task reported its exit status and returns 125.

crates/minimald/src/env.rs:5559 pins the line for the broken-stream case. It keeps passing.

Covers:

  • BCLI-010 (the run writes nothing but the task's own output)
  • BCLI-014 (a timed-out run says why once, then exits 124)

Layers:

  • daemon:
    • crates/minimald/src/env_min_helper.sh: both socat invocations send socat's stderr to /dev/null; a run whose socat ended on a signal prints no "connection closed" line and keeps its exit code
    • crates/minimald/src/env.rs: its helper tests gain a run that SIGTERM ends, checking stderr holds neither line, beside the existing broken-stream test
    • cargo nextest run -p minimald min_helper_run_ended_by_signal_prints_no_connection_line
Plan block
### T48 — An interrupted in-box task run prints no socat or connection line
  slice: S2
  kind: task
  covers: BCLI-010, BCLI-014
  size: S
  est: 15 code, 65 tests
  executor: agent
  difficulty: needs care
  model: standard
  diagnostics: no new text; the broken-stream line `error: the connection closed before the task reported its exit status` stays for a stream that ends with no exit status and no signal, pinned by env.rs:5559 and the new test
  observability: none new
  layers:
    - daemon:
      - crates/minimald/src/env_min_helper.sh: both socat invocations send socat's stderr to /dev/null; a run whose socat ended on a signal prints no "connection closed" line and keeps its exit code
      - crates/minimald/src/env.rs: its helper tests gain a run that SIGTERM ends, checking stderr holds neither line, beside the existing broken-stream test
      test: cargo nextest run -p minimald min_helper_run_ended_by_signal_prints_no_connection_line
  produces: none
  consumes: none
  proof: Inside a box, `min task run` of a task that Ctrl-C or its timeout ends prints neither the socat warning nor the connection line, and exits with the same code as today.

Activity

  1. minimal-foundry commented on Nov 14, 2026

    @minimal-foundry
    Contributor

    Done. #3435 merged.

    branch agent/3421-an-interrupted-in-box-task-run-prints-no-socat-o · epic #2879 · PR #3435

    round outcome job
    1 pushed 88114606
    2 pushed 49e5dbe7
    3 pushed 82bf06c7
    4 pushed 4ce434fc
    5 pushed fc81e7cb

    Updated 2026-11-14T21:34:32.178Z.

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