8000 fix(minimald): answer NODATA, not NXDOMAIN, for a stopped shared-address box by gominimal-aw-bot[bot] · Pull Request #2020 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

fix(minimald): answer NODATA, not NXDOMAIN, for a stopped shared-address box - #2020

Merged
norrietaylor merged 3 commits into
mainfrom
inbox-patch/issue-942-stopped-box-nodata-483f7c6c85167852
Oct 6, 2026
Merged

norrietaylor merged 3 commits into
mainfrom
inbox-patch/issue-942-stopped-box-nodata-483f7c6c85167852

Conversation

@gominimal-aw-bot
@gominimal-aw-bot gominimal-aw-bot Bot commented Oct 6, 2026 •
Copy link
Copy Markdown
Contributor

Routing-Key: inbox-route/I_kwDOSUhdos8AAAABVSwNvA

A stopped shared-address box's name answered NXDOMAIN on the actor Stop path. The SessionMessage::Stop arm called deregister_hostname(false), which removed the name row from the hostname registry. NET-128 requires the name to stay held (never NXDOMAIN for a box that exists) but answer NODATA while stopped, so the node's own listener at that port is not spoken for by a dead box.

Change: replace deregister_hostname(false) with mark_stopped(record.id), gated on owns_hostname_route. The host's exit path already marks stopped via NameMarker (idempotent), and mark_running on resume clears the marker.

Verification

  • cargo fmt --all --check — clean
  • cargo clippy --workspace --all-targets --locked -- -D warnings — clean
  • cargo test --locked -p minimald --lib session:: — 93 passed (includes new stopped_shared_address_box_is_nodata_through_actor)

Known follow-up (out of scope)

The route is now kept on an actor Stop, so the HTTP hostname proxy's HostnameRegistry::resolve still returns a route for a stopped shared-address box and forwards a request by name to node_address:port. The DNS side (zone_answer) already refuses this under NET-128; the proxy has no matching stopped gate. Host-exit stops already behaved this way, so this PR does not introduce it, but it widens it to every actor Stop. Follow-up: have the proxy refuse a route whose session is stopped when its address equals the node address, mirroring the zone_answer check.

Summary by CodeRabbit

  • Bug Fixes
    • Stopping a box on the node’s shared address now keeps its hostname reserved but returns no address for that name, and the hostname route no longer resolves to the stopped box.
    • Stopped boxes published at their own address remain routable. Restarting a stopped box clears its stopped status; destroying it still releases its hostname registration.

The SessionMessage::Stop arm called deregister_hostname(false), which
removed the name row from the hostname registry — a lookup then answered
NXDOMAIN. NET-128 requires the name to stay held (so the zone never says
the box never existed) but answer NODATA while the box is stopped, so the
node's own listener at that port is not spoken for by a dead box.

Replace deregister_hostname(false) with mark_stopped(record.id), gated on
owns_hostname_route. The NameMarker in the host's exit path also calls
mark_stopped (idempotent), and mark_running on resume clears the marker.

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

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: d99cfc8e-b653-4ee8-bb0e-c1385f3102a4
📥 Commits

Reviewing files that changed from the base of the PR and between bce1004 and 02d14d4.

📒 Files selected for processing (4)
  • crates/minimald/src/net/dns.rs
  • crates/minimald/src/session.rs
  • crates/minimald/src/session/tests.rs
  • crates/minimald/src/sessions.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • crates/minimald/src/session.rs

Included review availability: This review used your included allowance. Your plan provides up to 5 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

On Linux, stopping a session now marks its owned hostname route as stopped instead of deregistering it. The name and publish resources remain held, while DNS resolution suppresses stopped boxes published at the shared node address. Tests cover name retention and route resolution.

Changes

Hostname route stop behavior

