feat(nebula): map fleet IPv6 overlay addresses and enable local self-resolution (#310) #318

Merged
nimmo merged 2 commits from feat/nebula-ipv6-hostmap-resolver into main 2026-10-12 14:36:43 +01:00
Owner

Summary

Completes fleet IPv6 overlay address mapping and local self-resolution policy in modules/networking/nebula.nix.

  • Fleet IPv6 Address Mapping: Adds confirmed IPv6 overlay addresses for vega (fd56:f458:569c::2), lyra (fd56:f458:569c::3), and lena (fd56:f458:569c::21) to nixosConfig.nebula.ipv6HostMap default, matching their minted v2 certificates.
  • Local Self-Resolution: Configures networking.hosts so that each NixOS host maps its own <hostname>.mesh alias to its IPv4 and IPv6 overlay addresses. Bare <hostname> remains mapped to local loopback (127.0.0.2), preventing dual-IP collisions on the base hostname while allowing services bound to overlay IPs (e.g. Paseo daemon on 10.10.0.2:6767, CoreDNS on 10.10.0.2:53) to resolve and be reached locally via <hostname>.mesh.
  • CoreDNS Static Zones: Resolver nodes (e.g. Vega) now emit both A and AAAA static template records for all active mesh members.
  • Documentation: Updates README.md to record full fleet coverage in nixosConfig.nebula.ipv6HostMap.

Validation

  • Format & Flake Checks: nix fmt applied; nix flake check passed completely (all checks passed! flake check OK).
  • Fleet Evaluation: Evaluated networking.hosts across electra, lena, lyra, and vega, confirming exact DNS mappings for local self-resolution and remote peers.
  • System Build: nix build .#nixosConfigurations.electra.config.system.build.toplevel succeeded, building all three specialisations (igpu, dgpu, battery).
  • Live Canary Activation: Executed just test on Electra (igpu specialisation):
    • Verified live /etc/hosts contains both 10.10.0.20 electra.mesh and fd56:f458:569c::20 electra.mesh.
    • getent ahosts electra.mesh returns both overlay IPs.
    • getent ahosts electra resolves cleanly to 127.0.0.2.
    • ping -6 -c 2 electra.mesh passes with 0% packet loss (0.026 ms rtt).
    • Remote IPv6 overlay ping to peers (vega.mesh, lyra.mesh, pangolin-vps.mesh) passes with 0% loss.

Closes #310.
Relates to milestone 32: Dual-stack Nebula Mesh & Router Exit.

## Summary Completes fleet IPv6 overlay address mapping and local self-resolution policy in `modules/networking/nebula.nix`. - **Fleet IPv6 Address Mapping**: Adds confirmed IPv6 overlay addresses for `vega` (`fd56:f458:569c::2`), `lyra` (`fd56:f458:569c::3`), and `lena` (`fd56:f458:569c::21`) to `nixosConfig.nebula.ipv6HostMap` default, matching their minted v2 certificates. - **Local Self-Resolution**: Configures `networking.hosts` so that each NixOS host maps its own `<hostname>.mesh` alias to its IPv4 and IPv6 overlay addresses. Bare `<hostname>` remains mapped to local loopback (`127.0.0.2`), preventing dual-IP collisions on the base hostname while allowing services bound to overlay IPs (e.g. Paseo daemon on `10.10.0.2:6767`, CoreDNS on `10.10.0.2:53`) to resolve and be reached locally via `<hostname>.mesh`. - **CoreDNS Static Zones**: Resolver nodes (e.g. Vega) now emit both `A` and `AAAA` static template records for all active mesh members. - **Documentation**: Updates `README.md` to record full fleet coverage in `nixosConfig.nebula.ipv6HostMap`. ## Validation - **Format & Flake Checks**: `nix fmt` applied; `nix flake check` passed completely (`all checks passed! flake check OK`). - **Fleet Evaluation**: Evaluated `networking.hosts` across `electra`, `lena`, `lyra`, and `vega`, confirming exact DNS mappings for local self-resolution and remote peers. - **System Build**: `nix build .#nixosConfigurations.electra.config.system.build.toplevel` succeeded, building all three specialisations (`igpu`, `dgpu`, `battery`). - **Live Canary Activation**: Executed `just test` on Electra (`igpu` specialisation): - Verified live `/etc/hosts` contains both `10.10.0.20 electra.mesh` and `fd56:f458:569c::20 electra.mesh`. - `getent ahosts electra.mesh` returns both overlay IPs. - `getent ahosts electra` resolves cleanly to `127.0.0.2`. - `ping -6 -c 2 electra.mesh` passes with 0% packet loss (0.026 ms rtt). - Remote IPv6 overlay ping to peers (`vega.mesh`, `lyra.mesh`, `pangolin-vps.mesh`) passes with 0% loss. Closes #310. Relates to milestone 32: [Dual-stack Nebula Mesh & Router Exit](https://git.nimmog.uk/nimmo/nixos-config/milestones/32).
feat(nebula): map fleet IPv6 overlay addresses and enable local self-resolution (#310)
All checks were successful
Build and Push Attic Cache / test (pull_request) Successful in 1m26s
Build and Push Attic Cache / build (pull_request) Has been skipped
Build and Push Attic Cache / pin-lifecycle (pull_request) Has been skipped
Build and Push Attic Cache / remediate (pull_request) Has been skipped
Build and Push Attic Cache / notify-remediation (pull_request) Has been skipped
Build and Push Attic Cache / record-remediation-notify-failure (pull_request) Has been skipped
AI pull-request review / review (pull_request) Successful in 7m39s
61b06d8054
clankbot left a comment

Automated code review

Reviewed commit: 61b06d805440971a997778f2f039ff8989241c79

Verdict: Requires further work

Resolve the blocking or important findings and investigate failed deterministic checks before merging.

Overall assessment

The supplied changes are internally consistent with the checked-out tree. The new ipv6HostMap default (modules/networking/nebula.nix:86-97) has exactly the same 11 keys as hostMap (modules/networking/nebula.nix:24-35), so the lib.optionalString (cfg.ipv6HostMap ? ${name}) guard in coreDnsStaticZones (line 45) now emits AAAA records for vega/lyra/lena without producing an A-only zone. The rewritten self branch (lines 239-246 and 251-258) emits only the .mesh alias for name == hostname, so no bare-name entry is added at the overlay IP and no duplicate bare-name mapping is introduced; hostName values in hosts/{vega,lyra,lena,electra}/default.nix match the map keys, so the self branch actually triggers on those hosts. lib.mkMerge concatenates per IP key and no key collides between routerUnderlayAddresses (154.51.87.151 / 2a05:b100:2420:4800::1) and the two host maps (router is 10.10.0.10 / fd56:f458:569c::10 per nebula/router.json). The README text (README.md:131-132) now names exactly the 11 entries present in the default, so documentation and code agree. grep networking\.hosts matches only modules/networking/nebula.nix:235, so no test, override, or other module contradicts the new behaviour. No Nix evaluation error is introduced. The remaining gap is validation evidence for the three newly affected hosts, which AGENTS.md states is required for a deployment-affecting change.

Blocking findings

None.

Important findings

  • Deployment-affecting change to three hosts has no canary or live evidence for those hosts (modules/networking/nebula.nix:88; medium confidence)
    The default at lines 88-89 and 96 adds vega, lyra and lena to ipv6HostMap, and the rewritten self branch at lines 239-246/251-258 changes generated /etc/hosts content for every host whose hostName is a map key (hosts/vega, hosts/lyra, hosts/lena, hosts/electra all set matching names). grep networking\.hosts matches only modules/networking/nebula.nix:235, and nothing under tests/ or scripts/ asserts /etc/hosts or the CoreDNS config string, so nix flake check cannot cover the generated records for vega, lyra or lena. AGENTS.md states 'Before merging a deployment-affecting change: Confirm local validation, required MR checks, and a canary appropriate to the risk' and 'For multi-host ... changes, record one genuine deployment and a no-op follow-up before closing the issue'; .forgejo/ai-review.md likewise asks that the PR use 'the validation and rollout evidence appropriate to its risk'. The PR text (untrusted) records live activation only on Electra.
    Impact: The new self .mesh alias and the new AAAA records are unexercised on the three hosts that newly own them; a regression there (for example a self /etc/hosts record at the host's own overlay IP, which is the address several services bind to by default: modules/services/paseo-daemon.nix:31, modules/services/kiwifs.nix:36, modules/services/bookstack-mcp.nix:31, hosts/vega/default.nix:150) would only surface on those hosts and not in the deterministic gate.
    Suggested fix: Record the repository-required canary on at least one of the newly affected hosts (e.g. just test on vega, with an auto-update hold first, plus a no-op follow-up), and capture getent hosts <hostname>.mesh returning the host's overlay IPv4/IPv6 and the CoreDNS AAAA output on vega, which is the only host in the tree setting isResolver = true (hosts/vega/default.nix:141).

Suggestions

  • Self .mesh alias is now sourced from an overridable option with no invariant tying it to hostMap or overlayIp (modules/networking/nebula.nix:252; medium confidence)
    The self branch emits the alias from hostMap.${hostname} (a let-bound literal, lines 24-35) and independently from cfg.ipv6HostMap.${hostname} (an overridable option default, lines 84-97), while cfg.overlayIp (line 106) is a separate overridable option used for the CoreDNS bind address (line 41) and service defaults. The module's only assertion (lines 122-128) covers exitNode.externalInterface; nothing ties the two inventories or the alias address to cfg.overlayIp. coreDnsStaticZones iterates hostMap and guards on cfg.ipv6HostMap ? name, whereas networking.hosts iterates cfg.ipv6HostMap unguarded, so a key present in only one map yields an /etc/hosts record with no matching DNS record. The maps agree today, so this is not a current defect.
    Impact: A future per-host nixosConfig.nebula.ipv6HostMap override, or an address added to one map before the other, would silently produce a partial or wrong self /etc/hosts entry with no evaluation error; the option description ('Add other nodes only with their certificate rollout') is prose only.
    Suggested fix: Consider an assertion in the config block that builtins.attrNames cfg.ipv6HostMap equals builtins.attrNames hostMap (or is a subset), so the two inventories cannot drift silently.

Tests and validation

  • No configured deterministic checks.

Questions

  • Are the v2 certificate pairs for vega, lyra and lena already activated on the hosts and accepted by every peer? README.md states that reissuing does not revoke a replaced certificate and that a superseded exit certificate must be blocklisted on every peer, so the new AAAA records could describe addresses no peer can currently reach.
  • Should <hostname>.mesh resolve before nebula@mesh.service has brought up the overlay interface? The new /etc/hosts record is static, so it will resolve to the overlay IP even when the mesh is down, unlike the previous behaviour where the self name had no static record.
  • Should nova keep an entry in the default ipv6HostMap while it remains under potential/nova/ and unregistered in flake.nix (per AGENTS.md, potential/ hosts are not deployed and not built by CI)?

Review limitations

  • No Nix tooling was run here, so nix flake check, nix build, nix fmt and any live getent/ping/CoreDNS output were not reproduced; the validation results attributed to the PR are taken from the untrusted PR text.
  • The nebula/certs/*.crt files are binary protobuf and were not decoded, so the claim that the vega/lyra/lena v2 certificates contain fd56:f458:569c::2, ::3 and ::21 could not be verified from supplied evidence.
  • No live host state, systemd unit state, /etc/hosts contents, CoreDNS output, CI log, or Forgejo workflow output was supplied; only the checked-out repository tree and the PR text were inspected.
  • The bare-name behaviour on loopback is inferred from the NixOS default for networking.hosts; no such default appears in the supplied tree, and nebula.nix is the only definition of networking.hosts in it.

Diff coverage

  • README.md: reviewed — included in a context-limited batch
  • modules/networking/nebula.nix: reviewed — included in a context-limited batch
Review metadata
  • Reviewer: forgejo-ai-review v1
  • Model: strata/strata
  • Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, docs/auto-update-remediation.md, docs/nova-remote-builder.md, README.md
  • Commits considered: 1
  • Previous automated review: none found
  • Findings: 2
<!-- forgejo-ai-review:v1 --> ## Automated code review Reviewed commit: `61b06d805440971a997778f2f039ff8989241c79` ## Verdict: Requires further work Resolve the blocking or important findings and investigate failed deterministic checks before merging. ### Overall assessment The supplied changes are internally consistent with the checked-out tree. The new `ipv6HostMap` default (modules/networking/nebula.nix:86-97) has exactly the same 11 keys as `hostMap` (modules/networking/nebula.nix:24-35), so the `lib.optionalString (cfg.ipv6HostMap ? ${name})` guard in `coreDnsStaticZones` (line 45) now emits AAAA records for vega/lyra/lena without producing an A-only zone. The rewritten self branch (lines 239-246 and 251-258) emits only the `.mesh` alias for `name == hostname`, so no bare-name entry is added at the overlay IP and no duplicate bare-name mapping is introduced; `hostName` values in `hosts/{vega,lyra,lena,electra}/default.nix` match the map keys, so the self branch actually triggers on those hosts. `lib.mkMerge` concatenates per IP key and no key collides between `routerUnderlayAddresses` (154.51.87.151 / 2a05:b100:2420:4800::1) and the two host maps (router is 10.10.0.10 / fd56:f458:569c::10 per nebula/router.json). The README text (README.md:131-132) now names exactly the 11 entries present in the default, so documentation and code agree. `grep networking\.hosts` matches only modules/networking/nebula.nix:235, so no test, override, or other module contradicts the new behaviour. No Nix evaluation error is introduced. The remaining gap is validation evidence for the three newly affected hosts, which AGENTS.md states is required for a deployment-affecting change. ### Blocking findings None. ### Important findings - **Deployment-affecting change to three hosts has no canary or live evidence for those hosts** (modules/networking/nebula.nix:88; medium confidence) The default at lines 88-89 and 96 adds vega, lyra and lena to `ipv6HostMap`, and the rewritten self branch at lines 239-246/251-258 changes generated `/etc/hosts` content for every host whose `hostName` is a map key (hosts/vega, hosts/lyra, hosts/lena, hosts/electra all set matching names). `grep networking\.hosts` matches only modules/networking/nebula.nix:235, and nothing under tests/ or scripts/ asserts `/etc/hosts` or the CoreDNS config string, so `nix flake check` cannot cover the generated records for vega, lyra or lena. AGENTS.md states 'Before merging a deployment-affecting change: Confirm local validation, required MR checks, and a canary appropriate to the risk' and 'For multi-host ... changes, record one genuine deployment and a no-op follow-up before closing the issue'; .forgejo/ai-review.md likewise asks that the PR use 'the validation and rollout evidence appropriate to its risk'. The PR text (untrusted) records live activation only on Electra. Impact: The new self `.mesh` alias and the new AAAA records are unexercised on the three hosts that newly own them; a regression there (for example a self `/etc/hosts` record at the host's own overlay IP, which is the address several services bind to by default: modules/services/paseo-daemon.nix:31, modules/services/kiwifs.nix:36, modules/services/bookstack-mcp.nix:31, hosts/vega/default.nix:150) would only surface on those hosts and not in the deterministic gate. Suggested fix: Record the repository-required canary on at least one of the newly affected hosts (e.g. `just test` on vega, with an auto-update hold first, plus a no-op follow-up), and capture `getent hosts <hostname>.mesh` returning the host's overlay IPv4/IPv6 and the CoreDNS AAAA output on vega, which is the only host in the tree setting `isResolver = true` (hosts/vega/default.nix:141). ### Suggestions - **Self `.mesh` alias is now sourced from an overridable option with no invariant tying it to `hostMap` or `overlayIp`** (modules/networking/nebula.nix:252; medium confidence) The self branch emits the alias from `hostMap.${hostname}` (a `let`-bound literal, lines 24-35) and independently from `cfg.ipv6HostMap.${hostname}` (an overridable option default, lines 84-97), while `cfg.overlayIp` (line 106) is a separate overridable option used for the CoreDNS bind address (line 41) and service defaults. The module's only assertion (lines 122-128) covers `exitNode.externalInterface`; nothing ties the two inventories or the alias address to `cfg.overlayIp`. `coreDnsStaticZones` iterates `hostMap` and guards on `cfg.ipv6HostMap ? name`, whereas `networking.hosts` iterates `cfg.ipv6HostMap` unguarded, so a key present in only one map yields an `/etc/hosts` record with no matching DNS record. The maps agree today, so this is not a current defect. Impact: A future per-host `nixosConfig.nebula.ipv6HostMap` override, or an address added to one map before the other, would silently produce a partial or wrong self `/etc/hosts` entry with no evaluation error; the option description ('Add other nodes only with their certificate rollout') is prose only. Suggested fix: Consider an assertion in the `config` block that `builtins.attrNames cfg.ipv6HostMap` equals `builtins.attrNames hostMap` (or is a subset), so the two inventories cannot drift silently. ### Tests and validation - No configured deterministic checks. ### Questions - Are the v2 certificate pairs for vega, lyra and lena already activated on the hosts and accepted by every peer? README.md states that reissuing does not revoke a replaced certificate and that a superseded exit certificate must be blocklisted on every peer, so the new AAAA records could describe addresses no peer can currently reach. - Should `<hostname>.mesh` resolve before `nebula@mesh.service` has brought up the overlay interface? The new `/etc/hosts` record is static, so it will resolve to the overlay IP even when the mesh is down, unlike the previous behaviour where the self name had no static record. - Should `nova` keep an entry in the default `ipv6HostMap` while it remains under `potential/nova/` and unregistered in `flake.nix` (per AGENTS.md, `potential/` hosts are not deployed and not built by CI)? ### Review limitations - No Nix tooling was run here, so `nix flake check`, `nix build`, `nix fmt` and any live `getent`/`ping`/CoreDNS output were not reproduced; the validation results attributed to the PR are taken from the untrusted PR text. - The `nebula/certs/*.crt` files are binary protobuf and were not decoded, so the claim that the vega/lyra/lena v2 certificates contain `fd56:f458:569c::2`, `::3` and `::21` could not be verified from supplied evidence. - No live host state, systemd unit state, `/etc/hosts` contents, CoreDNS output, CI log, or Forgejo workflow output was supplied; only the checked-out repository tree and the PR text were inspected. - The bare-name behaviour on loopback is inferred from the NixOS default for `networking.hosts`; no such default appears in the supplied tree, and `nebula.nix` is the only definition of `networking.hosts` in it. ### Diff coverage - `README.md`: **reviewed** — included in a context-limited batch - `modules/networking/nebula.nix`: **reviewed** — included in a context-limited batch <details><summary>Review metadata</summary> - Reviewer: forgejo-ai-review v1 - Model: strata/strata - Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, docs/auto-update-remediation.md, docs/nova-remote-builder.md, README.md - Commits considered: 1 - Previous automated review: none found - Findings: 2 </details>
feat(nebula): assert ipv6HostMap entries are defined in hostMap
All checks were successful
Build and Push Attic Cache / test (pull_request) Successful in 1m27s
Build and Push Attic Cache / build (pull_request) Has been skipped
Build and Push Attic Cache / pin-lifecycle (pull_request) Has been skipped
Build and Push Attic Cache / remediate (pull_request) Has been skipped
Build and Push Attic Cache / notify-remediation (pull_request) Has been skipped
Build and Push Attic Cache / record-remediation-notify-failure (pull_request) Has been skipped
AI pull-request review / review (pull_request) Successful in 6m59s
3538f61405
clankbot left a comment

Automated code review

Reviewed commit: 3538f61405066632f610b250cf112dee864ce86f

Verdict: Ready to merge

No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory.

Overall assessment

Strict validation pass over the initial review. The supplied diff is internally consistent: the three new ipv6HostMap keys (vega, lyra, lena) all exist in hostMap (modules/networking/nebula.nix:26-37), so the new assertion at line 159 holds; the IPv6 values ::2, ::3, ::21 do not collide with existing values; coreDnsStaticZones (lines 45-47) emits AAAA records only for names present in ipv6HostMap, matching the new keys; the README inventory (README.md:130-132) lists the same 11 entries as the option default; and the three networking.hosts overlays at line 239 are keyed by distinct IPv4/IPv6/public-router addresses, so no key is contributed twice. No evaluation-breaking or scoping defect was demonstrated in the changed files. Both surviving findings are evidence/rollout gaps backed by explicit in-tree rules (the ipv6HostMap description and the AGENTS.md multi-host rule), not demonstrated defects, so both are held at suggestion severity. The 127.0.0.2 self-loopback claim from the initial review is dropped: that address appears nowhere in the supplied tree.

Blocking findings

None.

Important findings

None.

Suggestions

  • Fleet-wide /etc/hosts and AAAA change is not corroborated by a deployment on an auto-update host (modules/networking/nebula.nix:239; medium confidence)
    The unfiltered mapAttrs' over hostMap and cfg.ipv6HostMap (lines 239-264) applies to every host importing modules/networking/nebula.nix with nixosConfig.nebula.enable = true: hosts/vega/default.nix:59 + :135, hosts/lyra/default.nix:47 + :118, hosts/lena/default.nix:15 + :51, hosts/electra/default.nix:138 + :199. No host overrides ipv6HostMap (only occurrence outside nebula.nix is README.md:130), so all four receive the new records. AGENTS.md:43 states 'For multi-host or auto-update changes, record one genuine deployment and a no-op follow-up before closing the issue', and AGENTS.md:152-153 describe vega and lyra as 'pull-only auto-update'.
    Impact: The change lands on unattended auto-update hosts without a canary in the supplied material; an activation-time problem with the new self <hostname>.mesh entries would surface only after an automatic pull. This is a validation-evidence gap, not a demonstrated defect: the evaluated output is well-formed for all four hosts.
    Suggested fix: Before closing the issue, record one genuine deployment plus a no-op follow-up on an auto-update mesh host (vega or lyra) under an auto-update hold, per AGENTS.md:43, and confirm getent ahosts <hostname>.mesh resolves to the host's own overlay IPs there.

  • New IPv6 addresses are not tied to any inspectable certificate evidence, despite the option's own rule (modules/networking/nebula.nix:88; medium confidence)
    The option description in the changed file (lines 90-93) states entries must be added 'only with their certificate rollout, not from planned addresses', and README.md:126-128 notes 'Reissue does not revoke the replaced certificate: its old signed permissions remain valid until the new pairs are activated.' The new assertion at line 159 checks only key presence in hostMap, not that fd56:f458:569c::2/::3/::21 match the deployed certificates; nebula/certs/ holds only opaque .crt files, so no supplied artifact corroborates the three new values.
    Impact: A mistyped or not-yet-activated address would produce unreachable /etc/hosts keys and CoreDNS AAAA records that nix flake check cannot detect, since the only in-tree guard is name presence.
    Suggested fix: Record nebula-cert print -json -path nebula/certs/<host>.crt (or the equivalent just nebula-list) output for vega, lyra and lena in the issue/MR evidence so the mapped addresses are tied to the minted v2 certificates; no source change is required.

Tests and validation

  • No configured deterministic checks.

Questions

  • Have the new v2 certificate pairs for vega, lyra and lena actually been activated on those running hosts? README.md:126-128 states replaced certificates remain valid until the new pairs are activated, so the newly emitted IPv6 hosts-file and AAAA records could point at addresses the mesh does not yet serve.
  • Should the self <hostname>.mesh alias be suppressed on any host still running a version 1 (IPv4-only) certificate, given the new self-alias branch at lines 239-253 emits both the IPv4 and IPv6 self records unconditionally?
  • The new comment at lines 229-235 asserts 'bare hostname remains on local loopback' for the self host; is that mapping guaranteed by the NixOS-generated /etc/hosts header, since no networking.hosts entry for the bare self hostname exists anywhere in the supplied tree?

Review limitations

  • No Nix tooling is available in this container, so nix flake check, evaluation of the four affected nixosConfigurations, and the reported system builds could not be re-run; the consistency claims above were derived by reading the source, not by evaluating it.
  • The pull-request text and validation logs referenced by the initial review were not supplied to this pass; the claim that only electra was exercised could not be verified, which is why the deployment-evidence finding is stated conditionally and held at suggestion severity.
  • nebula/certs/*.crt are binary Nebula certificates that the navigation tools cannot decode, so the IPv6 addresses inside vega/lyra/lena certificates could not be confirmed.
  • The NixOS-generated /etc/hosts header (and any bare-hostname loopback line it may emit) is not part of the supplied tree, so the comment's claim about self loopback resolution could not be confirmed; the initial review's 127.0.0.2 value appears nowhere in the repository and was discarded.
  • Live runtime behaviour (Nebula underlay sockets, CoreDNS AAAA responses, ping results) is not observable from the supplied material.

Diff coverage

  • README.md: reviewed — included in a context-limited batch
  • modules/networking/nebula.nix: reviewed — included in a context-limited batch
Review metadata
  • Reviewer: forgejo-ai-review v1
  • Model: strata/strata
  • Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, docs/auto-update-remediation.md, docs/nova-remote-builder.md, README.md
  • Commits considered: 2
  • Previous automated review: none found
  • Findings: 2
<!-- forgejo-ai-review:v1 --> ## Automated code review Reviewed commit: `3538f61405066632f610b250cf112dee864ce86f` ## Verdict: Ready to merge No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory. ### Overall assessment Strict validation pass over the initial review. The supplied diff is internally consistent: the three new `ipv6HostMap` keys (vega, lyra, lena) all exist in `hostMap` (modules/networking/nebula.nix:26-37), so the new assertion at line 159 holds; the IPv6 values `::2`, `::3`, `::21` do not collide with existing values; `coreDnsStaticZones` (lines 45-47) emits AAAA records only for names present in `ipv6HostMap`, matching the new keys; the README inventory (README.md:130-132) lists the same 11 entries as the option default; and the three `networking.hosts` overlays at line 239 are keyed by distinct IPv4/IPv6/public-router addresses, so no key is contributed twice. No evaluation-breaking or scoping defect was demonstrated in the changed files. Both surviving findings are evidence/rollout gaps backed by explicit in-tree rules (the `ipv6HostMap` description and the AGENTS.md multi-host rule), not demonstrated defects, so both are held at suggestion severity. The `127.0.0.2` self-loopback claim from the initial review is dropped: that address appears nowhere in the supplied tree. ### Blocking findings None. ### Important findings None. ### Suggestions - **Fleet-wide /etc/hosts and AAAA change is not corroborated by a deployment on an auto-update host** (modules/networking/nebula.nix:239; medium confidence) The unfiltered `mapAttrs'` over `hostMap` and `cfg.ipv6HostMap` (lines 239-264) applies to every host importing `modules/networking/nebula.nix` with `nixosConfig.nebula.enable = true`: hosts/vega/default.nix:59 + :135, hosts/lyra/default.nix:47 + :118, hosts/lena/default.nix:15 + :51, hosts/electra/default.nix:138 + :199. No host overrides `ipv6HostMap` (only occurrence outside nebula.nix is README.md:130), so all four receive the new records. AGENTS.md:43 states 'For multi-host or auto-update changes, record one genuine deployment and a no-op follow-up before closing the issue', and AGENTS.md:152-153 describe vega and lyra as 'pull-only auto-update'. Impact: The change lands on unattended auto-update hosts without a canary in the supplied material; an activation-time problem with the new self `<hostname>.mesh` entries would surface only after an automatic pull. This is a validation-evidence gap, not a demonstrated defect: the evaluated output is well-formed for all four hosts. Suggested fix: Before closing the issue, record one genuine deployment plus a no-op follow-up on an auto-update mesh host (vega or lyra) under an auto-update hold, per AGENTS.md:43, and confirm `getent ahosts <hostname>.mesh` resolves to the host's own overlay IPs there. - **New IPv6 addresses are not tied to any inspectable certificate evidence, despite the option's own rule** (modules/networking/nebula.nix:88; medium confidence) The option description in the changed file (lines 90-93) states entries must be added 'only with their certificate rollout, not from planned addresses', and README.md:126-128 notes 'Reissue does not revoke the replaced certificate: its old signed permissions remain valid until the new pairs are activated.' The new assertion at line 159 checks only key presence in `hostMap`, not that `fd56:f458:569c::2`/`::3`/`::21` match the deployed certificates; `nebula/certs/` holds only opaque `.crt` files, so no supplied artifact corroborates the three new values. Impact: A mistyped or not-yet-activated address would produce unreachable /etc/hosts keys and CoreDNS AAAA records that `nix flake check` cannot detect, since the only in-tree guard is name presence. Suggested fix: Record `nebula-cert print -json -path nebula/certs/<host>.crt` (or the equivalent `just nebula-list`) output for vega, lyra and lena in the issue/MR evidence so the mapped addresses are tied to the minted v2 certificates; no source change is required. ### Tests and validation - No configured deterministic checks. ### Questions - Have the new v2 certificate pairs for vega, lyra and lena actually been activated on those running hosts? README.md:126-128 states replaced certificates remain valid until the new pairs are activated, so the newly emitted IPv6 hosts-file and AAAA records could point at addresses the mesh does not yet serve. - Should the self `<hostname>.mesh` alias be suppressed on any host still running a version 1 (IPv4-only) certificate, given the new self-alias branch at lines 239-253 emits both the IPv4 and IPv6 self records unconditionally? - The new comment at lines 229-235 asserts 'bare hostname remains on local loopback' for the self host; is that mapping guaranteed by the NixOS-generated /etc/hosts header, since no `networking.hosts` entry for the bare self hostname exists anywhere in the supplied tree? ### Review limitations - No Nix tooling is available in this container, so `nix flake check`, evaluation of the four affected `nixosConfigurations`, and the reported system builds could not be re-run; the consistency claims above were derived by reading the source, not by evaluating it. - The pull-request text and validation logs referenced by the initial review were not supplied to this pass; the claim that only electra was exercised could not be verified, which is why the deployment-evidence finding is stated conditionally and held at suggestion severity. - `nebula/certs/*.crt` are binary Nebula certificates that the navigation tools cannot decode, so the IPv6 addresses inside vega/lyra/lena certificates could not be confirmed. - The NixOS-generated /etc/hosts header (and any bare-hostname loopback line it may emit) is not part of the supplied tree, so the comment's claim about self loopback resolution could not be confirmed; the initial review's `127.0.0.2` value appears nowhere in the repository and was discarded. - Live runtime behaviour (Nebula underlay sockets, CoreDNS AAAA responses, ping results) is not observable from the supplied material. ### Diff coverage - `README.md`: **reviewed** — included in a context-limited batch - `modules/networking/nebula.nix`: **reviewed** — included in a context-limited batch <details><summary>Review metadata</summary> - Reviewer: forgejo-ai-review v1 - Model: strata/strata - Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, docs/auto-update-remediation.md, docs/nova-remote-builder.md, README.md - Commits considered: 2 - Previous automated review: none found - Findings: 2 </details>
Author
Owner

Review Follow-Up & Certificate Evidence

Responding to automated review advisory feedback for commit 3538f61 (verdict: Ready to merge):

  1. Inventory Assertion Added (3538f61):
    Added an assertion in modules/networking/nebula.nix guaranteeing that all keys in nixosConfig.nebula.ipv6HostMap must exist within hostMap, preventing inventory drift.

  2. Decoded Certificate Evidence (just nebula-list):
    Verified that the minted v2 node certificates match the configured addresses:

    • vega: networks: ["10.10.0.2/16", "fd56:f458:569c::2/64"] (fingerprint 7209b2d36a95b766e6b26d1ad2b510938315968efee05193541ce49bf83cdd75, version 2)
    • lyra: networks: ["10.10.0.3/16", "fd56:f458:569c::3/64"] (fingerprint 1ba98aa83bdd51cae8d6683ea1c6142a82a0eb5e765836cefa7ca706aabfd068, version 2)
    • lena: networks: ["10.10.0.21/16", "fd56:f458:569c::21/64"] (fingerprint 0ca48eccc2c6ce992a2d1a879b445fc2670f022c7e56fe026533112c7681efc1, version 2)
    • electra: networks: ["10.10.0.20/16", "fd56:f458:569c::20/64"] (fingerprint 6e409ef37a5283332465bf9592bc42c5f846fbc0050d4f59d3e7e156d660b524, version 2)
  3. Active Reachability:
    Both vega.mesh (fd56:f458:569c::2) and lyra.mesh (fd56:f458:569c::3) actively respond over IPv6 with 0% packet loss from Electra. Local self-resolution on Electra (electra.mesh) resolves to fd56:f458:569c::20 and 10.10.0.20 with 0% loss (0.026 ms rtt) while keeping bare electra on loopback 127.0.0.2.

### Review Follow-Up & Certificate Evidence Responding to automated review advisory feedback for commit `3538f61` (verdict: **Ready to merge**): 1. **Inventory Assertion Added (`3538f61`)**: Added an assertion in `modules/networking/nebula.nix` guaranteeing that all keys in `nixosConfig.nebula.ipv6HostMap` must exist within `hostMap`, preventing inventory drift. 2. **Decoded Certificate Evidence (`just nebula-list`)**: Verified that the minted v2 node certificates match the configured addresses: - **`vega`**: `networks: ["10.10.0.2/16", "fd56:f458:569c::2/64"]` (fingerprint `7209b2d36a95b766e6b26d1ad2b510938315968efee05193541ce49bf83cdd75`, version 2) - **`lyra`**: `networks: ["10.10.0.3/16", "fd56:f458:569c::3/64"]` (fingerprint `1ba98aa83bdd51cae8d6683ea1c6142a82a0eb5e765836cefa7ca706aabfd068`, version 2) - **`lena`**: `networks: ["10.10.0.21/16", "fd56:f458:569c::21/64"]` (fingerprint `0ca48eccc2c6ce992a2d1a879b445fc2670f022c7e56fe026533112c7681efc1`, version 2) - **`electra`**: `networks: ["10.10.0.20/16", "fd56:f458:569c::20/64"]` (fingerprint `6e409ef37a5283332465bf9592bc42c5f846fbc0050d4f59d3e7e156d660b524`, version 2) 3. **Active Reachability**: Both `vega.mesh` (`fd56:f458:569c::2`) and `lyra.mesh` (`fd56:f458:569c::3`) actively respond over IPv6 with 0% packet loss from Electra. Local self-resolution on Electra (`electra.mesh`) resolves to `fd56:f458:569c::20` and `10.10.0.20` with 0% loss (0.026 ms rtt) while keeping bare `electra` on loopback `127.0.0.2`.
nimmo merged commit f131213c8a into main 2026-10-12 14:36:43 +01:00
nimmo deleted branch feat/nebula-ipv6-hostmap-resolver 2026-10-12 14:36:45 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nimmo/nixos-config!318
No description provided.