Skip to content

fix(minvmd): bound the in-force baseline's host-alias reach to its fetch ports - #2444

Merged
norrietaylor merged 5 commits into
mainfrom
inbox-patch/scope-in-force-baseline-alias-ports-1698b5b64d54dd6e
Oct 28, 2026
Merged

norrietaylor merged 5 commits into
mainfrom
inbox-patch/scope-in-force-baseline-alias-ports-1698b5b64d54dd6e

Conversation

@gominimal-aw-bot

@gominimal-aw-bot gominimal-aw-bot Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Routing-Key: inbox-route/I_kwDOSUhdos8AAAABYbq6lA

The node-plane baseline's compiled set admits by subnet alone — no port
dimension — so once the baseline phase goes in force, the gate's
node-plane arm admits frames to the switch's host alias at every port.
The built-in registry and cache endpoints name that alias as the planned
home of the helper's store surface.

Bound the in-force arm in the gate: a node-plane frame to the alias is
admitted only as TCP to the planned store-surface port (443). Every other
protocol or port is the infrastructure drop, the same refusal a box row's
alias frames take. Once host exposures close by default (#2331), this is
wider than the announced phase's alias reach, and the bound must then also
admit the configured exposures. No listener serves 443 on the alias yet;
the PR that flips the phase must feed the port list from that listener.
The policy view shows the bound (100.64.255.254/32 tcp/443). Announced
behavior is untouched.

Verification

  • cargo fmt --all --check --manifest-path target/Cargo.toml — clean
  • cargo clippy --workspace --all-targets --locked --manifest-path target/Cargo.toml -- -D warnings — clean
  • cargo test --locked --manifest-path target/Cargo.toml -p minvmd — 576 passed; the 3 remaining failures (net::answerer ×2, sock::tests::resolve_uds_path_lives_in_provider_dir) reproduce identically on the unmodified tree — pre-existing environment flakes, unrelated to this change
  • Behavioral proof: the new in-force test in_force_baseline_bounds_the_host_alias_to_its_fetch_ports failed before the fix (alias admitted at 18081) and passes after

Summary by CodeRabbit

Security Enhancements

  • Restricted connections to host registry and cache services to TCP port 443.
  • Blocked traffic to the host alias over other ports or protocols; other node-plane destinations continue to follow existing network access policies.

CLI Improvements

  • Baseline endpoint displays now show host registry and cache endpoints with their TCP/443 designation in both text and JSON output.

…tch ports

The node-plane baseline's compiled set admits by subnet alone — it
carries no port dimension — so once the baseline phase goes in force,
the gate's node-plane arm admits frames to the switch's host alias at
every port. The built-in registry and cache endpoints name that alias
because it is where the helper's store surfaces answer, but the reach
the daemon's own fetches need is the HTTPS fetch port, nothing wider.

Bound the in-force arm in the gate: a node-plane frame to the alias at
a port the daemon's fetches do not use is the infrastructure drop,
the same refusal a box row's alias frames take, so in-force reach is
no wider than the announced phase's. The announced arm and every box
row's verdict are untouched.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@gominimal-aw-bot
gominimal-aw-bot Bot requested a review from a team as a code owner October 20, 2026 03:34
@gominimal-aw-bot gominimal-aw-bot Bot added the agent:fix Agentic fix PR eligible for review iteration; min-aw's worker-iterate gates on it. label Oct 20, 2026
@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 284e7718-690a-4b3c-b56c-1dbeb5ae0267
📥 Commits

Reviewing files that changed from the base of the PR and between c38e023 and 0b7e341.

📒 Files selected for processing: 2
  • crates/minvmd/src/net/baseline.rs
  • crates/minvmd/src/net/egress_gate.rs

Included review availability: This review used your included allowance. 3 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

📝 Walkthrough

The node-plane baseline now restricts traffic to the host alias to TCP port 443. Policy output displays matching endpoints with tcp/443. Tests cover enforcement and text and JSON rendering.

Changes: Node-plane host-alias restriction and endpoint rendering

Layer / File(s) Summary
Define the host-alias endpoint contract
crates/minvmd/src/net/baseline.rs
The baseline stores the host alias and defines TCP port 443 as the fetch port. Matching endpoints display with tcp/443; other endpoint strings remain unchanged.
Enforce allowed fetch traffic
crates/minvmd/src/net/egress_gate.rs
When the baseline is in force, traffic to the host alias is allowed only for the configured fetch protocol and port. Tests cover TCP port 443, another TCP port, and ICMP and GRE traffic.
Render and validate policy endpoints
crates/minimal/src/cmd/boxes/policy.rs, crates/minimal/tests/cli.rs
Text and JSON policy output use the baseline display method. CLI tests verify the registry and cache alias endpoints.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix

Possibly related issues

  • gominimal/inbox#1153: The issue requests an own_ip host exposure. This PR constrains in-force host-alias traffic and notes that future configured host exposures require follow-up.

Suggested reviewers: mitodrummer

Merge Risk: ⚪ Minimal · up to 0b7e3

No actionable issue in the supplied review evidence prevents merging after normal checks.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title is concise, specific, and accurately describes the main change: limiting in-force baseline host-alias access to fetch ports.
Description check Passed The description clearly explains the change, affected behavior, deferred exposure handling, and verification results. It does not use the template's exact Summary, Testing, and Checklist headings, and…
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 3 files. (1 skipped: 1 …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description clearly explains the change, affected behavior, deferred exposure handling, and verification results. It does not use the template's exact Summary, Testing, and Checklist headings, and it omits the checklist, but it is otherwise mostly complete.

Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 3 files. (1 skipped: 1 too large.)

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the port with care,
TCP on four-four-three gets through.
The alias endpoints show the rule,
In text and JSON, clear and true.
The cache keeps its own address,
While registry paths wear TCP shoes.

Comment @coderabbitai help to get the list of available commands.

@gominimal-aw-bot gominimal-aw-bot Bot added the agent:resolve Consent gate: pr-conflict-resolver may rewrite this branch label Oct 20, 2026
@norrietaylor norrietaylor changed the title fix: bound the in-force baseline's host-alias reach to its fetch ports fix(minvmd): bound the in-force baseline's host-alias reach to its fetch ports Oct 20, 2026
… policy view

The in-force arm compared only the destination port, which the summary reads from every protocol's
bytes, so ICMP or GRE frames whose bytes read 443 reached the alias. Open only TCP at the fetch
port, and refuse every other protocol as the infrastructure drop.

State where 443 comes from: the planned port of the helper's store surface, with no listener yet.
The change that flips the phase to in force must feed the list from that listener's stack. Drop
the claim that in-force reach is no wider than announced, and note that the bound must also admit
the configured host exposures once they exist.

The policy text and JSON views now spell the alias endpoint with its bound, as
"100.64.255.254/32 tcp/443".
@gominimal-aw-bot gominimal-aw-bot Bot added the needs-human An agent handed off; a human must act, then clear this label. Set by defer and handoffs. label Oct 20, 2026
@gominimal-aw-bot

Copy link
Copy Markdown
Contributor Author

This PR has merge conflicts with its base branch (main) that need human resolution.

Conflicted files:

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

Reason it's not trivial: the only conflicted file is Rust source (*.rs), which is excluded from trivial resolution by this chore's criteria — every hunk in it makes the PR non-trivial.

Recommended action: rebase or merge manually, then remove the needs-human label so this chore re-evaluates.

Generated by PR conflict resolver (side-repo-ops operator) · ⊞ 30.9K · ◷

@norrietaylor

Copy link
Copy Markdown
Member

/revise Merge main into this branch and resolve the conflicts. Keep this PR's behaviour and take main's changes elsewhere; make no other changes. Use git's default merge subject ("Merge ...").

@minimal-foundry

minimal-foundry Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Round 2 of 10 is on this pull request.

branch inbox-patch/scope-in-force-baseline-alias-ports-1698b5b64d54dd6e

round outcome job
1 pushed 9f86df2e
2 pushed 66e9c62f

Updated 2026-10-22T05:27:12.483Z.

…force-baseline-alias-ports-1698b5b64d54dd6e

# Conflicts:
#	crates/minimal/src/cmd/session.rs
@minimal-foundry

Copy link
Copy Markdown
Contributor

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

Resolved conflicts in: crates/minimal/src/cmd/session.rs

No test: line was run.

The branch now contains main. It differs from main only by this PR's change: the in-force baseline bound in egress_gate.rs and baseline.rs, the cli.rs tests, and the policy view that prints the bound (100.64.255.254/32 tcp/443) from crates/minimal/src/cmd/boxes/policy.rs.

Notes from the agent: Only crates/minimal/src/cmd/session.rs conflicted. Main moved format_policy and write_policy_json_noting from session.rs to crates/minimal/src/cmd/boxes/policy.rs. I took main's session.rs as is, and it now matches origin/main. I applied this PR's two-line change (entry.endpoints() -> baseline.display_endpoints(entry)) at its new location in policy.rs, in the merge commit. The merge commit uses git's default subject. The clippy -D warnings errors are in files from main that this PR does not touch, and the local rustc 1.98.1 can be newer than the pinned toolchain. I made no other changes.

@norrietaylor

Copy link
Copy Markdown
Member

/arch-review

@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 · 2 conditions · the full ruling

The in-force gate now bounds the host alias to TCP 443 and refuses all other frames to the alias. This narrows reach and conforms to §7.1 line 244. Two gaps remain. The head defers host-exposure admission through this bound, but no issue owns that work (C1). The REGISTRY_CACHE_FETCH_PORTS doc says the list is empty with no listener, but the value is [443] (C2). Make both edits, and the change conforms.

Ruled at c38e023 against gominimal/arch@109541a48c31 by claude-opus-5-5.

Comment thread crates/minvmd/src/net/egress_gate.rs Resolved
Comment thread crates/minvmd/src/net/baseline.rs Resolved
@norrietaylor

Copy link
Copy Markdown
Member

/revise Apply /arch-review's conditions at c38e023. C1: where the head defers host-exposure admission through the in-force bound, add a comment naming the issues that own that work: gominimal/inbox#1144 and gominimal/inbox#1147. C2: fix the REGISTRY_CACHE_FETCH_PORTS doc comment so it matches the value [443] (it currently says the list is empty with no listener). Comments only; change nothing else.

Name gominimal/inbox#1144 and gominimal/inbox#1147 where the in-force
alias bound defers host-exposure admission. Make the
REGISTRY_CACHE_FETCH_PORTS doc match its value [443].
@minimal-foundry

Copy link
Copy Markdown
Contributor

Round 2 of 10 on a /revise note, pushed as 0b7e341e3242.

No test: line was run.

Review threads the coder judged:

  • 👍 valid — crates/minvmd/src/net/egress_gate.rs:5266: The deferral comment on the in-force alias bound now names gominimal/inbox#1144 and gominimal/inbox#1147 as the owners of the host-exposure admission.
  • 👍 valid — crates/minvmd/src/net/baseline.rs: Rewrote the doc sentence: [443] is the planned port, no listener serves it, only the in-force tests exercise it while the phase is Announced, and flip the node-plane baseline set to in force with DNS-pinned FQDN entries #1786 replaces it with the listener's port or an empty list. The value is unchanged.

A reader of the in-force alias bound in egress_gate.rs now sees that gominimal/inbox#1144 and gominimal/inbox#1147 own the deferred host-exposure admission. The REGISTRY_CACHE_FETCH_PORTS doc comment now says that [443] is the planned port with no listener, that only the in-force tests exercise it while the phase is Announced, and that #1786 replaces it with the listener's port or an empty list.

Notes from the agent: This round changes comments only. No code and no values change. The -D warnings clippy failure is a chunks_exact_to_as_chunks lint in minimald-rpc. That crate is outside this pull request, so the failure is probably from the toolchain on this box. cargo doc did not run because rustdoc is not on this box. The new intra-doc link [NodeBaselinePhase::Announced] names a variant of the type that the comment already links. The PR body is not mine to edit, so the runner or a person must name gominimal/inbox#1144 and gominimal/inbox#1147 there as residuals.

@norrietaylor norrietaylor removed the needs-human An agent handed off; a human must act, then clear this label. Set by defer and handoffs. label Oct 22, 2026
@norrietaylor

Copy link
Copy Markdown
Member

/arch-review

@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

This head conforms to §5.1 line 109 and §7.1 lines 244 and 248. The in-force arm now refuses every frame from the node plane to the host alias, except TCP to port 443. The arm stays latent because NODE_BASELINE_PHASE is still Announced. The last commit names the owners of the deferred host-exposure work and makes the port-list doc match [443]. Before the phase flips, #1786 must show which line-244 opening admits a store surface on the alias. List gominimal/inbox#1144, gominimal/inbox#1147 and #1786 as residuals in the PR body.

Ruled at 0b7e341 against gominimal/arch@109541a48c31 by claude-opus-5-5.

@norrietaylor

Copy link
Copy Markdown
Member

/review

@minimal-foundry

minimal-foundry Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Reviewed: 1 finding, none blocking at 0b7e341e3242.

Address the comments on the diff.

Clobber: none seen.

@minimal-foundry minimal-foundry Bot left a comment

Copy link
Copy Markdown
Contributor

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: 2 of 3 personas ran (correctness, security); did not complete: supply-chain.

Comment thread crates/minvmd/src/net/baseline.rs Resolved
@norrietaylor
norrietaylor added this pull request to the merge queue Oct 28, 2026

@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.

Arch PASS at 0b7e341, CI green, threads resolved; LOW moved to the follow-up digest.

Merged via the queue into main with commit 6471908 Oct 28, 2026
37 checks passed
@norrietaylor
norrietaylor deleted the inbox-patch/scope-in-force-baseline-alias-ports-1698b5b64d54dd6e branch October 28, 2026 06:06
norrietaylor pushed a commit that referenced this pull request Nov 4, 2026
…tch ports (#2444)

Prerequisite for T102. The node-plane baseline's compiled set admits by subnet alone, so
once the baseline phase goes in force the gate's node-plane arm would admit frames to the
switch's host alias at every port. The in-force arm now opens the alias only to TCP at the
daemon's fetch port and refuses every other port and protocol as the infrastructure drop.
The announced arm and every box row's verdict are untouched. The policy text and JSON views
spell the alias endpoint with its bound, as 100.64.255.254/32 tcp/443.

Backport of #2444.

Adapted to the line: the CLI's policy view lives in cmd/session.rs, not cmd/boxes/policy.rs,
and boxes:: reads sessions::.

(cherry picked from commit 6471908)
norrietaylor pushed a commit that referenced this pull request Nov 5, 2026
…tch ports (#2444)

Prerequisite for T102. The node-plane baseline's compiled set admits by subnet alone, so
once the baseline phase goes in force the gate's node-plane arm would admit frames to the
switch's host alias at every port. The in-force arm now opens the alias only to TCP at the
daemon's fetch port and refuses every other port and protocol as the infrastructure drop.
The announced arm and every box row's verdict are untouched. The policy text and JSON views
spell the alias endpoint with its bound, as 100.64.255.254/32 tcp/443.

Backport of #2444.

Adapted to the line: the CLI's policy view lives in cmd/session.rs, not cmd/boxes/policy.rs,
and boxes:: reads sessions::.

(cherry picked from commit 6471908)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:fix Agentic fix PR eligible for review iteration; min-aw's worker-iterate gates on it. agent:resolve Consent gate: pr-conflict-resolver may rewrite this branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant