Skip to content

T147 — A project file cannot open host ports to its boxes - #2956

Merged
norrietaylor merged 3 commits into
mainfrom
agent/2936-a-project-file-cannot-open-host-ports-to-its-box
Nov 4, 2026
Merged

norrietaylor merged 3 commits into
mainfrom
agent/2936-a-project-file-cannot-open-host-ports-to-its-box

Conversation

@minimal-foundry

Copy link
Copy Markdown
Contributor

T147 — A project file cannot open host ports to its boxes

slice: S21
kind: task
covers: NET-159
size: S
est: 30 code, 60 tests
executor: agent
difficulty: routine
model: light
diagnostics: the daemon and min logs carry the warning once per expansion of a project file with a [host-exposures] table
observability: one tracing::warn! line when a project file carries the table, as [secret-store-rules] does today
layers:
- project:
- crates/boxes/src/core/egress.rs: HOST_EXPOSURES_TABLE and warn_project_host_exposures, the [host-exposures] twin of warn_project_store_rules: a project file's table is ignored, and the warning reads exactly minimal.toml has a [host-exposures] table. A project cannot open host ports to its boxes, so the table is ignored. Put the table in your own config.toml instead. Run min dirs to find that file.; it is true because the reader takes host exposures from the client config.toml alone (NET-159), and project_host_exposures_ignored_with_warning pins the text
- crates/mfile/src/lib.rs: calls warn_project_host_exposures beside warn_project_store_rules on the project file's unknown keys
test: cargo nextest run -p boxes project_host_exposures_ignored_with_warning
produces: none
consumes: none
proof: A project minimal.toml with a [host-exposures] table opens no host port, and min warns that a project file cannot configure one.

Proof

A project minimal.toml with a top-level [host-exposures] table no longer reaches any host-exposure reader. The mfile reader removes it from the unknown-field warning and logs one warning instead: minimal.toml has a [host-exposures] table. A project cannot open host ports to its boxes, so the table is ignored. Put the table in your own config.toml instead. Run min dirs to find that file.

Notes from the agent: The warning is wired only at the top level of minimal.toml, the place a [host-exposures] table sits. The [session] section check still calls only warn_project_store_rules, so a [session.host-exposures] key gets the generic unknown-field warning. The ignore is structural: the mfile schema has no host-exposures field, so the table stays in extra and nothing reads it. The client config.toml reader for NET-159 is not part of this task. cargo clippy -p mfile --all-targets is clean.

Tests

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

Verify

min task run agent-verify passed ([tasks.verify]).

Closes #2936

A project minimal.toml cannot open host ports to its boxes. The mfile
reader now drops the table from the unknown-field list and logs one
warning, as it does for [secret-store-rules].
@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: 57ebcd0c-deb5-40f3-a7fa-0c4372a8c48a

You can disable this status message by setting the reviews.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 03ac7eacb5e5.

@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: CONDITIONS · 1 condition · the full ruling

The ignore and the warning conform to section 7.1 line 250 and AT7. They are the exact twin of the store-rules check. The remedy in the warning is not true at this head. At this head, the client Config refuses an unknown [host-exposures] table. A user who moves the table into config.toml gets a parse error, and min stops. The field comes in #2871, which is still open. C1 makes this PR merge after #2871. Then the text is true.

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

Comment thread crates/boxes/src/core/egress.rs Resolved

@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 — 1 finding, 1 inline.

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

Comment thread crates/mfile/src/lib.rs Resolved
The test reads a project minimal.toml with the table and checks that the
reader logs the host-exposures warning once and no unknown-field warning.
@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 1 of 10 on the runtime's review findings, pushed as 03ac7eacb5e5.

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

Verify min task run agent-verify passed.

Review threads the coder judged:

A project minimal.toml with a [host-exposures] table opens no host port. The reader drops the table, and the min and daemon logs carry one warning that a project file cannot open host ports to its boxes and that the table belongs in the user's own config.toml.

Notes from the agent: Revise round 1. Added an mfile-level test that reads a project file with a top-level [host-exposures] table and checks for one host-exposures warning and no generic unknown-field warning. The warning text is unchanged. It tells the user to put the table in config.toml. At this branch head the client-config Config has no host-exposures field and uses deny_unknown_fields, so that advice is true only after #2871 merges. Merge this pull request after #2871, or merge main in after it lands. That ordering is outside this task's layers (crates/client-config).

