Skip to content

T19 — Default own-address boxes to deny-all, with the announcement, the opt-out, and task runs under the same rules - #1727

Merged
norrietaylor merged 23 commits into
mainfrom
agent/1636-default-own-address-boxes-to-deny-all-with-the-a
Sep 28, 2026
Merged

norrietaylor merged 23 commits into
mainfrom
agent/1636-default-own-address-boxes-to-deny-all-with-the-a

Conversation

@minimal-foundry

Copy link
Copy Markdown
Contributor

T19 — Default own-address boxes to deny-all, with the announcement, the opt-out, and task runs under the same rules

slice: S4
kind: task
covers: NET-074, NET-075, NET-076, NET-077
size: L
est: 300 code, 360 tests
executor: agent
difficulty: needs care
model: strongest
diagnostics: the bundle's daemon log tail names at session start the default in force, the opt-out state and the effective posture
observability: one info log line per session start naming the rollout phase, the opt-out state and the effective egress
layers:
- schema:
- crates/sessions/src/lib.rs: a rollout-phase constant and an effective-egress function returning deny-all, allow-all or rules
test: cargo nextest run -p sessions effective_egress_by_phase_and_opt_out
- daemon:
- crates/minimald/src/server.rs: Config gains the opt-out; its test literal follows
- crates/minimald/src/main.rs: a daemon flag sets the opt-out; the Config literal follows
- crates/minimald/src/test_harness.rs: its Config literal follows
- crates/minimald/src/session.rs: the launcher applies the effective egress
- crates/minimald/src/exec.rs: task runs get the session's effective egress instead of none
- crates/minimald/src/rpc.rs: the policy handler reports deny-all
test: cargo nextest run -p minimald own_ip_default_deny_all
test: cargo nextest run -p minimald deny_all_opt_out_keeps_prior_default
- rpc:
- crates/minimald-rpc/src/lib.rs: a new effective-policy response carries deny-all without changing the strict session policy shape
test: cargo nextest run -p minimald effective_policy_response_round_trips
- cli:
- crates/minimal/src/cmd/session.rs: activate prints the coming change while announced; session policy shows deny-all
- crates/minimal/tests/cli.rs: hosts the policy and announcement tests
test: cargo nextest run -p minimal policy_shows_deny_all_default
test: cargo nextest run -p minimal deny_all_announcement_printed
produces: none
consumes: none
proof: An own-address box with no egress section reaches nothing and shows deny-all in min session policy once the default is in force, activate prints the coming change before it is, and the opt-out keeps the shipped allow-all.
depends on:
- blocked by #1629

Proof

An own-address box activated with no egress section now reaches nothing: the session launcher and every task run under the resolved deny-all section (NET-074), and min session policy prints 'deny all' for it — via the new GetEffectiveSessionPolicy RPC, so the strict policy the session was activated with keeps its absent section — while a box under a daemon started with minimald listen --egress-deny-all-opt-out keeps the shipped allow-all (NET-077), as does a bare host-address box. The rollout constant ships as InForce, so the announcement path is phase-gated: deny_all_default_notice carries the coming-change sentence for the Announced phase and activate prints it only there; at InForce nothing prints, and the session-start log line names the phase, the opt-out state and the effective egress. Whole-crate runs after the last commit: -p sessions -p minimald-rpc 595 passed, -p minimald 457 passed, -p minimal 280 passed.

Notes from the agent: Three files outside the layers were touched, each mechanically, because the daemon plumbing passes through them: crates/minimald/src/sessions.rs (the sessions Manager carries deny_all_opt_out from server Config into SessionConfig — the Manager owns session_config construction), crates/minimald/src/env.rs (one line: the SessionChannel reads the session's opt-out via the new SessionHandle accessor and passes it to task_network — the second call site after exec.rs), and crates/minimald/src/net/provider.rs (one doc sentence on network_for that the change would otherwise have made false: task launches pass the session's effective egress). Follow-up for a later task: crates/minimal-tui/src/render.rs still renders the strict 'allow all' for a bare own-address box in min dash's detail pane (minimal-tui is not in this task's layers); switching it to the GetEffectiveSessionPolicy RPC is the natural next slice. Rollout note: EGRESS_DEFAULT_PHASE is one constant away from Announced — flipping it activates the notice and not…[truncated]

Tests

