8000 fix(sessions): one source for the zone's node-row labels by gominimal-aw-bot[bot] · Pull Request #2094 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

fix(sessions): one source for the zone's node-row labels - #2094

Merged
norrietaylor merged 4 commits into
mainfrom
inbox-patch/one-source-node-row-labels-ea274b972b3a9373
Oct 8, 2026
Merged

norrietaylor merged 4 commits into
mainfrom
inbox-patch/one-source-node-row-labels-ea274b972b3a9373

Conversation

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

Routing-Key: inbox-route/I_kwDOSUhdos8AAAABVj7BcA

Summary

The zone's node-row labels were spelled as bare literals in three places:
the host daemon kept the host row's zone name in its own constant, the VM
daemon's box registry keyed its node namespace from its own constant, and
the sessions store's reserved-name list re-spelled both labels by hand — so
a label changed in one registry could silently drift from the others.

The zone now owns the labels. sessions::core::zone_answer carries
HOST_ROW_LABEL, HOST_ROW_NAME, NODE_ROW_LABEL, and the NODE_ROW_LABELS list; both daemons read
their constants from it, and RESERVED_SESSION_NAMES reads the same
constants. A new store test iterates NODE_ROW_LABELS and pins the reserved list to
every entry, so a label added there without a matching reserved entry fails
the test, and a zone test pins the host row's name as its label under the
apex.

No behavior changes: every constant keeps its exact value.

The same drift sat at three more sites, now folded onto the zone too:
minvmd's answerer HOST_NAME aliases HOST_ROW_NAME, and minimald's
DNS HOSTNAME_SUFFIX and the CLI resolver's ZONE alias ZONE_APEX. A
test per crate pins each value byte for byte; the minimald test also pins
sandbox2's host-net /etc/hosts name and the gvproxy config's zone record
(crates that do not depend on sessions) to the zone's constants. Those two
keep their own literals; the Linux-only minimald test is what ties them to
the zone.

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, no warnings
  • cargo test --locked --manifest-path target/Cargo.toml -p sessions -p minimald -p minvmd — sessions 582/582 pass (including both new tests); minvmd box_registry 22/22 pass; minimald 875 pass plus a set of 11–13 failures that reproduce identically on unmodified main (A/B-verified by reverting the edits and re-running), all in unrelated networking tests that fail only when run together in this environment
  • No runtime change to test: this is pure name-source consolidation, and the store test pinning the reserved list to the zone's labels is the behavioral proof

Summary by CodeRabbit

  • Bug Fixes
    • Standardized the names used for host and managed-node entries across network-related components. This keeps those names consistently recognized as reserved, while preserving existing behavior for other reserved names.
  • Tests
    • Added checks to verify the expected host and managed-node names and their recognition as reserved names.

The zone's node-row labels were spelled as bare literals in three
places: minimald's switch read the host row's zone name from its own
HOST_MIN_INTERNAL, minvmd's box registry keyed the node namespace from
its own NODE_NAMESPACE, and sessions' reserved-name list re-spelled
both labels by hand. A label changed in one registry but not the
others would leave the reserved list silently out of date.

The zone now owns the labels: zone_answer carries HOST_ROW_LABEL,
HOST_ROW_NAME and NODE_ROW_LABEL, both daemons read their constants
from it, and the store's reserved names read the same constants. A
test pins the reserved list to every node-row label so a new label
added to the zone fails the build until the list carries it, and a
pin in the zone asserts the host row's zone name is its label under
the apex.

No behavior changes: every constant keeps its exact value.

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 8, 2026 05:45
@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 8, 2026
@coderabbitai
coderabbitai Bot commented Oct 8, 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: 40601298-b925-439e-80c7-f83d884294ec
📥 Commits

Reviewing files that changed from the base of the PR and between cbca8fb and d937fe7.

📒 Files selected for processing (4)
  • crates/minimald/src/net/switch.rs
  • crates/minvmd/src/box_registry.rs
  • crates/sessions/src/core/zone_answer.rs
  • crates/sessions/src/store.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.

< 8000 /details>
📝 Walkthrough

Walkthrough

The sessions zone module now defines shared constants for the host and managed-node row names. The daemon, VM registry, and reserved session-name list use those constants instead of duplicate literals. Tests check the names and their use in the reserved list.

Changes

Zone row-name constants

Layer / File(s) Summary
Define zone row names
crates/sessions/src/core/zone_answer.rs
Adds constants for the host label, host zone name, and managed-node label. A test checks the host name and managed-node name under ZONE_APEX.
Use shared row names
crates/minimald/src/net/switch.rs, crates/minvmd/src/box_registry.rs, crates/sessions/src/store.rs
The daemon uses the shared host name. The VM registry and reserved session-name list use the shared labels. A test checks that the reserved list contains both labels, ignoring ASCII case.

Priority: ⬇️ Low

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

Change: Refactor

Suggested reviewers: norrietaylor

Merge Risk: ⚪ Minimal · up to d937f

The shared row-name constants preserve existing behavior across the inspected consumers; no merge-blocking risk was identified.

🚥 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 5 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: centralizing the zone's node-row labels in one shared source. It is concise and follows the repository's Conventional Commit format.
Description check ✅ Passed The description provides a detailed Summary and verification results, including commands, test outcomes, and the reported unrelated failures. The template's Testing heading is represented by Verificat…
✨ 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 checks the names in place,
Then nibbles clover at a pace.
“Host” and “node” now share one key,
Their labels hop consistently.
The burrow rests; the tests agree.

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

… zone

minvmd's answerer HOST_NAME, minimald's DNS HOSTNAME_SUFFIX and the CLI
resolver's ZONE spelled the zone name by hand; they now alias the sessions
zone_answer constants. Every value stays byte-identical, pinned by a test
per crate. The minimald test also pins sandbox2's host-net /etc/hosts name
and the gvproxy config's zone record to the zone.
@norrietaylor norrietaylor changed the title fix: one source for the zone's node-row labels fix(sessions): one source for the zone's node-row labels Oct 8, 2026
@norrietaylor
Copy link
Copy Markdown
Member

/review

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

Approved: no findings at 217e2a724475.

Nothing to do.

Clobber: none: git log on zone_answer.rs and store.rs shows the refactor sits on top of the recent minimald-reserved-name fix (#2049), which is preserved (the reserved list still carries minimald, now via NODE_ROW_LABEL).

@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 8, 2026
@gominimal-aw-bot gominimal-aw-bot Bot added the agent:resolve Consent gate: pr-conflict-resolver may rewrite this branch label Oct 8, 2026
@norrietaylor
Copy link
Copy Markdown
Member

/review

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

@norrietaylor
norrietaylor added this pull request to the merge queue Oct 8, 2026
Merged via the queue into main with commit 5d91168 Oct 8, 2026
40 of 42 checks passed
@norrietaylor
norrietaylor deleted the inbox-patch/one-source-node-row-labels-ea274b972b3a9373 branch October 8, 2026 17:05
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 review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0