8000 feat(minimald): route the documented host literal on a native daemon (T116) by minimal-foundry[bot] · Pull Request #2715 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

feat(minimald): route the documented host literal on a native daemon (T116) - #2715

Merged
norrietaylor merged 5 commits into
mainfrom
agent/2698-the-documented-host-literal-routes-and-notices-o
Oct 29, 2026
Merged

norrietaylor merged 5 commits into
mainfrom
agent/2698-the-documented-host-literal-routes-and-notices-o

Conversation

@minimal-foundry
@minimal-foundry minimal-foundry Bot commented Oct 28, 2026 •
Copy link
Copy Markdown
Contributor

T116 — The documented host literal routes and notices on a native daemon

slice: S18
kind: task
covers: NET-004
size: M
est: 120 code, 180 tests
executor: agent
difficulty: routine
model: standard
diagnostics: a person reads the daemon log, which carries the rate-limited deprecation line for a frame to the literal address, naming the box, and none for a frame to host.min.internal
observability: one rate-limited warn line per box per interval on the relay span when a frame goes to the literal address, and no line for the switch's own alias
layers:
- switch:
- crates/switch/src/lib.rs: the gvproxy config for a /24 switch carved from the default /16 also maps the documented literal 100.64.255.254 to the host loopback and carries it as a gateway virtual address, so the literal reaches what host.min.internal reaches; the /16 switch a guest daemon uses renders as it does today
test: cargo nextest run -p switch gvproxy_config_maps_documented_literal_on_a_slash_24
- relay:
- crates/minimald/src/net/switch.rs: the relay's deprecation notice watches the documented literal (the default subnet's host alias) instead of the attached switch's alias, so a frame to the supported name is never called deprecated; the egress verdict for the literal stays the verdict for the alias (minimal#2636's proposed fix)
test: cargo nextest run -p minimald legacy_host_literal_routes_with_deprecation
test: cargo nextest run -p minimald relay_notices_documented_literal_not_the_switch_alias
produces: none
consumes: none
proof: On a native Linux daemon a box that connects to 100.64.255.254 reaches what host.min.internal reaches and the daemon log records the deprecation, while a connection by name records none.

Proof

On a native Linux daemon, who 8000 se switches are /24 blocks carved from 100.64.0.0/16, the gvproxy config now maps 100.64.255.254 to the host loopback and lists it as a gateway virtual IP. A box that connects to 100.64.255.254 reaches what host.min.internal reaches, and gets the same egress verdict as the switch alias. The daemon log carries one rate-limited warn line per box that names the box (switch_addr), the literal and host.min.internal. A connection by name goes to the switch's own alias and logs no deprecation line. The /16 switch of a guest daemon renders as before.

Notes from the agent: New helper SwitchSubnet::documented_host_literal() in the switch crate. It returns the literal only for a subnet carved from the default /16 that does not hold the literal itself. On a switch outside the default block (a custom subnet), the relay still notices the literal but does not decide it as the switch alias, because that switch does not map it. On the default /16 the literal is the switch alias, so a frame sent by name there still notices: a frame does not carry the name it was resolved from (unchanged behaviour). The deprecation line moved from info to warn, per the task's observability field. Its text is unchanged. The verdict reads a copy of the frame with its destination rewritten to the switch alias. The forwarded frame is unchanged, and the drop warning still names the literal. The proof is shown by unit tests only. No live gvproxy or native daemon ran on this box. Extra runs: cargo nextest run -p switch (63 passed), cargo nextest run -p minimald net:: (381 passed), cargo clippy -p minimald -p switch --all-targets (clean). The first switch test run timed out at 20 minutes during a cold git fetch of the topiary dependency. The re-run passed.

Layer exception

crates/boxes/src/core/egress.rs is outside T116's layers. Arch condition C1 at 87e597fd (arch_rulings 499, §5.3 line 146) puts the documented host literal into the fixed class of egress::InfrastructureDenySet, because on a carved switch it is one of the switch's own addresses. The deny set lives in boxes, so round 1 added a builder there that holds the literal as a /32. It adds no behaviour beyond that class entry.

