Skip to content

endpoint: a provably never-published endpoint has no withdrawal obligation to capture - #22

Merged
reoring merged 1 commit into
mainfrom
work/20261101/endpoint-withdrawal-no-zone
Nov 1, 2026
Merged

reoring merged 1 commit into
mainfrom
work/20261101/endpoint-withdrawal-no-zone

Conversation

@reoring

@reoring reoring commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Problem

Since DEP-0003 (#17, v0.3.0) retirement capture holds whenever no publication Zone resolves for a retired hostname/address pair (withdrawal.go → WithdrawalCapturePending: no publication Zone binding resolved for …). An ERS whose hostnames or addresses change before any matching Zone exists therefore never captures. Consequences observed on appthrust/platform Kind lanes (no DNS Provider):

  • endpoint Reconcile returns early on the pending retirement, so status.observedGeneration freezes (generation 12, observed 1) and active hostnames keep stale diagnostics; HTTPPublish never reaches its ZoneNotResolved terminal.
  • gateway endpoint cleanup waits on RetireOrDelete → capture, so the gateway.endpoint.dns.appthrust.io/httproute-finalizer is never released and the owning Project cannot be deleted.

Evidence: platform CI runs 41305702992 (identity lane) and 41305716631 (pooled lane); appthrust/platform#5581.

Change

Capture is vacuous for a pair only after an explicit Resolved=False/ZoneNotResolved result and authoritative proof that the endpoint was never published:

  1. no retained hostname Zone binding or generated-record reference/count on the ERS;
  2. no sticky WithdrawalProtected=True;
  3. an uncached (APIReader) Zone read finds no suffix-matching Zone (ZoneNotResolved also covers conversion/capability rejection, so reason alone is not enough);
  4. an uncached source-label-bound RecordSet read finds no generated child (closes the create/status-write crash and cache-lag window).

Everything else keeps capture pending and retains finalizers. A Zone that disappears after prior publication stays fail-closed. No provider/environment special case. endpoint-api.md and DEP-0003 updated.

Verification

  • New withdrawal_no_zone_test.go fails on the previous source with the exact WithdrawalCapturePending message; passes with the change. Cases: never-published pair completes; generated RecordSet present (even only via uncached read) pends; lost prior Zone binding pends; sticky protection pends; read error / incomplete list / missing reader pend; active-status convergence; retire-only cleanup; direct deletion.
  • go test ./internal/go/apps/endpoint/controllers/endpointrecordset -count=1, go vet on the package: pass.
  • Not yet validated on a Kind lane with the built image; that happens through the platform reviewed-import bump after this is released.

…ation to capture

DEP-0003 (#17) holds retirement capture whenever no publication Zone
resolves for a retired hostname/address pair. Any ERS that changes
hostname or address before a matching Zone exists therefore never
captures: the endpoint controller returns early on pending retirements,
observedGeneration freezes, active hostnames keep stale diagnostics, and
the gateway endpoint controller never releases the HTTPRoute finalizer.
On a platform without a DNS Provider this blocks every HTTPPublish from
ever reaching its terminal state and every owning Project from deleting.

Capture is now vacuous for a pair only after an explicit ZoneNotResolved
result and authoritative proof that the endpoint was never published:
no retained hostname Zone binding or generated-record reference/count,
no sticky WithdrawalProtected=True, an uncached read finding no
suffix-matching Zone, and an uncached source-label-bound read finding no
generated RecordSet. Everything else keeps capture pending and retains
finalizers: an unusable matching Zone, conversion/capability rejection,
any existing or deleting child, incomplete lists, a missing reader, or a
read error. A Zone that disappears after publication stays fail-closed.
@reoring
reoring merged commit 32983fa into main Nov 1, 2026
2 checks passed
@reoring
reoring deleted the work/20261101/endpoint-withdrawal-no-zone branch November 1, 2026 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant