8000 docs(specs): record runtime ports in the host table within the host-held grant by norrietaylor · Pull Request #1898 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

docs(specs): record runtime ports in the host table within the host-held grant - #1898

Merged
norrietaylor merged 6 commits into
mainfrom
docs/net-138-runtime-admissions
Oct 8, 2026
Merged

norrietaylor merged 6 commits into
mainfrom
docs/net-138-runtime-admissions

Conversation

@norrietaylor
@norrietaylor norrietaylor commented Oct 3, 2026 •
Copy link
Copy Markdown
Member

Summary

NET-138 on main still says "IF the in-VM daemon reports … a port … keep it out of the table", and its note says the client records the ports the attached human answered yes to under ask. Neither matches the code on main. The VM host daemon (minvmd) records runtime ports reported by the in-VM daemon inside the row's host-held grant, and it holds the pending-ask book itself.

This change makes the spec describe that behaviour:

  • NET-138's note lists every port a row admits: declared ports; under dynamic_ingress = allow, listen-published ports (NET-016/017) and ports min net expose publishes (NET-044); under ask, ports the attached human answered yes to (NET-045). Every runtime port lies inside the row's range.
    • allow ports: the in-VM daemon reports each one. The helper records it only inside the stance and range the host-side creator registered with the row. A report selects inside that grant and never changes a rule (design §7.6).
    • ask ports: the in-VM daemon's report only raises the question. The host holds the pending ask, offers it to attached host clients with facts read from the host row, records the first answer and audits it. An ask port enters the row only on a yes the host recorded, and a guest report under ask is refused.
    • One residual is accepted: the row key is guest-chosen, so an escapee can select within a sibling's allow grant, or raise an ask that the offer names by the sibling's host-row facts.
  • The guest-report exclusion now names declared ports. Runtime ports are the one report the table takes.
  • Three new sub-requirements:
    • A report inside the grant is added to the row's admitted port set, and removed on withdrawal or row withdrawal. allow admits a port inside the range. ask admits one only after the attached human's yes recorded by the host (NET-045).
    • A report outside the grant (absent or deny stance, ask stance, absent range, port outside the range), or for a row the table does not hold, is refused, and the in-VM publish unwinds with no partial mapping (NET-047).
    • An admit report past the per-row cap or rate is refused. The working values are the ones the code fixes: RUNTIME_PORT_CAP = 256 runtime ports per row and ROW_ADMIT_RATE_PER_SECOND = 10 recorded admit reports per trailing second per row. A re-admit of a held port and a withdrawal count toward neither. A host-recorded ask yes is bounded by the ask queue and the dialog, not by the cap or rate.
  • Host audit copy (NET-046): crates/minvmd/src/control.rs appends to audit/box-admissions.log for each recorded allow port (admit_report_and_reply → append_audit_copy) and for each ask event, the outcome included (serve_guest_ask → audit_ask). A refused allow report is a warn line in the daemon log, not an audit line, and the spec says so.

Plan

T84 #1897 implements this. It takes over T54's dropped CLI layer and covers T53's allow path, T54's yes answer, and T22's listen-publish on VM-backed hosts. Every verif 8000 y target names a test on main: admit_report_recorded_within_host_grant, admit_report_refused_outside_range_or_under_deny and admit_report_refused_past_row_cap_or_rate in crates/minvmd/src/box_registry.rs.

Lint

just lint-prose on the spec: main has 579 errors and 293 warnings. This branch has 588 and 296. The added alerts are the patterns every requirement block already carries: the verify: line (STE "verify", noun string, test-name spelling) and STE sentence length on the EARS sentences. Vale does not lint the annotation comments.

…eld grant

NET-138 said the client records a port the attached human answered yes to
under ask. The client attaches through a terminal and never sees the
answer, and only the in-VM daemon observes a listener. The in-VM daemon
now reports each runtime port, and the helper records it only inside the
dynamic_ingress stance and range the host-side creator registered with the
row. A report outside that grant is refused and leaves no partial mapping.
The guest-report exclusion now names declared ports, so runtime ports are
the one report the table takes.
@coderabbitai
coderabbitai Bot commented Oct 3, 2026 •
Copy link
Copy Markdown
Contributor

Warning

Review limit reached

  • Run on-demand review

This review includes 1 billable file and costs up to $0.25.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 31 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 761bd4c2-3d6f-4777-9495-8160aaa95ffd
📥 Commits

Reviewing files that changed from the base of the PR and between 5ec89e9 and c0e4120.

