8000 fix(minimal): task box review nits and test gaps from #2999 · Issue #3084 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

fix(minimal): task box review nits and test gaps from #2999 #3084

Open

Description

@agent-137

Residual of BOX T43 (#2405, PR #2999): the smaller findings from the pre-merge review, collected in one issue. Split any of them out if it grows.

Behaviour:

  • A PTY-enabled task launches its entrypoint before it is refused (crates/minimald/src/exec/process.rs, about line 857). Refuse before the launch.
  • A Ctrl-C after yield_to_handler can turn an exit 0 into 130 (crates/minimal/src/task.rs). Disarm the interrupt guard once the run has its exit code.
  • The kept-box line prints on the Ok(None) path, where the box may still run. It must say the box may still be running and point at min box show <box>.
  • The interrupt path never prints the kept-box line.
  • A first run whose client leaves while the task prints nothing keeps its stream receivers open until the next chunk, so a rejoin is refused until then (follows from the D1 fix).

Code quality:

  • Blocking std::fs::read runs in async code (crates/minimald/src/exec/process.rs, about line 768). Use tokio::fs or spawn_blocking.
  • A task variable named PATH reaches the entrypoint through command.env and skips the $PATH expansion that sandbox::Config::command_env gives a composed PATH (arch note on 0b31489).
  • "task box ended" naming in log and code.
  • Mixed ... and … in printed lines.
  • clippy-strict hits on lines from T43 — Run a task as a task box that returns its exit code #2999: task.rs (let_underscore_must_use ×2, assertions_on_result_states), pipes.rs drain (indexing_slicing ×2), process.rs (let_underscore_must_use ×2), box_actor/tests.rs (let_underscore_must_use).

Test gaps:

  • task_run_exits_with_held_open_stdin_pipe now covers only the refusal path. Restore coverage of the held-open stdin case.
  • entrypoint_started has no unit test.
  • The e2e interrupt step uses a fixed sleep 3. Wait on a marker instead.

A cancelled run can leave its stage behind. The real fix is #3043.

Refs #2405, #2999.

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

    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