Tests

line exit tail
cargo nextest run -p switch gvproxy_config_maps_documented_literal_on_a_slash_24 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-5a02... Compiling switch v0.0.1 (/workbench/crates/switch) Finished 'test' profile [unoptimized] target(s) in 3.35s ──────────── Nextest run ID 5f9ca2cc-3089-4f91-b45b-72ed9d5ebfe1 with
cargo nextest run -p minimald legacy_host_literal_routes_with_deprecation 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-c53a... 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
cargo nextest run -p minimald relay_notices_documented_literal_not_the_switch_alias 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-ca26... Compiling stdlib v0.0.22 (/workbench/crates/stdlib) Compiling version v0.8.0 (/workbench/crates/version) Compiling decode v0.0.1 (/workbench/crates/decode) Compiling mlog v0.

Verify

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

Base

The base branch moved while the coder worked; it was merged in before the tests ran.

Closes #2698


Generated by Claude Code

A /24 switch carved from the default /16 now maps 100.64.255.254 to the
host loopback and lists it as a gateway virtual IP, so the literal reaches
what host.min.internal reaches. The /16 renders as before.
The relay's deprecation notice now watches 100.64.255.254, the default
subnet's host alias, so a frame to host.min.internal on a carved /24
switch is never called deprecated. On such a switch the egress verdict
decides the literal as the switch's own alias. The notice is a warn line.
@coderabbitai
coderabbitai Bot commented Oct 28, 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: 12fe0d0e-504a-48d2-879b-9b37977c2bbf

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

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

@minimal-foundry
minimal-foundry Bot commented Oct 28, 2026 •
Copy link
Copy Markdown
Contributor Author

Approved: no findings at 566ad488b5e2.

Nothing to do.

Clobber: none seen.

@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 — No findings.

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

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Oct 28, 2026
@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_WITH_CONDITIONS · 1 condition · the full ruling

The change routes 100.64.255.254 as host.min.internal on a carved /24 switch, and it keeps that reach default-deny. Section 7.1 line 248 requires this. The relay decides the literal as the switch alias, and a DNS pin cannot lift that drop. On a carved switch the literal is now one of the switch's own addresses. Section 5.3 line 146 says the rebinding deny set always refuses these, but that set holds only the carved alias. Add the literal to the fixed deny set, as C1 says. C1 can merge open as a filed residual.

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

Comment thread crates/minimald/src/net/switch.rs Resolved
Copy link
Copy Markdown
Member

