8000 fix(boxes,minimald): the native box-zone answerer answers a name outside the box zone NXDOMAIN by minimal-foundry[bot] · Pull Request #3370 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

fix(boxes,minimald): the native box-zone answerer answers a name outside the box zone NXDOMAIN - #3370

Merged
norrietaylor merged 3 commits into
mainfrom
agent/3356-the-native-box-zone-answerer-answers-a-name-outs
Nov 13, 2026
Merged

norrietaylor merged 3 commits into
mainfrom
agent/3356-the-native-box-zone-answerer-answers-a-name-outs

Conversation

@minimal-foundry
Copy link
Copy Markdown
Contributor

Defect

Fixes #3356

Task marker
### D3020 — The native box-zone answerer answers a name outside the box zone NXDOMAIN citing the root-owned SOA, not REFUSED
  kind: task
  size: S
  est: 30 code, 40 tests
  executor: agent
  defect: bug
  epic: 1437
  layers:
    - answerer:
      - crates/minimald/src/net/answerer.rs: In the Verdict::Refused arm, reply NXDOMAIN with dns_gate::out_of_zone_soa_record in the authority section. Let reply take that SOA. Update the REFUSED assertion in unknown_in_zone_name_is_nxdomain and add a test.
      - crates/minimald/src/net/dns_gate.rs: Keep out_of_zone_soa_record and assert_cites_root_soa reachable from the answerer and its tests, if their visibility or location must change.
      - crates/boxes/src/core/zone_answer.rs: Correct the decision table and module docs: an out-of-zone verdict gets NXDOMAIN with the root-owned SOA (out_of_zone_soa), not REFUSED.
      - docs/specs/18-spec-box-networking/18-spec-box-networking.md: Remove the NET-141 residual for the native deny-all host-address box (issue 3020), and state in the NET-079 note that the native answerer answers NXDOMAIN with the root SOA.
      test: cargo nextest run -p minimald out_of_zone_name_is_nxdomain_with_root_soa
      test: cargo nextest run -p minimald unknown_in_zone_name_is_nxdomain
  proof: An A query for example.com to the native box-zone answerer gets rcode 3 (NXDOMAIN), and its authority section holds a root-owned SOA with a 15 s minimum. It does not get REFUSED.

Proof

On a native host, an A query for example.com to the box-zone answerer now gets rcode 3 (NXDOMAIN), not REFUSED. The reply is not authoritative. Its authority section holds one SOA owned by the root, with a 15 s minimum and a 15 s TTL. The tests answerer::tests::out_of_zone_name_is_nxdomain_with_root_soa and unknown_in_zone_name_is_nxdomain pin this.

Notes from the agent: crates/minimald/src/net/dns_gate.rs needed no change. out_of_zone_soa_record is pub(crate), and the answerer tests already reach assert_cites_root_soa through crate::net::dns_gate::tests, as guest_dns.rs does. reply() now takes the authority SOA as an argument. In-zone negatives pass the zone SOA, and an A answer passes none. The out-of-zone debug log field changed from answer="refused" to answer="nxdomain-out-of-zone". The Verdict::Refused variant keeps its name, because crates/minvmd/src/net/answerer.rs (outside the layers) matches on it. That VM host daemon answerer still answers an out-of-zone name REFUSED, and the zone_answer docs say so. A follow-up task can change minvmd the same way and rename the variant. Also checked: cargo clippy -p minimald --all-targets (clean), cargo nextest run -p boxes zone_answer (6 passed), cargo fmt --check. just lint-prose did not run, because vale is not installed on this box.

Tests

line exit tail
cargo nextest run -p minimald out_of_zone_name_is_nxdomain_with_root_soa 0 warning: unknown fields in task runtime-implement-test-0: network warning: unknown fields in task runtime-implement-test-1: network help: do you need to update to a newer version of minimal? Applying loadouts: default Running task runtime-implement-test-0 in box runtime-implement-test-0-1... Comp
cargo nextest run -p minimald unknown_in_zone_name_is_nxdomain 0 warning: unknown fields in task runtime-implement-test-0: network warning: unknown fields in task runtime-implement-test-1: network help: do you need to update to a newer version of minimal? Applying loadouts: default Running task runtime-implement-test-1 in box runtime-implement-test-1-1... Comp

Verify

min task run agent-verify timed out after 1800s, so this PR is a draft.