Layer / File(s) Summary
Mark routes stopped and retain names
crates/minimald/src/session.rs, crates/minimald/src/session/tests.rs, crates/minimald/src/sessions.rs
The Linux Stop handler marks an owned hostname route as stopped and retains its name, publish row, and grant. The regression test checks that the name remains held with no address. Interim-upgrade documentation describes the stopped marker and retained name.
Filter stopped shared-address routes
crates/minimald/src/net/dns.rs
Hostname resolution suppresses stopped boxes published at the shared node address but retains routes for stopped boxes published at their own address. Tests check both cases. Comments clarify which publishes are included in upgrade lists.

Priority: ⬇️ Low

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

Change: Bug fix

Suggested reviewers: norrietaylor

Merge Risk: ⚪ Minimal · up to 02d14

Stopped shared-address names no longer expose a proxy route, and the route becomes available again when the host resumes. No actionable merge-blocking risk remains in the reviewed changes.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 4 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the main change: a stopped shared-address box answers NODATA instead of NXDOMAIN. It is concise and follows the repository’s Conventional Commit format.
Description check ✅ Passed The description explains the problem and change, and provides test commands and results. It does not use the template’s exact Summary, Testing, and Checklist headings, and it omits the checklist; howe…
✠8000 ¨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit watches names stay near,
The stopped host keeps its record clear.
Shared-address paths no longer show,
Own-address routes still answer so.
The grant stays held through quiet night,
Then starts again beneath the light.

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

@gominimal-aw-bot
Copy link
Copy Markdown
Contributor Author

[inbox-patch:clobber]

This PR would revert recently merged work

Simulating this merge shows it undoing commits that landed on the base branch within the last 3 day(s):

Before merging, restore the reverted region to its state on the base branch. The rest of this PR is unaffected.

If a listed commit is one this PR intends to supersede, say so and merge — this check reports, it does not block.

@norrietaylor norrietaylor changed the title fix: stopped shared-address box answers NODATA, not NXDOMAIN fix(minimald): answer NODATA, not NXDOMAIN, for a stopped shared-address box Oct 6, 2026
@norrietaylor
Copy link
Copy Markdown
Member

The [inbox-patch:clobber] report above is a false positive. The branch already contains origin/main (a248caf is an ancestor of the head), and the diff against main is +81/-8: only the SessionMessage::Stop arm in crates/minimald/src/session.rs plus one new test. git blame on origin/main attributes none of the replaced lines to a248caf, so nothing from #1906 is reverted.

@gominimal-aw-bot gominimal-aw-bot Bot added the agent:resolve Consent gate: pr-conflict-resolver may rewrite this branch label Oct 6, 2026
@norrietaylor
Copy link
Copy Markdown
Member

/review

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

Approved: no findings at 02d14d476660.

Nothing to do.

Clobber: none: git log on session.rs shows the three PR commits only (bce10043, 9700b9e3, 02d14d47) sitting on e7533f5a; nothing reverts a recent fix.

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

Comment thread crates/minimald/src/session.rs Resolved
Keeping the route on stop (NET-013) left the host-side proxy forwarding a
stopped shared-address box's requests to the node's own listener. resolve
now applies the same NET-128 gate as zone_answer: the name stays held, but
no route is handed out while the box is stopped on the node's address.
@norrietaylor
Copy link
Copy Markdown
Member

@coderabbitai review

@coderabbitai
coderabbitai Bot commented Oct 6, 2026 •
Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@norrietaylor
Copy link
Copy Markdown
Member

/review

@norrietaylor
Copy link
Copy Markdown
Member

@coderabbitai review

@coderabbitai
coderabbitai Bot commented Oct 6, 2026 •
Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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

minimal-review approved this head (02d14d4, which adds the NET-128 proxy gate); CodeRabbit reviewed it incrementally with no new findings; 0 unresolved threads; all lanes green.

@norrietaylor
norrietaylor added this pull request to the merge queue Oct 6, 2026
Merged via the queue into main with commit 9608dc0 Oct 6, 2026
34 checks passed
@norrietaylor
norrietaylor deleted the inbox-patch/issue-942-stopped-box-nodata-483f7c6c85167852 branch October 6, 2026 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0