Repository navigation
Conversation
Declare the records this repository owns in dns.tf and add a main-only "DNS plan and guarded apply" workflow against the authoritative R2 state. It imports a declared record only when exactly one unowned live record matches it, refuses deletes, replacements and changing imports, encrypts state before and after every apply, and proves a clean plan from a fresh runner. External-dns records, including the SES bounce records, stay with external-dns. The email-only import proposal is superseded and removed. Part of #21. Part of #65. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Create external-dns's ownership record for the existing www CNAME and forget the CNAME here, so external-dns replaces it with the gateway addresses in one batch. Part of #21. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Refuse a create that an external-dns ownership record already claims, even when the claimed record itself is missing. - Compare record names in full lower-case form, so a relative or differently written `_externaldns` name cannot pass the apex guard. - Keep OpenTofu's errored.tfstate in the encrypted evidence when an apply cannot save its state to R2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jq 1.8 parses `X and Y as $v | body` with the whole and-expression as the binding, so the external-dns ownership check always found no owner on the Ubuntu 26.04 runner. Bind the name first; the tests pass on jq 1.7 and 1.8. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep the names of live records that nothing owns in the encrypted evidence and print a count by type, so the public log never lists hostnames. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From a fresh local review: - Never import a live record that a resource already manages, and leave managed siblings out of the content-differs check. - Let an `_externaldns.` ownership record claim only a record that the same plan stops managing, read both typed and typeless, so no marker can hand a mail record such as the DKIM CNAME to external-dns. - Refuse a create or update of a record external-dns owns, or one without a known name. - Print addresses only for the records in dns.tf; anything keyed by the private configuration appears as a count. - Stop the apply with SIGTERM only, so a timeout cannot leave the R2 lock. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Rollback plan, written before the apply What this apply does: it edits the apex CNAME in place, from How to check it worked: Rollback, with no gap:
Keep GitHub Pages and its 🤖 Generated with Claude Code |
…ide private refusals - Refuse an update that moves a record external-dns owns, not only one that lands on an owned name. - Require an upper-case record type for every write and compare types case-insensitively when resolving imports, so a `txt` marker cannot skip the claims check. - Report a refusal for a record keyed by the private configuration without its address. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From a second local review round: - An `_externaldns.` ownership record must claim at least one live record, and every live record it claims must be one the same plan forgets. It can no longer hand an unmanaged record, such as another DKIM selector, to external-dns. - Record names on writes use hostname characters only. - Import resolution stops if the plan's prior state lacks the zone, instead of treating the managed set as empty. - The apply gets a fresh 15-minute state session and a 5-minute SIGTERM bound, so its state save and unlock never run on expired credentials. - The runbook describes what to do after a failed or partial apply. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pply From the third local review round: - Match write names against the whole string (\A…\z), so a trailing newline cannot slip past the hostname pattern or the ownership check. - Stop a slow apply with SIGINT sent to OpenTofu alone (--foreground), so the provider plugin finishes its in-flight call and the result is saved. - Test that a marker is refused when the forget lacks or mismatches the claimed record's id. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # dns.tf
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The import-only apply in run 43674749476 (source 457727e) moved the authoritative state from serial 3 to 4 on the same lineage, with the configuration unchanged. Its `after` package and the fresh runner's `recovered` package both authenticate with the independent identity and carry the same state digest. The DNS workflow requires this generation before its next run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # dns.tf
Run 43675268687 (source 81ab7a9) created the www ownership record and forgot the www CNAME, moving the state from serial 4 to 5 on the same lineage with the configuration unchanged. The `after` and fresh-runner `recovered` packages authenticate with the independent identity and carry the same state digest. The fresh runner's plan wanted to recreate the ownership record only because external-dns had already taken it over; this pull request forgets it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Edit the existing apex CNAME in place from devantler.github.io (DNS only) to www.devantler.tech (proxied). One record changes its target, so the site is never without an address, and the apex then follows www and the gateway. This replaces #77, which carried the same edit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Superseded by #78, which makes the same in-place apex edit in one apply with the restored www ownership records (agreed with the platform cutover). The rollback plan is copied there. 🤖 Generated with Claude Code |
…ership of www (#78) * chore(recovery): retain the state after the www handover apply Run 43675268687 (source 81ab7a9) created the www ownership record and forgot the www CNAME, moving the state from serial 4 to 5 on the same lineage with the configuration unchanged. The `after` and fresh-runner `recovered` packages authenticate with the independent identity and carry the same state digest. The fresh runner's plan wanted to recreate the ownership record only because external-dns had already taken it over; this pull request forgets it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(dns): restore external-dns ownership of www external-dns took over www at 04:06:52Z and wrote its ownership records for the new A and AAAA addresses, but both were gone within a minute. www still points at the gateway, but nothing owns it now. - Create `_externaldns.a-www` and `_externaldns.aaaa-www` with exactly external-dns's content, so it re-owns the existing records without changing them, and forget the one-time cname-www marker. - Add a reviewed handover list, .github/dns-handover.json. A marker may claim a live record nothing here manages only when that list names it; every other claim still has to be a record the same plan forgets. This avoids adopting the www addresses here, which would publish the gateway's origin addresses. Part of #21. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(dns): point the apex at www in the same apply Edit the existing apex CNAME in place from devantler.github.io (DNS only) to www.devantler.tech (proxied). One record changes its target, so the site is never without an address, and the apex then follows www and the gateway. This replaces #77, which carried the same edit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(dns): let a listed handover claim only its own typed marker From the local review of the handover list: - A listed record may only be claimed by its own typed marker (`_externaldns.<type>-<name>`), never by a wider typeless one. - Listed names use hostname characters without `_`, so the list can never name a DKIM or other service record. - Test a listed name with an unlisted type, a typeless marker, an extra top-level key, the 20-entry cap, an underscore name, and the repository's own .github/dns-handover.json; each rule fails a test when removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Why
devantler.tech itself should move to the platform with www, and keep following the gateway if its address ever changes.
What
The rollback plan is in the comment below: an in-place edit back to
devantler.github.io, with no gap.Part of #21
🤖 Generated with Claude Code