/revise Close arch condition C1 from the ruling at 87e597fd (arch_rulings 499, thread 4397842609). Fix it in this PR rather than as a residual.

  • C1 (§5.3 line 146: the rebinding deny set always refuses the switch's own addresses): on a carved switch the documented host literal is now a gatewayVirtualIPs entry that nat maps to 127.0.0.1, so it is one of the switch's own addresses. In crates/minimald/src/net/switch.rs, make BoxGate::for_session_steered() (line 1557) and node_dns_layer() (line 603) add subnet.documented_host_literal(), when it is Some, to the fixed class of the egress::InfrastructureDenySet they build, beside subnet.host_alias().
  • Give crates/boxes/src/core/egress.rs InfrastructureDenySet a builder for it, for example with_host_literal([u8; 4]), that holds the address as a /32.
  • Add a test that rebinding_admits refuses a box-zone answer of 100.64.255.254 on a 100.64.3.0/24 switch.
  • Change nothing else.

Generated by Claude Code

On a carved /24 switch the literal 100.64.255.254 is a gateway virtual
address mapped to the host loopback, so the rebinding deny set must
refuse it like the switch's own alias.
@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 design §7.1 line 248 and §5.3 line 146. On a carved switch, the literal 100.64.255.254 gets the verdict of the switch alias. The rebinding deny set now refuses the literal, the same as the alias. The deprecation line watches the literal only. No condition is open.

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

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

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

line exit tail
cargo nextest run -p switch gvproxy_config_maps_documented_literal_on_a_slash_24 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-5da1... Compiling switch v0.0.1 (/workbench/crates/switch) Finished 'test' profile [unoptimized] target(s) in 3.62s ──────────── Nextest run ID 0b72d356-5248-428f-93eb-54e7369b0103 with
cargo nextest run -p minimald legacy_host_literal_routes_with_deprecation 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-9788... 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
cargo nextest run -p minimald relay_notices_documented_literal_not_the_switch_alias 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-ec31... Compiling stdlib v0.0.22 (/workbench/crates/stdlib) Compiling version v0.8.0 (/workbench/crates/version) Compiling decode v0.0.1 (/workbench/crates/decode) Compiling mlog v0.

Verify min task run agent-verify passed.

Outside the task's layers::

  • crates/boxes/src/core/egress.rs

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

Review threads the coder judged:

  • 👍 valid — crates/minimald/src/net/switch.rs:1160: node_dns_layer() and BoxGate::for_session_steered() now add documented_host_literal() as a /32 via InfrastructureDenySet::with_host_literal. A new test checks that rebinding_admits refuses a box-zone 100.64.255.254 on a 100.64.3.0/24 switch.

On a native Linux daemon a box on a carved /24 switch that connects to 100.64.255.254 reaches what host.min.internal reaches, and the daemon log records the deprecation for that box. A connection by name records none. No DNS answer, a box-zone answer included, can resolve a name to 100.64.255.254 on that switch, because the rebinding deny set refuses it as one of the switch's own addresses.

Notes from the agent: Revise round 1 closes arch condition C1. crates/boxes/src/core/egress.rs is outside the task layers. The directive asked for the InfrastructureDenySet::with_host_literal builder there, so I touched it on purpose. In switch.rs, node_dns_layer() and BoxGate::for_session_steered() now build their deny set through one new helper, infrastructure_deny_set(subnet). The helper adds the literal as a /32 when documented_host_literal() is Some. The new test is rebinding_refuses_documented_literal_on_a_carved_switch. clippy -p minimald -p boxes --all-targets is clean. I did not run just clippy-strict.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft October 28, 2026 08:04
@norrietaylor
norrietaylor marked this pull request as ready for review October 28, 2026 08:17
@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-arch[bot] crates/minimald/src/net/switch.rs:1160. No findings.

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

@minimal-foundry minimal-foundry Bot removed the review:approved minimal-review approved the current head label Oct 28, 2026
@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 566ad488b5e2 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 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.

Babysitter review at 566ad488. I read the switch, minimald and boxes changes against T116's plan block. On a carved switch, crates/switch maps the documented host literal to the host loopback, and the daemon relay routes it as host.min.internal routes, with one deprecation warn line naming the literal. A connection by name records no deprecation. infrastructure_deny_set (switch.rs:613) adds the literal to the rebinding deny set for both the node DNS layer and the steered box gate, which closes arch C1. The three test lines in the PR body pass. The boxes builder is a recorded layer exception. No findings.


Generated by Claude Code

Copy link
Copy Markdown
Member

/review The minimal-review run on 566ad48 (check run 122697803118) has been in progress since 07:55Z and never finished. Re-run the review on this head.


Generated by Claude Code

@norrietaylor norrietaylor changed the title T116 — The documented host literal routes and notices on a native daemon feat(minimald): route the documented host literal on a native daemon (T116) Oct 29, 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.

Babysitter approval at 566ad48: every merge gate passes at this head (arch PASS at 566ad48, zero open threads, every lane aggregator green). Squash title feat(minimald): route the documented host literal on a native daemon (T116) and the squashed message pass commitlint. Queued for squash merge.


Generated by Claude Code

@norrietaylor
norrietaylor added this pull request to the merge queue Oct 29, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 29, 2026
@norrietaylor
norrietaylor added this pull request to the merge queue Oct 29, 2026
Merged via the queue into main with commit eebb8fb Oct 29, 2026
37 checks passed
@norrietaylor
norrietaylor deleted the agent/2698-the-documented-host-literal-routes-and-notices-o branch October 29, 2026 02:07
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.

T116 — The documented host literal routes and notices on a native daemon

1 participant

0