8000 An in-box min patched-pkg of a task builds outside the egress rules of its box · Issue #3697 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

An in-box min patched-pkg of a task builds outside the egress rules of its box #3697

Closed

Description

@norrietaylor

Defect

A task's environment answers the in-box min helper. A build that min install or min run starts there runs under the egress rules of the task's box. A build that min patched-pkg starts there does not. It runs as the daemon's own traffic, so the box's rules do not decide its source downloads or the connections of its build steps.

NET-155 requires a package build that a box requests to run under that box's egress verdict. A patched build is such a build.

Where

Code read from main at 9fd4fa1f.

  • crates/mctx/src/env.rs:262-272, EnvChannel::run_patched_pkg: builds op::PatchedBuild with classifier_leaf: None and box_network: None. The comment says a client-side patched build runs for no box. That is true for mip, but the daemon uses the same channel for a task of a box (crates/minimald/src/exec/process.rs:546).
  • crates/mctx/src/lib.rs:510 and :524: the context has classifier_leaf() and box_network(). cloned_reinit keeps both (:594-595), and the other builds of the context get both through the orchestrator (:937-938).
  • crates/minimald/src/env.rs:2297-2306: the session channel's run_patched_pkg passes the leaf, or the box network when there is no leaf. The task channel must do the same.

#3256 replaces the two fields with build_box, and it leaves this call at build_box: None. The defect stays after that change.

Expected

  • A patched build that a task's environment starts takes the classifier leaf of the task's box. For an own-address box it takes the box's network.
  • A box whose rules refuse a destination refuses it for the patched build too, with the refusal that the other builds of the box get.
  • A patched build for no box, such as one that mip runs, keeps its own traffic.
  • A test fails when the task channel passes no leaf and no network for a context that has one.

This is a residual of epic #1437 (NET).

Activity

  1. added
    bugSomething isn't working
    priority:should-haveShould be done. Applied by the inbox-route classifier or a human.
    on Nov 20, 2026
  2. norrietaylor commented on Nov 20, 2026

    @norrietaylor
    MemberAuthor

    Task

    Source: #3697

    Plan block
    ### D3697 — An in-box min patched-pkg of a task builds in the classifier leaf of its box, or on the network of an own-address box
      kind: task
      size: S
      est: 25 code, 60 tests
      executor: agent
      origin: residual
      epic: 1437
      layers:
        - mctx:
          - crates/mctx/src/env.rs: run_patched_pkg gives op::PatchedBuild the classifier leaf of its context, or the box network when the context has no leaf, as the session channel in minimald does. A small function makes that choice. A context made for no box gives None for both.
          - crates/mctx/src/lib.rs: Add a test beside task_env_carries_the_box_classifier_leaf. A context with a leaf gives the patched build that leaf, a context with a box network gives that network, and a plain context gives neither.
          test: cargo test -p mctx patched_build_takes_the_leaf_or_the_network_of_its_box
      proof: In a deny-all task box, a min patched-pkg build that needs a download is refused under the box's egress rules, as a min install build in the same box is.
    
  3. norrietaylor commented on Nov 20, 2026

    @norrietaylor
    MemberAuthor

    /implement

  4. minimal-foundry commented on Nov 20, 2026

    @minimal-foundry
    Contributor

    Pull request #3708 is open for D3697.

    branch agent/3697-an-in-box-min-patched-pkg-of-a-task-builds-in-th · epic #1437

    test exit tail
    cargo test -p mctx patched_build_takes_the_leaf_or_the_network_of_its_box 0 running 1 test test tests::patched_build_takes_the_leaf_or_the_network_of_its_box ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 82 filtered out; finished in 0.00s warning: unknown fields in task runtime-implement-test-0: network help: do you need to update to a newer version

    Verify min task run agent-verify: exit 0

    Updated 2026-11-20T22:37:56.495Z.

  5. minimal-foundry commented on Nov 20, 2026

    @minimal-foundry
    Contributor

    That /implement is held, not dropped. The container platform had no instance to give the coder: its pool of prepared containers was full, which happens most just after a deploy. It is asked again every 10 minutes for up to 30.

    Nothing to type again: the command gets a rocket when its coder starts, or a refusal that names the reason.

    What the platform said

    could not start the coder: Error: there is no container instance that can be provided to this durable object

  6. minimal-foundry commented on Nov 20, 2026

    @minimal-foundry
    Contributor

    That /implement is queued, not refused. 10 follow-up coders are in flight, and 10 is the most that run at once, so no coder started. Nothing is queued ahead of it. The runtime starts queued follow-up coders oldest first as room frees, looking every ten minutes, and refuses one still waiting after 14 days.

    Nothing to type again: the command gets a rocket when its coder starts, or a refusal that names the reason. /implement stop takes it off the queue.

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

    bugSomething isn't workingpriority:should-haveShould be done. Applied by the inbox-route classifier or a human.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0