8000 fix: move canonical_box_name into box_registry by gominimal-aw-bot[bot] · Pull Request #2344 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

fix: move canonical_box_name into box_registry - #2344

Merged
norrietaylor merged 1 commit into
mainfrom
inbox-patch/canonical-box-name-into-box-registry-3ce33309c9ba8f2a
Oct 19, 2026
Merged

norrietaylor merged 1 commit into
mainfrom
inbox-patch/canonical-box-name-into-box-registry-3ce33309c9ba8f2a

Conversation

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

Routing-Key: inbox-route/I_kwDOSUhdos8AAAABYJPqGA

crates/minvmd/src/box_registry.rs and crates/minvmd/src/net/answerer.rs
imported each other: box_registry pulled canonical_box_name from
net::answerer, while answerer pulled BoxRegistry and
is_host_answerable from box_registry — an import cycle between the
registry and the answerer that resolve into one crate anyway.

The helper belongs with the registry that holds the rows it names, so
this moves it verbatim (with its doc comment) from net::answerer to
box_registry, folds answerer's use into its existing box_registry
import, and repoints the two fully-qualified call sites and the
intra-doc links that named the old path. The import edge is now
one-directional: net::answerer imports from box_registry, and
box_registry no longer imports from net::answerer at all.

Verification

  • cargo fmt --all --check --manifest-path target/Cargo.toml — clean
  • cargo clippy --workspace --all-targets --locked --manifest-path target/Cargo.toml -- -D warnings — clean
  • cargo test --locked --manifest-path target/Cargo.toml -p minvmd — 575 passed, 3 failed; the 3 (a_warned_daemon_announces_its_first_registration, answerer_service_forgets_rows_of_a_gone_node, resolve_uds_path_lives_in_provider_dir) fail identically on unmodified main under cargo test's shared-process runner — they install a global tracing subscriber / mutate XDG_STATE_HOME and expect the process-per-test model of cargo nextest, the runner just test uses
  • grep -n "use crate::net::answerer" crates/minvmd/src/box_registry.rs — no matches: the cycle edge is gone

cargo nextest is not installed on this runner, so the suite was run
with cargo test; the same three tests fail the same way before and
after this change.

Summary by CodeRabbit

  • Refactor
    • Box-name canonicalization is now handled consistently across registry and network operations. Existing name matching and reply behavior remain unchanged. This is an internal improvement and does not change the app’s visible features or how box names are processed.

box_registry imported net::answerer::canonical_box_name while
answerer imported box_registry's types, so the two modules
imported each other. The helper belongs with the registry that
holds the rows it names: move it to box_registry, keep the
one-directional edge (answerer imports box_registry), and repoint
the two fully-qualified call sites and the intra-doc links.

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 19, 2026 06:37
@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 19, 2026
@coderabbitai
coderabbitai Bot commented Oct 19, 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: 829944e3-50e5-421a-98cf-293a5fac8cbc
📥 Commits

Reviewing files that changed from the base of the PR and between 1bec117 and bad4cfa.

📒 Files selected for processing: 4
  • crates/minvmd/src/box_registry.rs
  • crates/minvmd/src/control.rs
  • crates/minvmd/src/net/answerer.rs
  • crates/minvmd/src/net/egress_gate.rs

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

📝 Walkthrough

The crate-visible canonical_box_name helper moves from net::answerer to box_registry. The answerer and egress gate now use the registry helper. Documentation links point to its new location. Runtime behavior is unchanged.

Changes: Box-name canonicalization

Layer / File(s) Summary
Shared canonical-name helper
crates/minvmd/src/box_registry.rs, crates/minvmd/src/net/answerer.rs, crates/minvmd/src/net/egress_gate.rs, crates/minvmd/src/control.rs
box_registry defines the ASCII-lowercase helper. The answerer imports it, and the egress gate calls it. Documentation links now point to the helper in box_registry.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Refactor

Suggested reviewers: norrietaylor

Merge Risk: ⚪ Minimal · up to bad4c

The change only relocates the canonical-name helper without changing its behavior, so no merge-blocking risk is established.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: moving canonical_box_name into box_registry. It follows the required Conventional Commit format.
Description check Passed The description explains the change, motivation, affected modules, and verification results. It includes testing evidence and documents the three known baseline test failures. It does not use the temp…
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 3 functions across 3 files. (1 skipped: 1 …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the change, motivation, affected modules, and verification results. It includes testing evidence and documents the three known baseline test failures. It does not use the template headings exactly and omits the checklist, but the required information is mostly present.

Full details: Docstring Coverage

Explanation

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

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

A rabbit checks each name in flight
And folds its letters into lowercase right
The registry keeps the shared routine
The answerer calls it, clear and clean
The gate follows the same design

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

@gominimal-aw-bot gominimal-aw-bot Bot added the agent:resolve Consent gate: pr-conflict-resolver may rewrite this branch label Oct 19, 2026
@norrietaylor
norrietaylor added this pull request to the merge queue Oct 19, 2026
Merged via the queue into main with commit d67d78e Oct 19, 2026
35 checks passed
@norrietaylor
norrietaylor deleted the inbox-patch/canonical-box-name-into-box-registry-3ce33309c9ba8f2a branch October 19, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0