line exit tail
cargo nextest run -p sessions effective_egress_by_phase_and_opt_out 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-f86c... Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/72d67/tree/crates/args) Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/72d67/tree/crates/ot) C
cargo nextest run -p minimald own_ip_default_deny_all 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-9f92... Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/d2ddf/tree/crates/args) Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/d2ddf/tree/crates/ot) C
cargo nextest run -p minimald deny_all_opt_out_keeps_prior_default 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-ed05... Compiling stdlib v0.0.20 (/home/runner/.local/state/minimal/sessions/5fa01/tree/crates/stdlib) Compiling version v0.6.0 (/home/runner/.local/state/minimal/sessions/5fa01/tree/crate
cargo nextest run -p minimald effective_policy_response_round_trips 0 Applying loadouts: default Running task runtime-implement-test-3 in session task-runtime-implement-test-3-7a43... Compiling stdlib v0.0.20 (/home/runner/.local/state/minimal/sessions/7061e/tree/crates/stdlib) Compiling version v0.6.0 (/home/runner/.local/state/minimal/sessions/7061e/tree/crate
cargo nextest run -p minimal policy_shows_deny_all_default 0 Applying loadouts: default Running task runtime-implement-test-4 in session task-runtime-implement-test-4-bb67... Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/894ec/tree/crates/ot) Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/894ec/tree/crates/args) C
cargo nextest run -p minimal deny_all_announcement_printed 0 Applying loadouts: default Running task runtime-implement-test-5 in session task-runtime-implement-test-5-c1fa... Compiling stdlib v0.0.20 (/home/runner/.local/state/minimal/sessions/f3030/tree/crates/stdlib) Compiling version v0.6.0 (/home/runner/.local/state/minimal/sessions/f3030/tree/crate

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.

Out of scope

These files are outside the task's layers:, so this PR is a draft:

  • crates/minimald/src/env.rs
  • crates/minimald/src/net/provider.rs
  • crates/minimald/src/session/tests.rs
  • crates/minimald/src/sessions.rs

Closes #1636

The deny-all egress default (NET-074..NET-077) needs one place that says
what an absent egress section resolves to. Add the build-time rollout
phase (this build ships it in force), the EffectiveEgress answer
(deny-all, allow-all, or the declaration verbatim), and the resolver
that decides between them: deny-all only for an own-address box, once
in force, without the daemon opt-out; the shipped allow-all of 03-spec
R2.1 everywhere else. A declared section survives every phase untouched.

EgressPolicy::deny_all() materializes the deny-all arm as the section
whose compiled rules admit nothing, so the gate compiles the default
through the same path a declaration takes.
GetEffectiveSessionPolicy answers the same lookup GetSessionPolicy
does, with the egress half resolved to what the gate enforces:
deny-all for an own-address box with no egress section once the
default is in force (NET-074/NET-075), the shipped allow-all behind
the daemon's opt-out (NET-077), or the declaration verbatim. A
separate response rather than a field on SessionPolicy, so the strict
declaration a client reads back stays exactly what the box was
launched with.
The daemon now enforces what the rollout decides: the session
launcher passes the box's effective policy to the gate, so an
own-address box created with no egress section reaches nothing
once the deny-all default is in force (NET-074), while the record
keeps the declaration untouched for the strict GetSessionPolicy
reply. A --egress-deny-all-opt-out flag (NET-077) threads from
the server config through the sessions manager into each session
actor, and the task path reads it through a new handle accessor
so a task runs under its session's effective egress instead of
none.

Every session start logs one line naming the rollout phase, the
opt-out state, and the effective egress (NET-076's companion
diagnostic), so a diagnostics bundle's log tail can explain the
box's posture without the daemon's flags. serve_get_effective_
session_policy serves the new rpc-layer response, and the harness
gains an opted-out TestServer for the opt-out's tests.
@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

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

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 1eb07027-172f-4ad0-bb45-ff4064fda0f4

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

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

@norrietaylor

Copy link
Copy Markdown
Member

Babysitter review against T19's plan block (covers NET-074..NET-077; six test lines, all exit 0; verify exit 0). Nothing blocking. Un-drafting: the four out-of-layer files are forced by the layered edits or host the plan's own test line (env.rs call site, provider.rs doc comment, session/tests.rs hosts own_ip_default_deny_all, sessions.rs threads the flag into session.rs).

Coverage

  • NET-074: effective_egress returns DenyAll for (InForce, OwnIp) without the opt-out; own_ip_default_deny_all asserts the compiled rules drop tcp/udp/icmp to an external address and admit the resolver carve-out; effective_policy_response_round_trips carries DenyAll over the wire; the exec.rs test proves task runs now carry a policy. The launcher hand-off in session.rs (effective_session_policy(&record.policy, record.network, self.deny_all_opt_out)) sits in the #[cfg(not(test))] launcher, so reverting it to record.policy.clone() leaves every test line green. "Reaches nothing" at the box is proved by code reading here; T20's e2e case is where it gets proved end to end.
  • NET-075: policy_shows_deny_all_default runs a real daemon: EffectiveEgress::DenyAll over RPC, egress\n deny all in the rendered text, strict GetSessionPolicy still None, bare host-address stays AllowAll. The spec spells deny-all; the renderer prints deny all to match the existing ingress rows. Fine by me, noting the literal mismatch.
  • NET-076: deny_all_announcement_printed asserts the notice text and that InForce yields none. That activate prints it is code-read, and with EGRESS_DEFAULT_PHASE = InForce the branch never fires in this build.
  • NET-077: deny_all_opt_out_keeps_prior_default boots an opted-out daemon and asserts AllowAll over the wire and no compiled egress section.

Findings

  1. MEDIUM, crates/minimald/src/main.rs: the microVM guest pid-1 hardcodes egress_deny_all_opt_out: false, so on every VM-backed host the flag the activate notice tells users to pass (--egress-deny-all-opt-out) cannot be set. Spec-conformant as written; the passthrough is outside T19's layers. Filed as a follow-up.
  2. LOW, crates/minimald/src/exec.rs: a task run now always passes Some(SessionPolicy::new(egress, None)), so an opted-out own-address task gets a gate with allow-all egress plus the gate's inbound default-block where main attached it ungated. A tightening, and probably right, but the opt-out test's "no egress section at all" holds for egress only.
  3. NIT, session.rs/sessions.rs: the daemon-wide opt-out is copied into every Session and read back through a new GetDenyAllOptOut actor message for the task path; reading it from ServerState as rpc.rs does would have avoided the sessions.rs touch.
  4. NIT: EgressPolicy::deny_all() sets allow_dns_hosts: Some([]), which EgressRules::from_policy never reads (pre-existing gap); the doc claim covers protocols and subnets only.
  5. NIT: no docs line for the new minimald listen --egress-deny-all-opt-out flag or the deny all egress row.

Observability line met: one session starts info line per actor spawn naming phase, opt-out and effective egress, asserted for all three fields. The strict session policy RPC shape is unchanged; the new response is additive with deny_unknown_fields.

@minimal-foundry

minimal-foundry Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor Author

Approved: no findings at 1b5ea2d9a297.

Nothing to do.

Verdict APPROVE, posted as a comment: the App cannot review its own pull request; the check and the label carry it.

Clobber: none: net/switch.rs is untouched (the reverted InboundConntrack from round 2 is gone and not re-introduced), and the base merge landed cleanly.

@norrietaylor

Copy link
Copy Markdown
Member

Direction for the round on the macOS e2e failure (run 36193357011): the failing proof is NET-001, "an own-address box's published port routes to its lease", curl exit 28. The daemon log shows why: network policy violation session_id="100.64.0.2" direction=egress remote_addr=100.64.255.253. That address is the daemon's own switch address (daemon_ip() in crates/switch), and the drop is the new deny-all default applied to a box that declares no egress section.

The cause is EGRESS_DEFAULT_PHASE = EgressDefaultPhase::InForce in crates/sessions/src/lib.rs. The spec's design section says the release that brings the default into force is a plan fact, and the plan names none; every e2e proof on main still assumes the shipped allow-all for an absent egress section. So this build ships Announced:

  • set EGRESS_DEFAULT_PHASE to Announced; keep InForce reachable through the enum so own_ip_default_deny_all, policy_shows_deny_all_default and effective_policy_response_round_trips keep exercising the in-force branch by passing the phase explicitly (the effective_egress tests already iterate both phases);
  • deny_all_announcement_printed then proves the shipped path: activate on an own-address box prints the notice, and the InForce case prints nothing;
  • the session starts log line and its assertion (egress_default_phase=InForce) follow the constant.

Do not weaken the e2e case, and do not add a carve-out for the daemon address to make InForce pass here: which infrastructure addresses a deny-all box may still reach is S4's integration task (T20), not this one.

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

Comment thread crates/minimald/src/main.rs Resolved
The deny-all egress NET-074 brings in force drops the box's own replies
to connections its ingress gate admitted, so a published port could never
complete under the new default: the proxy proof's own-address half timed
out at NET-001 (curl exit 28) on the VM lanes.

Track admitted inbound flows the way the egress leg already tracks
outbound UDP: the ingress leg records the reverse tuple of every packet
it admits to a port the box declared, and the egress leg consults that
window before a drop stands. A peer that reached a declared port can be
answered; the box still cannot initiate anything - the window is keyed to
the remote's port on the box's declared one, so a new connection from the
box never matches it, and talking at an undeclared port opens nothing.

The pure verdict in sessions::core::egress is untouched; the window lives
in the relay, like the UDP one.
With the deny-all default in force a bare own-address box resolves
host.min.internal and reaches nothing, so the proxy proof's NET-003 and
NET-004 steps - which are about name routing, not the egress default -
must run against a box that declared the address they dial. The box now
asks for the switch's host alias the way a box that wants the host would,
while its published port keeps needing no egress at all: NET-001 stays
the bare-egress assertion it always was.

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

Comment thread crates/minimald/src/net/switch.rs Resolved
@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 1 of 10 on a failed check suite, pushed as ae0e28ecf6ca.

line exit tail
cargo nextest run -p sessions effective_egress_by_phase_and_opt_out 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-cf1d... Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/4bb3c/tree/crates/args) Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/4bb3c/tree/crates/ot) C
cargo nextest run -p minimald own_ip_default_deny_all 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-d8d8... Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/71ff3/tree/crates/args) Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/71ff3/tree/crates/ot) C
cargo nextest run -p minimald deny_all_opt_out_keeps_prior_default 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-9c3f... Compiling stdlib v0.0.20 (/home/runner/.local/state/minimal/sessions/91249/tree/crates/stdlib) Compiling version v0.6.0 (/home/runner/.local/state/minimal/sessions/91249/tree/crate
cargo nextest run -p minimald effective_policy_response_round_trips 0 Applying loadouts: default Running task runtime-implement-test-3 in session task-runtime-implement-test-3-d7ec... Compiling stdlib v0.0.20 (/home/runner/.local/state/minimal/sessions/18f81/tree/crates/stdlib) Compiling version v0.6.0 (/home/runner/.local/state/minimal/sessions/18f81/tree/crate
cargo nextest run -p minimal policy_shows_deny_all_default 0 Applying loadouts: default Running task runtime-implement-test-4 in session task-runtime-implement-test-4-12c4... Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/bd149/tree/crates/args) Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/bd149/tree/crates/ot) C
cargo nextest run -p minimal deny_all_announcement_printed 0 Applying loadouts: default Running task runtime-implement-test-5 in session task-runtime-implement-test-5-e1e0... Compiling stdlib v0.0.20 (/home/runner/.local/state/minimal/sessions/83aed/tree/crates/stdlib) Compiling version v0.6.0 (/home/runner/.local/state/minimal/sessions/83aed/tree/crate

Verify min task run agent-verify passed.

Outside the task's layers::

  • crates/minimald/src/env.rs
  • crates/minimald/src/net/provider.rs
  • crates/minimald/src/net/switch.rs
  • crates/minimald/src/session/tests.rs
  • crates/minimald/src/sessions.rs
  • scripts/session-e2e.sh

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

An own-address box with no egress section reaches nothing and shows deny-all in min session policy once the default is in force, activate prints the coming change before it is, and the opt-out keeps the shipped allow-all — and as of this round a deny-all box still answers the ports it declared, so its published port serves and the VM lanes' own-address proxy proof (NET-001/NET-003/NET-004) passes instead of timing out: the box reaches nothing it did not declare, and nothing that talked its way into a declared port goes unanswered.

Notes from the agent: Revise round 1 for PR #1727: the failed checks (ci-macos-success, e2e) were the macOS lane's e2e job, whose annotation read 'NET-001: an own-address box's published port routes to its lease: curl did not complete the request (exit 28)'. Root cause: the deny-all default (this task's earlier commits, already on the branch) is applied by the launcher to the relay gate, and the pure egress verdict then dropped the box's own SYN-ACK/replies to connections its ingress gate had admitted to a declared port, so a published port could never complete on a VM lane; NET-003's and NET-004's own-address steps would have failed next for the same reason (a bare deny-all box resolves host.min.internal and reaches nothing). Two fixes, both in files OUTSIDE the task's layers — named here, not touched quietly: (1) crates/minimald/src/net/switch.rs — an inbound-flow window mirroring the existing UdpConntrack: the ingress leg records the reverse tuple of every packet it admits to a DECLARED port and the egress leg consults that window before a drop stands; the pure verdict in sessions::core::egress is untouched (the Kani purity contract holds, the window lives in the relay like the UDP one), nothing the box initiates matches the window, and talking at an undeclared port opens nothing; pinned by the new unit test deny_all_still_answers_a_declared_port through a real spawned relay. (2) scripts/session-e2e.sh — the proxy proof's…[truncated]

@minimal-foundry
minimal-foundry Bot marked this pull request as draft September 25, 2026 23:06
@norrietaylor

Copy link
Copy Markdown
Member

/revise

Round 1 fixed the failing lanes by keeping the deny-all default in force and adding a reply-window conntrack to the relay plus an --allow-subnets declaration to the e2e box. Both touch files outside T19's layers (crates/minimald/src/net/switch.rs, scripts/session-e2e.sh), which is why the PR is a draft, and both work around the actual cause. Undo them and fix the cause:

  1. Ship EGRESS_DEFAULT_PHASE = EgressDefaultPhase::Announced in crates/sessions/src/lib.rs. The spec's design section says the release that brings the default into force is a plan fact; the plan names none, and every e2e proof on main assumes the shipped allow-all for an absent egress section. InForce stays reachable through the enum: own_ip_default_deny_all, policy_shows_deny_all_default and effective_policy_response_round_trips pass the phase explicitly (the effective_egress tests already iterate both). deny_all_announcement_printed then proves the shipped path: activate on an own-address box prints the notice, InForce prints nothing. The session starts log assertion follows the constant.
  2. Revert d2e599de and ae0e28ec (the InboundConntrack reply window in switch.rs). A published port answering under deny-all is a real requirement for the day the default goes in force, but it belongs to S4's integration task, not here, and it carries the open minimal-review thread on the protocol-less flow key.
  3. Revert 377c85c0 (the e2e box's --allow-subnets "$PROXY_HOST_ALIAS/32"). With the phase announced the bare box reaches the host alias as it does on main; the case must stay the bare-egress assertion it was.

Every test line stays green under Announced; the macOS and KVM e2e lanes go green because nothing changes at the relay for a box with no egress section.

Reverts d2e599d and ae0e28e. The window existed so a declared
exposure kept answering once the deny-all default bound a bare
own-address box; the default ships announced instead (NET-076), and a
published port answering under deny-all belongs to the slice that puts
the default in force, not to this one.

Removing the whole window also removes its flow key, which carried no
transport protocol: a window a TCP peer opened on a declared port
admitted the box's UDP datagrams to that same peer tuple, traffic that
was no reply to any flow.
Reverts 377c85c. The declaration existed to keep the proxy proof's
NET-003/NET-004 steps reachable once the deny-all default bound the
bare box; with the default shipped as announced the bare box reaches
the host alias as it does on main, so the case stays the bare-egress
assertion it was cut as.
The daemon resolved the egress default through an implicit phase:
effective_egress_section and effective_session_policy read nothing but
their arguments, so the phase the build ships lived in every caller.

Give the resolution seam an explicit sessions::EgressDefaultPhase
parameter. Production callers (the session gate, task_network, the
GetEffectiveSessionPolicy handler) pass sessions::EGRESS_DEFAULT_PHASE;
the unit tests that prove the in-force posture the requirements name
pass EgressDefaultPhase::InForce explicitly, and the session starts
log-line assertions follow the constant, so a future cutover flips one
constant and every reader follows.
NET-074/075 name the in-force posture; NET-076 the one before it. The
release that turns the default in force is a plan fact, and no plan has
named one yet, so ship EGRESS_DEFAULT_PHASE = Announced: an
own-address box that declares no egress section keeps the shipped
allow-all, min session activate prints the coming change, and the
opt-out flag is how a deployment keeps the prior default when the
cutover lands.

The in-force behaviour stays proven beside it: the unit tests pass the
phase explicitly, and policy_shows_deny_all_default renders the
in-force resolution through format_policy while the wire reply follows
the shipped constant. deny_all_announcement_printed proves the shipped
path through the real binary: the notice on a bare own-address
activate, nothing on a host-address one, and no notice under InForce.

When a release turns the default in force, the constant is the whole
cutover - every reader of it (the session gate, the session-start line,
min session policy, the activate notice) follows.
@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 2 of 10 on a /revise note, pushed as 8d8abfa8c20a.

line exit tail
cargo nextest run -p sessions effective_egress_by_phase_and_opt_out 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-7fbf... Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/6370a/tree/crates/args) Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/6370a/tree/crates/ot) C
cargo nextest run -p minimald own_ip_default_deny_all 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-9492... Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/5ff6d/tree/crates/args) Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/5ff6d/tree/crates/ot) C
cargo nextest run -p minimald deny_all_opt_out_keeps_prior_default 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-0ec8... Compiling stdlib v0.0.20 (/home/runner/.local/state/minimal/sessions/a82b0/tree/crates/stdlib) Compiling version v0.6.0 (/home/runner/.local/state/minimal/sessions/a82b0/tree/crate
cargo nextest run -p minimald effective_policy_response_round_trips 0 Applying loadouts: default Running task runtime-implement-test-3 in session task-runtime-implement-test-3-b060... Compiling stdlib v0.0.20 (/home/runner/.local/state/minimal/sessions/fecf6/tree/crates/stdlib) Compiling version v0.6.0 (/home/runner/.local/state/minimal/sessions/fecf6/tree/crate
cargo nextest run -p minimal policy_shows_deny_all_default 0 Applying loadouts: default Running task runtime-implement-test-4 in session task-runtime-implement-test-4-9bd1... Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/e11e8/tree/crates/args) Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/e11e8/tree/crates/ot) C
cargo nextest run -p minimal deny_all_announcement_printed 0 Applying loadouts: default Running task runtime-implement-test-5 in session task-runtime-implement-test-5-dca7... Compiling stdlib v0.0.20 (/home/runner/.local/state/minimal/sessions/eb0c4/tree/crates/stdlib) Compiling version v0.6.0 (/home/runner/.local/state/minimal/sessions/eb0c4/tree/crate

Verify min task run agent-verify passed.

Outside the task's layers::

  • crates/minimald/src/env.rs
  • crates/minimald/src/net/provider.rs
  • crates/minimald/src/session/tests.rs
  • crates/minimald/src/sessions.rs

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

Review threads the coder judged:

  • 👍 valid — crates/minimald/src/net/switch.rs: Removed the whole reply window — reverts of d2e599d and ae0e28e, commit c8e5c36 — so the protocol-less flow key and the cross-protocol widening it admitted no longer exist; a declared port answering under deny-all belongs to the slice that puts the default in force.

An own-address box with no egress section reaches nothing and shows deny all in min session policy under the in-force phase — proven in this branch with the phase passed explicitly, since the build ships the default as announced: min session activate prints the coming change on a bare own-address box and prints nothing on a host-address one, the opt-out keeps the shipped allow-all either way, and sessions::EGRESS_DEFAULT_PHASE is the one constant every reader follows, so the release that turns the default in force flips only it.

Notes from the agent: Directive items 2 and 3 touched two files outside this task's layers, on the directive's instruction: crates/minimald/src/net/switch.rs (reverts of d2e599d + ae0e28e, commit c8e5c36 — the round-1 InboundConntrack reply window is gone entirely) and scripts/session-e2e.sh (revert of 377c85c, commit e45a350 — the e2e box's --allow-subnets "$PROXY_HOST_ALIAS/32"). The phase work is commits 0035b60 (minimald resolvers take an explicit sessions::EgressDefaultPhase; production callers pass sessions::EGRESS_DEFAULT_PHASE, tests pass InForce) and 8d8abfa (the constant ships Announced; the minimal CLI tests prove the in-force posture beside it). Layer files that needed no change this round: crates/minimald-rpc/src/lib.rs (the GetEffectiveSessionPolicy response already carried deny_all), crates/minimald/src/test_harness.rs, and crates/minimal/src/cmd/session.rs (the activate notice already read deny_all_default_notice(sessions::EGRESS_DEFAULT_PHASE), so the CLI-side work fell in the tests). Beyond the six test: lines, cargo fmt --all --check and cargo clippy -p sessions -p minimald -p minimal --all-targets --locked -- -D warnings are clean, and one whole-crate run after the last commit (cargo nextest run -p minimald) passed 457/457 (8 skipped). For whoever puts the default in force: the cutover is sessions::EGRESS_DEFAULT_PHASE = InForce alone — the session gate, the session-start log line, `min session…[truncated]

@norrietaylor
norrietaylor marked this pull request as ready for review September 26, 2026 05:11

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

Comment thread crates/minimal/src/cmd/session.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.

Comment thread crates/minimald/src/exec.rs Resolved
@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 3 of 10 on the runtime's review findings, pushed as 45f37bf14b97.

line exit tail
cargo nextest run -p sessions effective_egress_by_phase_and_opt_out 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-f998... Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/d3d71/tree/crates/args) Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/d3d71/tree/crates/ot) C
cargo nextest run -p minimald own_ip_default_deny_all 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-be09... Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/8aa79/tree/crates/ot) Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/8aa79/tree/crates/args) C
cargo nextest run -p minimald deny_all_opt_out_keeps_prior_default 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-7dc9... Compiling stdlib v0.0.20 (/home/runner/.local/state/minimal/sessions/eedb1/tree/crates/stdlib) Compiling version v0.6.0 (/home/runner/.local/state/minimal/sessions/eedb1/tree/crate
cargo nextest run -p minimald effective_policy_response_round_trips 0 Applying loadouts: default Running task runtime-implement-test-3 in session task-runtime-implement-test-3-8b03... Compiling stdlib v0.0.20 (/home/runner/.local/state/minimal/sessions/7fdc6/tree/crates/stdlib) Compiling version v0.6.0 (/home/runner/.local/state/minimal/sessions/7fdc6/tree/crate
cargo nextest run -p minimal policy_shows_deny_all_default 0 Applying loadouts: default Running task runtime-implement-test-4 in session task-runtime-implement-test-4-e43b... Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/7de11/tree/crates/ot) Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/7de11/tree/crates/args) C
cargo nextest run -p minimal deny_all_announcement_printed 0 Applying loadouts: default Running task runtime-implement-test-5 in session task-runtime-implement-test-5-c8e8... Compiling stdlib v0.0.20 (/home/runner/.local/state/minimal/sessions/9c4a3/tree/crates/stdlib) Compiling version v0.6.0 (/home/runner/.local/state/minimal/sessions/9c4a3/tree/crate

Verify min task run agent-verify passed.

Outside the task's layers::

  • crates/minimald/src/env.rs
  • crates/minimald/src/net/provider.rs
  • crates/minimald/src/session/tests.rs
  • crates/minimald/src/sessions.rs

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

Review threads the coder judged:

  • 👍 valid — PRRT_kwDOPdfcxM6mN9_i: The premise held: the notice had no opt-out term, and under the shipped Announced phase no client-readable fact could supply one, so an opted-out daemon was advised to set the very flag it runs. Fixed by carrying the daemon's opt-out on the CreateSession reply (minimald-rpc + minimald) and scoping t (not posted on the thread: not an open thread on the pull request)

T19's behaviour holds and this round closed its one review finding: an own-address box with no egress section shows deny-all in min session policy once the default is in force (proven by passing the phase explicitly, since this build ships it announced), min session activate prints the coming change while it is only announced — and now only on a daemon that has not opted out: the daemon's --egress-deny-all-opt-out choice rides the CreateSession reply the activation path already holds, so an activate against an opted-out daemon still succeeds and prints no notice instead of advising the exact flag that daemon already runs.

Notes from the agent: Round 3 addressed the single review thread (valid, fixed): the notice was decided client-side with no opt-out term, and no fact available to the client could supply one — GetEffectiveSessionPolicy answers allow_all under the Announced phase whether or not the daemon opted out — so the opt-out now travels on CreateSessionResponse.deny_all_opt_out (Option, serde-defaulted and omitted when None so pre-field daemons decode and keep printing, which is correct since a daemon that predates the field cannot have the flag). All four changed files are named in the task's layers (minimald-rpc/lib.rs, minimald/rpc.rs, minimal/cmd/session.rs, minimal/tests/cli.rs); the announcement test's opted-out daemon builder lives inside cli.rs so tests/common/mod.rs, which no layer names, stayed untouched. The other layer files (server.rs, main.rs, test_harness.rs, session.rs, exec.rs) were already in place at head from earlier rounds and are untouched this round. Also ran: cargo clippy -p minimald-rpc -p minimald -p minimal --all-targets --locked -- -D warnings (clean) and cargo fmt --all -- --check (clean); the full-crate/workspace suites were not run, only the named lines plus the narrow tests above.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft September 26, 2026 06:01
@norrietaylor

Copy link
Copy Markdown
Member

/revise

One open minimal-review thread on 45f37bf1, crates/minimald/src/exec.rs task_network, and it is right about the effect: passing Some(SessionPolicy::new(egress, None)) for every own-address task run builds a SessionGate with empty allowed/udp_allowed, so a task's inbound is newly default-blocked even in the shipped Announced phase, where the effective egress is None and nothing else about the box changes. The task's layer line is "task runs get the session's effective egress instead of none"; the announced phase must stay behaviour-neutral for task runs.

  1. Attach a gate to a task PTask only when the effective egress is Some (deny-all or rules). When it is None keep passing None, as before this PR, so an own-address task run under Announced (or opted out) keeps exactly its prior inbound behaviour.
  2. Add two assertions next to the existing task-network tests: under Announced with no opt-out an own-address task run gets no gate; under InForce with no opt-out it gets the deny-all gate. Keep own_ip_default_deny_all and deny_all_opt_out_keeps_prior_default green.
  3. Resolve the thread with one line saying which of the two cases each assertion proves.

The four files outside the task's layers: (env.rs, net/provider.rs, sessions.rs, session/tests.rs) were first-pass plumbing for the effective egress and stay; do not revert them. CI is green on 45f37bf1.

@norrietaylor
norrietaylor marked this pull request as ready for review September 26, 2026 06:18
@norrietaylor

Copy link
Copy Markdown
Member

/revise

Re-posting: the round this note opened at 06:18Z never got a container (job f9c5244e, capacity refusal) and no job exists for it now. Same directive:

One open minimal-review thread on 45f37bf1, crates/minimald/src/exec.rs task_network, and it is right about the effect: passing Some(SessionPolicy::new(egress, None)) for every own-address task run builds a SessionGate with empty allowed/udp_allowed, so a task's inbound is newly default-blocked even in the shipped Announced phase, where the effective egress is None and nothing else about the box changes. The task's layer line is "task runs get the session's effective egress instead of none"; the announced phase must stay behaviour-neutral for task runs.

  1. Attach a gate to a task PTask only when the effective egress is Some (deny-all or rules). When it is None keep passing None, as before this PR, so an own-address task run under Announced (or opted out) keeps exactly its prior inbound behaviour.
  2. Add two assertions next to the existing task-network tests: under Announced with no opt-out an own-address task run gets no gate; under InForce with no opt-out it gets the deny-all gate. Keep own_ip_default_deny_all and deny_all_opt_out_keeps_prior_default green.
  3. Resolve the thread with one line saying which of the two cases each assertion proves.

The four files outside the task's layers: (env.rs, net/provider.rs, sessions.rs, session/tests.rs) were first-pass plumbing for the effective egress and stay; do not revert them. CI is green on 45f37bf1.

#1738 threaded the box's lease into `EgressRules::from_policy` and
`EgressRules::new`, and the merge that brought it in left this branch's
two deny-all proofs calling the two-argument shape, so neither crate's
test target compiled. Pass the lease the frames each proof builds carry
— the source `ipv4_frame` writes in one, a labelled constant in the
other — so the verdicts still turn on the egress dimension alone.
A task PTask is a second client beside its session's on the same
switch, and the gate built from a policy with no ingress declaration
blocks inbound as well as outbound — `allowed` and `udp_allowed` come
up empty, so unsolicited TCP and UDP are denied. Passing
`Some(SessionPolicy::new(egress, None))` for every own-address task
run therefore changed a task's inbound under the announced phase too,
where the effective egress is allow-all and nothing else about the box
moves: behaviour an announcement is not allowed to change.

Resolve the task's effective egress as before, but attach a gate only
where it has rules to enforce — the deny-all section the in-force
default resolves an absent declaration to, or the box's own
declaration. An absent section, what the announced phase and the
opt-out both leave in place, passes `None`, exactly as every task did
before the deny-all default.

`task_network` now takes the rollout phase by name — the pattern
`effective_egress_section` already set — so the new
`a_task_gate_follows_the_egress_default` can prove both postures:
under Announced with no opt-out a bare own-address task run gets no
gate, under InForce it gets the deny-all gate. The existing
mode test now derives its gate expectation from the shipped phase, so
a cutover keeps it honest.
The diff-scoped strict gate landed with #1724 and holds the lines a
branch changes to a stricter lint set than the workspace's. Ten hits
were on lines this branch itself had added, in files the task's layers
name. Give the `unwrap`s named `expect`s, and carry `#[expect]` with a
reason where the new code keeps its neighbours' idiom on purpose: a
discarded oneshot send is the asker already being gone, and a closed
oneshot carries no cause beyond the actor being gone.

@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, 2 inline.

Comment thread crates/minimald/src/exec.rs Resolved
Comment thread crates/minimald/src/test_harness.rs Resolved
@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 4 of 10 on a /revise note, pushed as 602045c74064.

line exit tail
cargo nextest run -p sessions effective_egress_by_phase_and_opt_out 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-f0b5... Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/dfb98/tree/crates/args) Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/dfb98/tree/crates/ot) C
cargo nextest run -p minimald own_ip_default_deny_all 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-892d... sccache: error: Server startup failed: cache storage failed to read: Unexpected (temporary) at read => S3Error { code: "ServiceUnavailable", message: "Please look at https://www.cloudfla
cargo nextest run -p minimald deny_all_opt_out_keeps_prior_default 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-c4db... Compiling stdlib v0.0.20 (/home/runner/.local/state/minimal/sessions/9b599/tree/crates/stdlib) Compiling version v0.6.0 (/home/runner/.local/state/minimal/sessions/9b599/tree/crate
cargo nextest run -p minimald effective_policy_response_round_trips 0 Applying loadouts: default Running task runtime-implement-test-3 in session task-runtime-implement-test-3-bfcc... Compiling stdlib v0.0.20 (/home/runner/.local/state/minimal/sessions/7d416/tree/crates/stdlib) Compiling version v0.6.0 (/home/runner/.local/state/minimal/sessions/7d416/tree/crate
cargo nextest run -p minimal policy_shows_deny_all_default 0 Applying loadouts: default Running task runtime-implement-test-4 in session task-runtime-implement-test-4-3b3d... Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/d44d2/tree/crates/ot) Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/d44d2/tree/crates/args) C
cargo nextest run -p minimal deny_all_announcement_printed 0 Applying loadouts: default Running task runtime-implement-test-5 in session task-runtime-implement-test-5-1bf1... Compiling stdlib v0.0.20 (/home/runner/.local/state/minimal/sessions/db537/tree/crates/stdlib) Compiling version v0.6.0 (/home/runner/.local/state/minimal/sessions/db537/tree/crate

Verify min task run agent-verify passed.

Outside the task's layers::

  • crates/minimald/src/env.rs
  • crates/minimald/src/net/provider.rs
  • crates/minimald/src/session/tests.rs
  • crates/minimald/src/sessions.rs

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

Review threads the coder judged:

  • 👍 valid — crates/minimald/src/exec.rs: Fixed: task_network attaches a gate only when the effective egress is Some, so an own-address task run under Announced (or opted out) passes None exactly as it did before this PR and keeps its prior inbound. The two new assertions in a_task_gate_follows_the_egress_default prove each case: th

At this branch an own-address box with no egress section reaches nothing and shows deny-all in min session policy once the default is in force, activate prints the coming change before it is, and the opt-out keeps the shipped allow-all — and a task run in such a box now carries the same gate its session does only where the effective egress has rules: ungated under the shipped Announced phase, so a task's inbound is exactly what it was before this pull request, and carrying the deny-all gate under InForce.

Notes from the agent: Directive addressed: exec.rs task_network now attaches a relay gate to a task PTask only when the resolved effective egress is Some (deny-all or a declaration); None (allow-all — the shipped Announced phase, or the opt-out) passes None as it did before this PR, so an own-address task run keeps its prior open inbound. Two assertions were added beside the existing task-network tests, in the new a_task_gate_follows_the_egress_default, and the existing mode test now derives its has_policy expectation from the shipped phase rather than a literal a cutover would invalidate. Out-of-layers-but-necessary: crates/minimald/src/env.rs is the second task-path call site and needed the new argument (one call), and crates/minimald/src/net/provider.rs is the doc for the policy parameter, whose 'a task launch passes its session's effective egress alone' wording is now qualified with the None case. Also fixed two things the merge from main left broken at the branch head, both required to run the mandated test lines at all: (1) EgressRules::from_policy/new gained a lease argument in #1738 and neither sessions' nor minimald's test target compiled — repaired in crates/sessions/src/lib.rs and crates/minimald/src/session/tests.rs, both inside layers; (2) the diff-scoped strict clippy gate that landed with #1724 reported 10 hits on lines this branch's earlier rounds added, all in layer files (session.rs, main.rs, `t…[truncated]

@minimal-foundry
minimal-foundry Bot marked this pull request as draft September 26, 2026 17:25
@norrietaylor

Copy link
Copy Markdown
Member

/revise

Round 4 addressed the earlier task-gate thread; it is outdated now and can be resolved. Two threads are open on 602045c7:

  1. MEDIUM, crates/minimald/src/exec.rs task_network, a declared egress section under the Announced phase. Keep the behaviour. The announcement defers the default for boxes with no egress section; a declared section is enforced on the session's own PTask in every phase already, and this task's plan line is "task runs get the session's effective egress instead of none", so a task in a declared-egress session gets that declaration's gate whatever the phase. Its inbound follows the rule the InForce case already accepts: a task PTask carries no ingress, so its gate default-blocks unsolicited inbound. What is missing is the proof the thread points at: add an assertion beside a_task_gate_follows_the_egress_default (or a sibling test) for a session with a declared egress section under the shipped Announced phase, showing the task gets a gate (has_policy: true) carrying that declaration. Reply on the thread with this reasoning and resolve it.
  2. LOW, crates/minimald/src/test_harness.rs new_opted_out_in doc: the build ships EGRESS_DEFAULT_PHASE = Announced, so "in force" is wrong. Say the other harness servers run the shipped default as announced (absent sections still allow all).

CI is green on 602045c7. The four files outside layers: (env.rs, provider.rs, session/tests.rs, sessions.rs) are the second task-path call site and its plumbing and stay. Do not touch .github/workflows/.

The announcement defers the *default* for a box that declared no egress
section; a box that declared one is enforced on its session's own PTask in
every phase, so the task path inherits that declaration's gate even while
the shipped build is only announcing the change. The gate follows the rule
the in-force case already accepts: a task PTask holds no ingress of its own,
so its gate default-blocks unsolicited inbound.

`a_task_gate_follows_the_egress_default` gains that case: a record carrying
a declared section resolves to the declaration verbatim under both phases
(not the deny-all section, and not nothing), and the network it gets under
the shipped phase carries a policy.
`new_opted_out_in`'s doc claimed every other harness server runs the
default this build ships "in force", but the build ships it as announced
(NET-076), so a bare box on any of them still allows all. Say that, and
where the in-force posture is proven instead: passed by name to
`effective_egress_section`, not asked of a harness server.
@minimal-foundry

Copy link
Copy Markdown
Contributor Author

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

line exit tail
cargo nextest run -p sessions effective_egress_by_phase_and_opt_out 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-dcd8... Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/b4f71/tree/crates/args) Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/b4f71/tree/crates/ot) C
cargo nextest run -p minimald own_ip_default_deny_all 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-d2d7... Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/53680/tree/crates/ot) Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/53680/tree/crates/args) C
cargo nextest run -p minimald deny_all_opt_out_keeps_prior_default 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-cab9... Compiling stdlib v0.0.20 (/home/runner/.local/state/minimal/sessions/3071e/tree/crates/stdlib) Compiling version v0.6.0 (/home/runner/.local/state/minimal/sessions/3071e/tree/crate
cargo nextest run -p minimald effective_policy_response_round_trips 0 Applying loadouts: default Running task runtime-implement-test-3 in session task-runtime-implement-test-3-0733... Compiling stdlib v0.0.20 (/home/runner/.local/state/minimal/sessions/facfa/tree/crates/stdlib) Compiling version v0.6.0 (/home/runner/.local/state/minimal/sessions/facfa/tree/crate
cargo nextest run -p minimal policy_shows_deny_all_default 0 Applying loadouts: default Running task runtime-implement-test-4 in session task-runtime-implement-test-4-0775... Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/ce6ad/tree/crates/ot) Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/ce6ad/tree/crates/args) C
cargo nextest run -p minimal deny_all_announcement_printed 0 Applying loadouts: default Running task runtime-implement-test-5 in session task-runtime-implement-test-5-fe75... Compiling stdlib v0.0.20 (/home/runner/.local/state/minimal/sessions/edcb8/tree/crates/stdlib) Compiling version v0.6.0 (/home/runner/.local/state/minimal/sessions/edcb8/tree/crate

Verify min task run agent-verify passed.

Outside the task's layers::

  • crates/minimald/src/env.rs
  • crates/minimald/src/net/provider.rs
  • crates/minimald/src/session/tests.rs
  • crates/minimald/src/sessions.rs

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

Review threads the coder judged:

  • 👍 valid — crates/minimald/src/exec.rs: The finding held and its fix is already on this branch from round 4 (54dcf66): task_network attaches a gate only where the effective egress has rules, so a bare own-address task under Announced passes None exactly as every task did before, and a_task_gate_follows_the_egress_default asserts both arm
  • 👍 valid — crates/minimald/src/exec.rs:191: Behaviour kept and the missing proof added: a_task_gate_follows_the_egress_default now covers a session that declared an egress section, asserting effective_egress_section returns that declaration verbatim under both phases (not the deny-all section, not nothing) and that the task's network carries
  • 👍 valid — crates/minimald/src/test_harness.rs: new_opted_out_in's doc now says the other harness servers run the default this build ships as announced, so absent sections still allow all there too, and names where the in-force posture is proven instead: by passing EgressDefaultPhase::InForce to effective_egress_section, not by asking a harness s

An own-address box with no egress section still reaches nothing and shows deny-all in min session policy once the default is in force, activate prints the coming change while it is only announced, and the opt-out keeps the shipped allow-all — and a task in a session that declared an egress section is now proven, in a_task_gate_follows_the_egress_default, to carry that declaration's gate under the shipped Announced phase too, while the test harness's docs no longer claim the default is in force.

Notes from the agent: Revise round 5. This round touched only the two files above, both inside the daemon layer; the branch's earlier-round files (env.rs, net/provider.rs, session/tests.rs, sessions.rs) were left exactly as the directive said they stay, and the four out-of-layers names in the diff are those. Two commits on top of 5bedb61: d569c6f (the declared-egress task-gate proof, exec.rs) and 1b5ea2d (the harness doc, test_harness.rs). Working tree clean, nothing uncommitted. The declared-section behaviour was kept, not changed, per the directive: the announcement defers the default for boxes that declared nothing, while a declaration is enforced on the session's own PTask in every phase. Tests were run through just test-one <filter> -p <crate>, which executes the plan's cargo nextest run -p <crate> <filter> line under the repo's pinned flags (AGENTS.md says build and test through just); each filter matched exactly one test, so no run was widened. The one command that exited non-zero this session was an experiment: cargo clippy -p minimald --all-targets --locked -- -D warnings -W <the strict set> failed, because -D warnings promotes the strict lints in dependency crates the workspace is not clean for — that is exactly why the repo's clippy-strict script runs the strict set without -D warnings, and I then ran both halves separately (the strict set by hand over -p minimald, then just clippy-strict over the whole branch scope) and confirmed no dia…[truncated]

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

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Sep 28, 2026
norrietaylor added a commit that referenced this pull request Sep 28, 2026
`just fix` is the innermost loop, and the gate failed there. Three agent
rounds on the NET walk then rewrote lines their task never named to clear it
(#1737 round 3, #1730 round 5, #1727 round 4), two of them in conflict rounds
whose only directive was the merge. A command that fails in the edit loop
outranks a sentence in AGENTS.md telling you to leave the hit alone, so the
sentence this branch added needs the recipe to agree with it.

CLIPPY_STRICT_REPORT_ONLY=1 prints the diagnostics and exits 0. `fix` sets it;
`clippy-strict` and `ci` do not, so "before opening a PR" stays the round that
owns the judgement. Only hits are demoted — a build or tooling failure still
exits non-zero, which is what the cargo check above the filter is for.
norrietaylor added a commit that referenced this pull request Sep 28, 2026
…l ref

The base was `git merge-base main HEAD`, and a branch that merges
`origin/main` leaves the local ref where it was — agent sandboxes and
worktrees never check main out at all. The merge-base against a ref that
stale predates the main commits the branch merged in, so every line of those
commits reads as a line this branch changed, and the gate reports
diagnostics on other people's code under a heading saying they are yours.
Three agent rounds fixing lines their task never named is what that looks
like from the outside (#1737, #1730, #1727).

Measured on this branch: a local `main` ten commits behind turned a change
touching no Rust at all into 14 changed Rust files across `minimald`,
`sessions` and `switch`. With `origin/main` it is nought, and the gate says
"no Rust changes" as it should.

The remote ref is the safe one by construction: it cannot be behind anything
the branch merged, because merging it required fetching it, and a fetch only
moves it forward. Stale means the base is older than the newest main, never
older than this branch's first commit. The local ref stays as the fallback
for a clone without a remote.

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

Gates met: reviewed against T19's plan block and test lines (the four out-of-layer files are the second task-path call site and its plumbing); minimal-review concluded on 1b5ea2d and resolved its threads; CodeRabbit posted; every revise round landed with no open threads; CI green on the head.

@norrietaylor
norrietaylor merged commit 25436fe into main Sep 28, 2026
33 checks passed
@norrietaylor
norrietaylor deleted the agent/1636-default-own-address-boxes-to-deny-all-with-the-a branch September 28, 2026 05:02
norrietaylor added a commit that referenced this pull request Sep 28, 2026
…d take it out of just fix (#1749)

* docs(agents): say the strict clippy gate is local and bounded by the directive

Three agent rounds since #1724 landed rewrote lines beyond their task to
satisfy `just clippy-strict`, two of them in conflict rounds whose only
directive was the merge, and two coders wrote that the PR lanes would have
gone red otherwise. They would not: the gate is local, no CI lane runs it.
Say so where AGENTS.md names the gate, and say what a revise or conflict
round does with its hits: report them in `notes`, not fix them.

* chore(lint): report the strict gate in just fix, enforce it in just ci

`just fix` is the innermost loop, and the gate failed there. Three agent
rounds on the NET walk then rewrote lines their task never named to clear it
(#1737 round 3, #1730 round 5, #1727 round 4), two of them in conflict rounds
whose only directive was the merge. A command that fails in the edit loop
outranks a sentence in AGENTS.md telling you to leave the hit alone, so the
sentence this branch added needs the recipe to agree with it.

CLIPPY_STRICT_REPORT_ONLY=1 prints the diagnostics and exits 0. `fix` sets it;
`clippy-strict` and `ci` do not, so "before opening a PR" stays the round that
owns the judgement. Only hits are demoted — a build or tooling failure still
exits non-zero, which is what the cargo check above the filter is for.

* fix(lint): demote only the filter's hits, and never inherit report-only

Two false-success paths in the report-only mode added a commit ago, both of
them the thing this gate exists to avoid: exiting 0 without having checked.

The filter's exit was read as "hits" whatever it was, so no python3 on PATH
or a crash inside it made `just fix` pass having reported nothing. It now
exits a distinct 2 for hits and only that is demoted; 1 from an unhandled
exception, 127 from a missing interpreter, and the cargo failure above the
filter all still leave non-zero.

CLIPPY_STRICT_REPORT_ONLY was read from the ambient environment, so one
export in a shell profile would have turned the gate off in `just
clippy-strict` and therefore in `just ci`, silently. The enforcing recipe
clears it.

* fix(lint): take the strict gate's base from origin/main, not the local ref

The base was `git merge-base main HEAD`, and a branch that merges
`origin/main` leaves the local ref where it was — agent sandboxes and
worktrees never check main out at all. The merge-base against a ref that
stale predates the main commits the branch merged in, so every line of those
commits reads as a line this branch changed, and the gate reports
diagnostics on other people's code under a heading saying they are yours.
Three agent rounds fixing lines their task never named is what that looks
like from the outside (#1737, #1730, #1727).

Measured on this branch: a local `main` ten commits behind turned a change
touching no Rust at all into 14 changed Rust files across `minimald`,
`sessions` and `switch`. With `origin/main` it is nought, and the gate says
"no Rust changes" as it should.

The remote ref is the safe one by construction: it cannot be behind anything
the branch merged, because merging it required fetching it, and a fetch only
moves it forward. Stale means the base is older than the newest main, never
older than this branch's first commit. The local ref stays as the fallback
for a clone without a remote.

* fix(lint): report-only never fails, whatever stopped the gate

`just fix` is the autofix loop: safe to run any number of times and never
stopping on the strict gate. Report-only demoted hits but still exited
101 on a build failure and 127 with no python3, so the loop failed on the
gate it was told only to report. Under report-only every failure is now
printed with its exit code and demoted; enforcing (`just ci`) keeps every
one fatal, so a gate that did not run still cannot pass there.

Driven through cargo and python3 shims: hit 2/0, cargo 101/0, no python3
127/0 (enforcing/report-only), and report-only twice gives the same
output.

* chore(lint): take the strict gate out of just fix

`just fix` is the edit loop, and everything it prints is something to
fix, so a strict hit printed beside fmt and clippy --fix reads as work
whatever a doc sentence says. Report-only kept the hits in that loop and
only removed the failure. Remove the gate from the recipe instead: it
runs in `just clippy-strict` and `just ci`, the round that owns the
judgement, and nowhere else. With no caller, the report-only mode and
the recipe that cleared it go too; the script's exit codes are 0 clean,
2 hits, anything else a failure to run, none read as clean.

AGENTS.md's tight-loop bullet says the loop prints only what to fix.
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.

T19 — Default own-address boxes to deny-all, with the announcement, the opt-out, and task runs under the same rules

1 participant