@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 networking design section 7.1 line 250 and architecture AT7. The minimal.toml reader ignores a project [host-exposures] table and logs one specific warning. No code reads host exposures from a project file. The new mfile test drives a real file through File::from_dir. Thus the proof tests the rule at the reader. Make sure that a plan task owns the client config.toml reader for NET-159. This change does not add it.

Ruled at 03ac7ea 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: 2 unresolved threads — minimal-arch[bot] crates/boxes/src/core/egress.rs:2210, minimal-foundry[bot] crates/mfile/src/lib.rs:1541. No findings.

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

@norrietaylor norrietaylor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed 03ac7eac against T147's plan block. A project's [host-exposures] table opens no port and gets its own warning in place of the unknown-field one. The warning's advice holds now that #2871 has merged, because Config accepts the table. The test through the mfile reader closes the LOW thread, and arch-review passes on this head.

@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 03ac7eacb5e5 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 added this pull request to the merge queue Nov 4, 2026
Merged via the queue into main with commit 20dd86b Nov 4, 2026
36 checks passed
@norrietaylor
norrietaylor deleted the agent/2936-a-project-file-cannot-open-host-ports-to-its-box branch November 4, 2026 18:45
norrietaylor pushed a commit that referenced this pull request Nov 4, 2026
…penings (#2871)

T102. Behaviour change, for the release notes: host-address boxes reach only ports opened
in [host-exposures]. Before this, a host-address box reached the host through
host.min.internal at every port. Own-address boxes stay refused end to end: the host gate
would admit a configured exposure under their rules, but the guest still refuses them.

The egress gate refuses a flow to the host alias unless a port in the current
[host-exposures] table of the client config.toml opens it, and the row's own rules then
decide the flow. Each entry is { proto, port }, with proto defaulting to tcp. The node
plane alone also reaches the ports its baseline endpoints open at the alias. minvmd rereads
the table when the file changes, so an entry opens or closes its port without a restart. A
missing or unparseable file fails closed. An entry at a Minimal listener's port is refused
and logged. Each refused flow logs under the host-alias rule with the row and the port.
This retires MINVMD_HOST_EXPOSURE_PORTS, and minvmd warns if it is still set.

Backport of #2871. Lands after T103 here, as on main: its baseline and gate edits sit on
that commit. T147 #2956, the project-file warning, stays out of 0.7.3. A project's
[host-exposures] table still opens nothing, because the reader takes only the client file.

Adapted to the line:
- The client config lives in sessions/src/client/config.rs, and host_exposures joins it
  without main's [secrets] and [secret-store-rules] sections.
- boxes:: reads sessions::, tests draw session ids from a v4 UUID, and DropLimiter stays
  in egress_gate.rs.

(cherry picked from commit 964a71b)
norrietaylor pushed a commit that referenced this pull request Nov 5, 2026
…penings (#2871)

T102. Behaviour change, for the release notes: host-address boxes reach only ports opened
in [host-exposures]. Before this, a host-address box reached the host through
host.min.internal at every port. Own-address boxes stay refused end to end: the host gate
would admit a configured exposure under their rules, but the guest still refuses them.

The egress gate refuses a flow to the host alias unless a port in the current
[host-exposures] table of the client config.toml opens it, and the row's own rules then
decide the flow. Each entry is { proto, port }, with proto defaulting to tcp. The node
plane alone also reaches the ports its baseline endpoints open at the alias. minvmd rereads
the table when the file changes, so an entry opens or closes its port without a restart. A
missing or unparseable file fails closed. An entry at a Minimal listener's port is refused
and logged. Each refused flow logs under the host-alias rule with the row and the port.
This retires MINVMD_HOST_EXPOSURE_PORTS, and minvmd warns if it is still set.

Backport of #2871. Lands after T103 here, as on main: its baseline and gate edits sit on
that commit. T147 #2956, the project-file warning, stays out of 0.7.3. A project's
[host-exposures] table still opens nothing, because the reader takes only the client file.

Adapted to the line:
- The client config lives in sessions/src/client/config.rs, and host_exposures joins it
  without main's [secrets] and [secret-store-rules] sections.
- boxes:: reads sessions::, tests draw session ids from a v4 UUID, and DropLimiter stays
  in egress_gate.rs.

(cherry picked from commit 964a71b)
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.

T147 — A project file cannot open host ports to its boxes

1 participant