HE_REGION=auto\u{1f}SCCACHE_S3_USE_SSL=true\u{1f}SHELL=/usr/bin/bash\u{1f}SHLVL=2\u{1f}SSL_CERT_DIR=/etc/ssl/certs\u{1f}SSL_CERT_FILE=/etc/ssl/cert.pem\u{1f}XDG_CACHE_HOME=/state/cache\u{1f}XDG_CONFIG_HOME=/home/.config\u{1f}XDG_DATA_HOME=/home/.local/share\u{1f}XDG_RUNTIME_DIR=/run\u{1f}XDG_STATE_HOME=/home/.local/state\u{1e}stdin\n"
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 3 tests still running
        PASS [   0.244s] (1245/2130) minimald env::tests::task_entrypoint_relays_the_task_exit_code
        PASS [   0.632s] (1246/2130) minimald env::tests::task_run_ignores_an_undeclared_value_that_is_not_utf8
        SLOW [> 60.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>120.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>180.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>240.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>300.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>360.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>420.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>480.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>540.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>600.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>660.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>720.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>780.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>840.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>900.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>960.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>1020.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>1080.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>1140.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>1200.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>1260.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>1320.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>1380.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>1440.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task

Base

The base branch moved while the coder worked; it was merged in before the tests ran.

The native box-zone answerer replied REFUSED to a name outside the box
zone. glibc reads REFUSED as a temporary failure. Reply NXDOMAIN and
cite the root-owned SOA, whose 15 s minimum bounds the negative cache.
Correct the zone_answer decision table and docs, and drop the NET-141
residual for the native deny-all host-address box from spec 18.
@coderabbitai
coderabbitai Bot commented Nov 13, 2026 •
Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

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

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 25682024-59b6-4333-bb5c-4d1735cfc662

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
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@github-actions
Copy link
Copy Markdown
Contributor

Spec lint

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

docs/specs/18-spec-box-networking/18-spec-box-networking.md:171: P004 NET-009 names test 'native_resolution_without_proxy_env', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:378: P004 NET-040 names test 'fresh_install_own_ip_ingress_publishes_loopback', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:388: P004 NET-041 names test 'installer_switch_binary_executable', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:435: P004 NET-048 names test 'linux_amd64_manifest_ships_vm_stack', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:440: P004 NET-049 names test 'fresh_linux_kvm_activate_local_minvmd', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:445: P004 NET-050 names test 'linux_arm64_manifest_ships_vm_stack', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:450: P004 NET-051 names test 'fresh_arm64_kvm_activate_local_minvmd', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:936: P004 NET-132 names test 'proxy_sees_each_vm_box_by_its_switch_address', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:962: P004 NET-134 names test 'deny_all_box_reaches_proxy_and_no_other_host_port', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:986: P004 NET-107 names test 'session_outbound_request', which was not found in the repository

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

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

@norrietaylor
norrietaylor marked this pull request as ready for review November 13, 2026 05:29
@norrietaylor
norrietaylor requested a review from a team as a code owner November 13, 2026 05:29
@minimal-foundry
minimal-foundry Bot commented Nov 13, 2026 •
Copy link
Copy Markdown
Contributor Author

Approved: 1 finding, none above this repo's threshold at 6b0c775afeff.

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

@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arch-review: PASS · the full ruling

The change conforms to the design. Section 7.1 says the host answerer forwards nothing and its negatives must be cacheable. An out-of-zone name now gets NXDOMAIN with the root-owned SOA and a 15 s minimum, so that negative is cacheable. In-zone negatives keep the zone SOA. The spec edits remove the issue-3020 residual and match the code. No conditions.

Ruled at 6b0c775 against gominimal/arch@15b603e6afb8 by claude-opus-5-5.

@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 — 1 finding, 1 inline.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

Comment thread crates/boxes/src/core/zone_answer.rs Resolved
@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Nov 13, 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.

Reviewed at 6b0c775afeff against D3020's plan block. The out-of-zone verdict now answers NXDOMAIN, not authoritative, citing dns_gate::out_of_zone_soa_record(). That matches NET-079 and the relays, so glibc no longer reads it as EAI_AGAIN. reply() takes the authority record explicitly, and its four call sites keep the old behavior for the in-zone negatives (the zone's SOA) and the A answer (none). The new test covers A, AAAA and TXT for three out-of-zone names, and the updated in-zone test asserts the root SOA. The spec drops the #3020 residual and states the native answer in the NET-079 note. Every edited file is in the task's layers.

@norrietaylor
norrietaylor added this pull request to the merge queue Nov 13, 2026
Merged via the queue into main with commit 22b1069 Nov 13, 2026
41 checks passed
@norrietaylor
norrietaylor deleted the agent/3356-the-native-box-zone-answerer-answers-a-name-outs branch November 13, 2026 06:27
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.

D3020 — The native box-zone answerer answers a name outside the box zone NXDOMAIN citing the root-owned SOA, not REFUSED

1 participant

0