Skip to content

gatewayendpoint: replay the platform Gateway Fleet publication contract (APT-822) - #28

Merged
reoring merged 2 commits into
mainfrom
work/20261117/apt-822-dns-contract
Nov 17, 2026
Merged

reoring merged 2 commits into
mainfrom
work/20261117/apt-822-dns-contract

Conversation

@reoring

@reoring reoring commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Why (APT-822, platform ADR-0083)

The Project DNS outages of 2026-11-12 (Craftsman) and the same withdrawals on appthrust.ink were a chain across two repositories: the platform Gateway Fleet wrote a source HTTPRoute status during a transient control-plane state, and dns-api read it as a reason to withdraw a live name. Each side had its own tests with hand-built inputs; nothing fed the Fleet's real output into dns-api.

Change (tests only)

  • internal/go/apps/gatewayendpoint/controllers/gateway/testdata/publication-dns-contract/v1/: 12 source Gateway/HTTPRoute fixtures generated by the platform Gateway Fleet reconciler (platform PR: see below), byte-identical copy, SHA256SUMS, README (ownership, regeneration, wire format).
  • publication_dns_contract_test.go (TestPublicationDNSContract): verifies checksums and the 12-scenario inventory; establishes 13 healthy names with real receipts, child RecordSets and provider records; then, per scenario, rebuilds a fresh client, provider adapter and all four reconcilers from the persisted state (a dns-api restart with an empty cache), applies the captured Fleet output and reconciles to convergence (≤16 passes).
    • retain scenarios: EndpointRecordSet and child RecordSet UIDs/specs unchanged and no Route 53 DELETE (every DELETE action is counted, so DELETE followed by UPSERT cannot hide a transient withdrawal);
    • withdrawal scenarios: exactly the expected names removed, siblings unchanged; Gateway rejection withdraws the set.
Scenario Fleet route Accepted DNS
healthy True retain
leaf-unreachable / apply-conflict / reconciler-restart True (retained; Gateway Unknown for unreachable/restart) retain
leaf-policy-status-absent False / RouteClosed (pre-wave-3 fence) retain (D4)
leaf-route-status-stale Unknown / LeafRouteStatusNotCurrent retain
policy-rejected False / RouteClosed retain (D4)
hostname-removed Unknown withdraw that name
parentref-removed / route-deleted / route-replaced — withdraw that route's names
gateway-rejected Gateway False withdraw all

Convergence ignores only resourceVersion/managedFields and status.hostnames[].conditions[].lastTransitionTime on EndpointRecordSets: the endpointrecordset reconciler restamps that time on every reconcile without a transition (platform tracker APT-1185, confirmed on appthrust.ink). Those status-only writes are counted and logged, not failed. No production change in this PR.

Verification

  • go test ./internal/go/apps/gatewayendpoint/controllers/gateway/ -count=1 → ok; go vet → ok.
  • Mutation: reverting D4 (route-level Accepted=False withdraws again, controller.go:316) makes leaf-policy-status-absent and policy-rejected fail with "retained publication sent Route 53 DELETE: [alias.project.example. app-00.project.example.]"; every other scenario still passes.
  • Producer side (platform): the Fleet test compares its real output with the same golden files; disabling incomplete-pass status retention fails it at leaf-unreachable.

needs-human-review is not a label in this repository; please treat this PR as review-required (no auto-merge).

…ct through a restarted reconciler set (APT-822)

- Byte-identical copy of platform's publication-dns-contract/v1 fixtures (real Fleet output, SHA256SUMS).
- Per scenario a fresh client, provider adapter and reconciler set (restart, empty cache) must retain live names
  with no Route 53 DELETE, or withdraw exactly the expected names.
- Reverting D4 (route-level Accepted=False withdraws) fails leaf-policy-status-absent and policy-rejected.
- Convergence ignores only hostname condition lastTransitionTime churn (APT-1185) and resourceVersion.
@reoring

reoring commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

Producer side: https://github.com/appthrust/platform/pull/6980. Fixtures are byte-identical (SHA256SUMS).

…retained publications (APT-822 review)

- Retain scenarios now also require zero provider UPSERTs.
- README synchronized byte-for-byte with platform (drift gap APT-1187, coverage limits).
@reoring
reoring merged commit bcd96ab into main Nov 17, 2026
2 checks passed
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