8000 T149 — A native host-address box's network view says host exposures do not apply by minimal-foundry[bot] · Pull Request #2958 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

T149 — A native host-address box's network view says host exposures do not apply - #2958

Merged
norrietaylor merged 4 commits into
mainfrom
agent/2938-a-native-host-address-box-s-network-view-says-ho
Nov 4, 2026
Merged

norrietaylor merged 4 commits into
mainfrom
agent/2938-a-native-host-address-box-s-network-view-says-ho

Conversation

@minimal-foundry
Copy link
Copy Markdown
Contributor

T149 — A native host-address box's network view says host exposures do not apply

slice: S21
kind: task
covers: NET-160
size: S
est: 30 code, 60 tests
executor: agent
difficulty: routine
model: light
diagnostics: a person reads the row in the output of min session policy <box>
observability: the change prints a row and emits no signal
layers:
- cli:
- crates/minimal/src/cmd/boxes/policy.rs: format_policy prints, for a host-address box on a native host, the row host exposures not applied: this box shares the host's network in place of a list of exposures; it is true because a native host-address box runs in the host's network namespace, where no gate applies the table (design §7.1 Lanes, NET-079); native_host_ip_network_view_says_host_exposures_do_not_apply pins the text
test: cargo nextest run -p minimal native_host_ip_network_view_says_host_exposures_do_not_apply
produces: none
consumes: none
proof: On a native host, the network view of a host-address box says the host's exposures table does not apply to it.

Proof

On a native host, min session policy <box> for a host-address box now prints the row host exposures not applied: this box shares the host's network in its egress block. A VM-backed host-address box and an own-address box do not print this row.

Notes from the agent: format_policy has no explicit native-host argument, and the caller in crates/minimal/src/cmd/session.rs is outside the layers. So the row keys on network == HostNet && fabric.is_none(). Both callers set fabric to None exactly when the daemon host kind is not Minvmd, that is, on a native host. A comment in format_policy records this. If a future caller passes None for a VM-backed host, the row will print there wrongly, so an explicit native flag is a candidate for a later task. The JSON rendering (write_policy_json) is unchanged, because the task names only the text row. Before this change, the view printed no list of exposures for any box, so the row is an addition and replaces nothing. I also ran the two existing policy_render tests (2 passed) and rustfmt --check on the file (clean).

Tests