📒 Files selected for processing (1)
  • docs/specs/18-spec-box-networking/18-spec-box-networking.md
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@github-actions
github-actions Bot commented Oct 3, 2026 •
Copy link
Copy Markdown
Contributor

Spec lint

docs/specs/18-spec-box-networking/18-spec-box-networking.md — 11 finding(s)

docs/specs/18-spec-box-networking/18-spec-box-networking.md:159: P004 NET-009 names test 'native_resolution_without_proxy_env', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:304: P004 NET-040 names test 'fresh_install_own_ip_ingress_publishes_loopback', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:309: P004 NET-041 names test 'installer_switch_binary_executable', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:347: P004 NET-048 names test 'linux_amd64_manifest_ships_vm_stack', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:352: P004 NET-049 names test 'fresh_linux_kvm_activate_local_minvmd', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:357: P004 NET-050 names test 'linux_arm64_manifest_ships_vm_stack', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:362: P004 NET-051 names test 'fresh_arm64_kvm_activate_local_minvmd', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:669: P004 NET-139 names test 'vsock_rpc_refuses_non_host_cid', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:686: P004 NET-132 names test 'proxy_sees_each_vm_box_by_its_switch_address', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:712: P004 NET-134 names test 'deny_all_box_reaches_proxy_and_no_other_host_port', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:736: P004 NET-107 names test 'session_outbound_request', which was not found in the repository

Advisory. None of this blocks the merge; the review decides.

Advisory, and never a merge gate. Linter: gominimal/foundry@b913de94, spec format: How Minimal Writes Specs.

@norrietaylor
Copy link
Copy Markdown
Member Author

Amended in 1af5846 to meet the three conditions from the design review:

  1. Message shape and bounds. The NET-138 note now describes the report as §7.6's fixed, size-bounded status message: row key, port, protocol, and admit or withdraw. It carries no address, name or rule. A new sub-requirement refuses a report once the row holds the per-row cap of runtime ports or exceeds the per-row report rate, and the refused publish unwinds (NET-047). Its test is admit_report_refused_past_row_cap_or_rate, which is now on T84's vmhost layer in T84 — Record a box's runtime-admitted ports in the VM host daemon's table on the in-VM daemon's report, within the host-held grant #1897.
  2. The ask residual. Under ask, the helper cannot observe the answer. The host-side bound is the range alone, and the human gate is the in-VM daemon's. An escapee reaches no port outside the range.
  3. The sibling residual. The row key is guest-chosen, so an escapee can select within a sibling's grant. That is the resident-union bound, cited to Gatehouse §6.11, and the key is not a host-attributed claim.

The "not a rule change" claim now cites Gatehouse §6.11's single node-asserted input instead of standing on its own.

@norrietaylor
norrietaylor marked this pull request as ready for review October 3, 2026 17:04
@norrietaylor
norrietaylor requested a review from a team as a code owner October 3, 2026 17:04
@norrietaylor
norrietaylor enabled auto-merge October 3, 2026 17:04
@minimal-foundry
minimal-foundry Bot commented Oct 3, 2026 •
Copy link
Copy Markdown
Contributor

Approved: no findings at c0e412063266.

Nothing to do.

Clobber: none: git log on the spec shows this branch only (three docs commits, one merge), nothing reverting a recent fix.

@norrietaylor
norrietaylor marked this pull request as draft October 3, 2026 17:08
auto-merge was automatically disabled October 3, 2026 17:08

Pull request was converted to draft

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

The host now holds the pending-ask book, so the premise that only the in-VM daemon
sees an answer is gone. List every runtime port a row admits, state the cap and
rate as the working values the code fixes, and name the host audit writers.
…ement

The ask rule is the security property of the runtime-port path, so
state it as a requirement with its own proof, not only in annotations.
@norrietaylor
norrietaylor marked this pull request as ready for review October 6, 2026 05:42
@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 — approved

Verdict APPROVE — No findings.

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Oct 6, 2026
@norrietaylor
norrietaylor added this pull request to the merge queue Oct 7, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 7, 2026
@norrietaylor
norrietaylor added this pull request to the merge queue Oct 7, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 7, 2026
@norrietaylor
norrietaylor added this pull request to the merge queue Oct 8, 2026
Merged via the queue into main with commit d374070 Oct 8, 2026
36 checks passed
@norrietaylor
norrietaylor deleted the docs/net-138-runtime-admissions branch October 8, 2026 00:55
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.

2 participants

0