8000 T100 — Activation refuses a declared port that something else holds · Issue #2703 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

T100 — Activation refuses a declared port that something else holds #2703

Closed

Description

@norrietaylor

Task

slice size difficulty model who estimated lines
macOS names open M needs care standard an agent 480 (300 code, 180 tests)

Activating a box whose --ingress port another box or a host program already holds fails with the port and the holder named, and min ls shows no box.

Covers:

  • NET-144

Layers:

  • daemon:
    • crates/minimald/src/box_actor/setup.rs: finalize binds the declared ingress forwards before it writes the record Active, and a bind that fails fails the finalize, so the client's activate cleanup destroys the box; today the forwards bind only at the first attach and the box activates with the port dead
    • crates/minimald/src/net/gvproxy_network.rs: finish_own_ip_attach returns the failed port and its holder instead of a bare io error
    • crates/minimald/src/net/policy.rs: apply_ingress names the holder: the box whose publish stands at that address and port, read from the hostname registry, or the host when none does
    • crates/minimald/src/net/dns.rs: a declared port that another box already holds at the shared 127.0.0.1 fallback is a refusal at activation, not a yielded port; a host-address box sharing its node's address keeps the shared-address rule
    • crates/minimald/src/box_actor/tests.rs: a box whose declared port is held by a host listener, and one whose port another box holds at the fallback, both fail activation and leave no record
    • cargo nextest run -p minimald activation_refused_when_declared_port_is_held
  • client:
    • crates/minimald-rpc/src/lib.rs: a typed activation refusal carrying the port and the holder
    • crates/minimal/src/cmd/session.rs: prints the refusal text in the diagnostics line and exits non-zero
    • cargo nextest run -p minimal activate_refusal_names_port_and_holder

Waits on:

Plan block
### T100 — Activation refuses a declared port that something else holds
  slice: S0
  kind: task
  covers: NET-144
  size: M
  est: 300 code, 180 tests
  executor: agent
  difficulty: needs care
  model: standard
  diagnostics: the refusal itself is what a person reads: `min session activate` exits non-zero and prints "Port <port> is already in use on this machine by box <other-box>." or, when no box holds it, "Port <port> is already in use on this machine by a program outside Minimal.", then "Choose another host port in --ingress (for example --ingress <port+1>:<box-port>) or in [network] ingress in minimal.toml.", pinned by activation_refused_when_declared_port_is_held and activate_refusal_names_port_and_holder
  observability: one warn line in the daemon log per refused activation with the session id, the port, the address and the holder (`box:<name>` or `host`)
  layers:
    - daemon:
      - crates/minimald/src/box_actor/setup.rs: finalize binds the declared ingress forwards before it writes the record `Active`, and a bind that fails fails the finalize, so the client's activate cleanup destroys the box; today the forwards bind only at the first attach and the box activates with the port dead
      - crates/minimald/src/net/gvproxy_network.rs: `finish_own_ip_attach` returns the failed port and its holder instead of a bare io error
      - crates/minimald/src/net/policy.rs: `apply_ingress` names the holder: the box whose publish stands at that address and port, read from the hostname registry, or the host when none does
      - crates/minimald/src/net/dns.rs: a declared port that another box already holds at the shared `127.0.0.1` fallback is a refusal at activation, not a yielded port; a host-address box sharing its node's address keeps the shared-address rule
      - crates/minimald/src/box_actor/tests.rs: a box whose declared port is held by a host listener, and one whose port another box holds at the fallback, both fail activation and leave no record
      test: cargo nextest run -p minimald activation_refused_when_declared_port_is_held
    - client:
      - crates/minimald-rpc/src/lib.rs: a typed activation refusal carrying the port and the holder
      - crates/minimal/src/cmd/session.rs: prints the refusal text in the diagnostics line and exits non-zero
      test: cargo nextest run -p minimal activate_refusal_names_port_and_holder
  produces:
    - crates/minimald-rpc/src/lib.rs
  consumes: none
  depends on:
    - blocked by #2688
  proof: Activating a box whose `--ingress` port another box or a host program already holds fails with the port and the holder named, and `min ls` shows no box.

Activity

  1. added
    kind:taskA task the plan skill rendered; the body carries ## Task
    size:M200 to 500 net lines; one PR
    model:standardA standard model: work that needs care, or routine work that is large
    on Oct 28, 2026
  2. minimal-foundry commented on Oct 28, 2026

    @minimal-foundry
    Contributor

    Done. #2725 merged.

    branch agent/2703-activation-refuses-a-declared-port-that-somethin · epic #1437 · PR #2725

    round outcome job
    1 changed nothing: Revise round 1: I changed nothing. The directive lists no review threads. Only two checks failed: cargo-deny and its aggregator ci-success. cargo-deny fails on a new RustSec advisory, 'Exponential eve 39a08139
    2 pushed 7c5531ba
    3 pushed 36efcf2a

    Updated 2026-10-29T00:38:54.592Z.

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

    kind:taskA task the plan skill rendered; the body carries ## Taskmodel:standardA standard model: work that needs care, or routine work that is largesize:M200 to 500 net lines; one PR

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0