line exit tail
cargo nextest run -p minimal native_host_ip_network_view_says_host_exposures_do_not_apply 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-d7ef... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling client-config v0.0.1 (/wo

Verify

min task run agent-verify exited 100 under rustc 1.99.0, which the repository does not pin (1.99.1 in rust-toolchain.toml); the PR is not a draft on that alone — CI, which honours the pin, is the gate.

dSpan {
            name: "session.message",
            fields: {
                "kind": "GetNetSwitch",
                "parent_span_id": "2b628df30f5c3b2f",
                "span_id": "2808add9d574ce13",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetDenyAllOptOut",
                "parent_span_id": "2b628df30f5c3b2f",
                "span_id": "0497d475035d2c3d",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetPaths",
                "parent_span_id": "2b628df30f5c3b2f",
                "span_id": "f6a585579d48c189",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "2b628df30f5c3b2f",
                "queued_behind": "0",
                "span_id": "cac569436a8197d2",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "2b628df30f5c3b2f",
                "queued_behind": "0",
                "span_id": "c0bf4e8df1445710",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "c0bf4e8df1445710",
                "span_id": "617092850e052608",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "HandOverName",
                "parent_span_id": "c0bf4e8df1445710",
                "queued_behind": "0",
                "span_id": "f95142aeb3de701f",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
    ]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 
────────────
     Summary [  38.293s] 849 tests run: 848 passed, 1 failed, 1 skipped
        FAIL [   2.990s] (849/849) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
error: test run failed

Closes #2938

On a native host, a host-address box runs in the host's network
namespace, so no gate applies the host exposures table to it
(NET-160). The network view of `min session policy` now says so.
@coderabbitai
coderabbitai Bot commented Nov 4, 2026 •
Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ed77f595-4d99-4a27-a88c-100e6b71e7c3

You can disable this status message by setting the r 8000 eviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@minimal-foundry
minimal-foundry Bot commented Nov 4, 2026 •
Copy link
Copy Markdown
Contributor Author

Approved: every review thread resolved at 353695ae3646.

@norrietaylor resolved the last thread, which releases the approval this review had withheld.

Nothing to do.

@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arch-review: PASS · the full ruling

The change conforms to §7.1 Lanes, line 253. That line says the table is not applied to a native host-address box, and min session policy says so in place of a list of exposures. The new row in format_policy does this, and the test pins the text. The key fabric.is_none() is the native host exactly, because the only caller sets fabric from HostKind::Minvmd. No conditions.

Ruled at 107a601 against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimal-review — advisory review

Verdict COMMENT — 2 findings, 1 inline.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

Comment thread crates/minimal/src/cmd/boxes/policy.rs Resolved
@norrietaylor
Copy link
Copy Markdown
Member

/revise Round 1 has read Revising since 00:10Z with no commit, so this replaces it. Answer the open thread at crates/minimal/src/cmd/boxes/policy.rs:275: format_policy says the box shares the host's network whenever fabric is None, but None means only that no switch fabric is named. Pass an explicit native-host input, or derive the condition from the host kind at the call site in cmd/session.rs. Then resolve the thread.

format_policy keyed the row on fabric being None, but None only means no
switch fabric is named. format_policy_on_host takes an explicit
native_host input, and min session policy sets it from the daemon's host
kind.
@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arch-review: PASS · the full ruling

The change conforms to §7.1 Lanes, line 253. The row now keys on the host kind, not on fabric. HostKind::Minimald is the design's native node: minimald on the host OS with no VM. The baseline PASS on 107a601d stands for the rest of the change.

Ruled at 353695a against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimal-review — approval withheld

Verdict COMMENT — APPROVE withheld: 1 unresolved thread — minimal-foundry[bot] crates/minimal/src/cmd/boxes/policy.rs. No findings.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 1 of 10 on a /revise note, pushed as 353695ae3646.

line exit tail
cargo nextest run -p minimal native_host_ip_network_view_says_host_exposures_do_not_apply 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-2d7e... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling client-config v0.0.1 (/wo

Verify min task run agent-verify exited 100 under rustc 1.99.0, which the repository does not pin (1.99.1 in rust-toolchain.toml); the PR is not a draft on that alone — CI, which honours the pin, is the gate.

dSpan {
            name: "session.message",
            fields: {
                "kind": "GetNetSwitch",
                "parent_span_id": "0311a9b8fd540828",
                "span_id": "6210c65356ccd5a9",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetDenyAllOptOut",
                "parent_span_id": "0311a9b8fd540828",
                "span_id": "a10f82b530f52d72",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetPaths",
                "parent_span_id": "0311a9b8fd540828",
                "span_id": "a08d29b7d3596a28",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "0311a9b8fd540828",
                "queued_behind": "0",
                "span_id": "cad5e1fbf9821080",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "0311a9b8fd540828",
                "queued_behind": "0",
                "span_id": "b92647a3c25d21df",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "b92647a3c25d21df",
                "span_id": "4f74f9298ccb136c",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "HandOverName",
                "parent_span_id": "b92647a3c25d21df",
                "queued_behind": "0",
                "span_id": "c4a7ed97d4e3df16",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
    ]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 
────────────
     Summary [  44.998s] 862 tests run: 861 passed, 1 failed, 1 skipped
        FAIL [   3.234s] (862/862) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
error: test run failed

Outside the task's layers::

  • crates/minimal/src/cmd/session.rs

Converted to a draft: something above needs a person before review.

Review threads the coder judged:

  • 👍 valid — crates/minimal/src/cmd/boxes/policy.rs: The row now uses an explicit native_host input on the new format_policy_on_host. min session policy sets it from daemon_host_kind. format_policy passes false, so callers that give None for the fabric no longer print the row. The test pins HostNet with no fabric and no native host.

On a native host, min session policy <box> for a host-address box prints host exposures not applied: this box shares the host's network. The row now depends on the daemon's host kind, not on whether a switch fabric is named. A VM-backed host does not print it.

Notes from the agent: Revise round 1. The directive asked for the fix in crates/minimal/src/cmd/session.rs. That file is outside the task's layers, and I touched it for this reason only: the call site now passes native_host from daemon_host_kind. format_policy keeps its signature and passes native_host = false. Because of this, the callers in tests/cli.rs and src/tests.rs stay unchanged and no longer render the row. The new format_policy_on_host takes the explicit input. cargo clippy -p minimal --all-targets reported no warnings or errors. The directive asked me to resolve the thread. My instructions do not let me resolve threads, so the reviewer must do it.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft November 4, 2026 06:33
@norrietaylor
norrietaylor marked this pull request as ready for review November 4, 2026 07:02
@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimal-review — approved

Verdict APPROVE — every review thread is resolved; @norrietaylor closed the last one. The review of 353695ae3646 withheld this approval on the threads open then. Posted as a comment: the App cannot approve its own pull request; the check and the label carry it.

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Nov 4, 2026
@norrietaylor norrietaylor left a comment
Copy link
Copy Markdown
Member

Reviewed against T149's plan block. format_policy_on_host takes the host kind from the caller, so the row no longer infers a native host from a missing fabric. native_host_ip_network_view_says_host_exposures_do_not_apply covers native, VM, no fabric and own-address, and arch-review passes on this head.

@norrietaylor
norrietaylor added this pull request to the merge queue Nov 4, 2026
Merged via the queue into main with commit ee52c1a Nov 4, 2026
36 checks passed
@norrietaylor
norrietaylor deleted the agent/2938-a-native-host-address-box-s-network-view-says-ho branch November 4, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

T149 — A native host-address box's network view says host exposures do not apply

1 participant

0