[grade=B urn:ump:ez33fpgyydl3nyjnwaaplisz7slunupcf5dnr42pdblwx7chfcma] feat(DC-171): phase 2 — PowerDNS adapter (full plug-in parity) + shared wizard DNS serialisation

NEW powerdns.js adapter: PowerDNS Authoritative HTTP API (X-API-Key).
Full parity (zones + native RRset enumeration — no AXFR needed):
listZones/listRecords, additive create that merges with existing rrset
contents and FAILS CLOSED when the rrset cannot be read (blind REPLACE
would erase values), content-level delete with positive value-presence
proof (absent rrset/value → not-found with ZERO writes; empty/null value
rejected; only genuine whole-rrset intent issues DELETE), TTL preserved
in REPLACE payloads and on additive creates, cross-zone qualification via
the server-resolved zone id/name, case-insensitive rrset matching,
dig-based resolve against the DNS listener (distinct from the API port),
error guidance naming the exact pdns.conf prerequisite.

WIZARD SERIALISATION EXTRACTED to shared js/dns-provider-config.js
(browser global + module.exports): per-provider port defaults
(PowerDNS 8081, RFC2136 53, legacy Technitium 5380), strict port
validation (full-string digits, 1-65535), provider-specific aliases
(server/apiPort/dnsPort/apiToken). The backend tests now execute the
EXACT shipped wizard code, joined through the real createProviderDnsContext
factory to adapter authentication (X-API-Key asserted). provider-dns.js
dual-accepts generic wizard keys and provider-specific fields and
normalises ports to integers (fixes the same latent gap for rfc2136).

Also fixed: rfc2136 parity-matrix rows now exact-sorted-equality across
all five adapters; wizard confirmation summary uses the provider default.

Judge: 7 rounds — r1 C (silent-erase on failed read, cross-zone bug,
missing resolve tests) → r2 C (deleteRecord positive-proof semantics) →
r3 C (TTL in REPLACE, count honesty) → r4 C (empty-value fall-through)
→ r5 C (wizard ip/port/token vs builder field mismatch) → r6 C (5380
default defeating provider ports, untested serialisation) → r7 B zero
blockers (urn:ump:ez33fpgyydl3nyjnwaaplisz7slunupcf5dnr42pdblwx7chfcma).
Post-grade polish applied: strict port validation + range, summary uses
provider defaults, joined serialisation→factory→adapter test, invalid
port table tests.

Suite: backend 176 suites / 3791 tests, frontend 68/68.
This commit is contained in:
Hermes committed 2026-10-29 23:46:03 -07:00
1 parent d8c9d79855
commit 6c9f9e59a3
12 files changed
+1319 -158

No files matched your search

+22 -2
View File
@@ -8,6 +8,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
- **DC-171 phase 2: PowerDNS adapter (full plug-in parity).** New
`powerdns` DNS provider speaking the PowerDNS Authoritative HTTP API
(X-API-Key): native zone listing and RRset enumeration (no AXFR needed —
full-parity like Technitium/Cloudflare), additive record creation that
merges with existing RRset contents (REPLACE semantics done honestly),
content-level deletion from multi-value RRsets, dig-based resolution
against the DNS listener, and error guidance that names the exact
pdns.conf prerequisite (`api=yes`, `webserver=yes`, `api-key`). Wired
end-to-end: provider config builder, setup-wizard option + capability
hint, capability matrix row, and 24 adapter tests
(flatten, merge/REPLACE, delete levels incl. not-found no-ops and
empty-value rejection, TTL preservation, cross-zone qualification,
case-insensitive matching, auth guidance, zone mapping). The wizard's
DNS serialisation was extracted into a shared module
(js/dns-provider-config.js) consumed by both the browser and the test
suite: per-provider port defaults (PowerDNS API 8081, RFC2136 53,
legacy Technitium 5380), strict port validation (full-string digits,
1-65535), and provider-specific field aliases — tested end-to-end from
serialisation through the provider factory to adapter authentication.
- **DC-171: DNS provider plug-in parity, phase 1 (BIND 9 upgrade + capability
honesty).** RFC 2136 adapters can now LIST records: `listRecords` performs an
AXFR zone transfer via `dig` with the same TSIG identity as nsupdate (temp
@@ -68,8 +87,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
templates, MCP tools measured at runtime), so the marketing site, docs, and
llms.txt can never disagree with the product.
- **DC-171 (roadmap): further provider plug-in parity** — BIND 9 AXFR-based
listing shipped in phase 1 (above); remaining roadmap: PowerDNS /
deSEC / AdGuard Home adapters, richer per-provider setup validation.
listing (phase 1) and the PowerDNS HTTP API adapter (phase 2) are shipped
(above); remaining roadmap: deSEC / AdGuard Home adapters, richer
per-provider setup validation.
~~Capability reporting at provider-choice time~~ shipped in phase 1
(wizard hints + route guidance + MCP guidance); the original "listing is
protocol-impossible" note was superseded — RFC2136 listing works via