Files
aevolution/docs/engineering/M12_MIGRATION_TRANSPORT_FAULTS.md
T
dingo e0a7c13f6b
Foundation / checks (ecs) (push) Successful in 2m29s
Foundation / checks (deploy) (push) Successful in 4m8s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 18m9s
Foundation / checks (client) (push) Canceled after 18m8s
Foundation / checks (network) (push) Canceled after 18m7s
Foundation / checks (tsan) (push) Canceled after 15m39s
Foundation / checks (postgres) (push) Canceled after 18m13s
M12.4: qualify migration ownership across TLS path loss
2026-10-18 13:19:59 -04:00

4.5 KiB
Raw Blame History

M12.4k migration transport fault qualification

This qualifies ADR-0147–0149 over real loopback TCP with end-to-end PostgreSQL TLS. It changes tests and CI only: no SQL, biological format/rule, production adapter, world configuration, dependency in the headless library or deployment changes.

Fixture and command

bash tools/ci/postgres-check.sh --migration-faults "$PWD/build/m97-postgres/evo-postgres-tests"

The runner creates a fresh 0700 /tmp/evo-pg-test.* cluster and temporary TLS certificate/key. Only this mode listens on 127.0.0.1 at an ephemeral port. The owner stays on its protected Unix socket; only the least-privileged test login is admitted over TLS. Ordinary fixtures retain disabled TCP. The full and sanitizer qualification paths run this mode in a separate cluster, never a supplied/live database. Setup failure is a failed test, without a silent skip.

The test-owned relay forwards opaque encrypted bytes. It binds only loopback, owns and joins its worker, bounds each direction's queue to 64 KiB, and records discarded-byte counts. It can discard client requests or server responses independently. The unchanged adapter still uses sslmode=verify-full; a wrong hostname must fail. The fixture neither terminates TLS nor changes SQL results, leases, clocks or biological stock. Timeouts retain the adapter's real unknown outcome behavior.

Executed matrix

Both raw owner-7/profile-4 and exact cohort/profile-5 cases use actual funded player-origin wildlife from the existing publication fixture.

  • Request path lost: a paired request is discarded after TLS setup. The caller gets unknown with the exact two manifests; independent Unix-socket observation proves both heads stayed at their predecessors.
  • Receipt path lost: the database receives and commits the pair while the relay discards its reply. The caller gets unknown; independent observation proves both exact result manifests committed. Existing exact retry/recovery checks then prove no second transfer.
  • Preparation/staging replies lost: the owning source/destination hosts pause, retain exact work and reconnect to their durable freeze/ghost. No candidate is activated from an unconfirmed reply.
  • Either owner isolated: that owner's request path stays unavailable through actual three-second lease expiry. The independent healthy peer keeps its same epoch and retained pause. A replacement acquires a newer isolated-region epoch and recovers the same preparation/stage. Old-fence publication is refused and both heads remain unchanged.
  • Explicit abort reply lost: current source authority decides abort despite a lost response. Exact reconciliation releases both pointers. The healthy owner resumes identical biology; the isolated old owner remains fenced when its path heals while the replacement owns the region.

The matrix runs alongside existing process-kill, second-insert rollback, commit/abort race, full-payload replay and durable continuation tests. Numerical stock/head equality is checked independently of relay counters and client errors.

Tooling evidence and limits

The relay uses standard C++/POSIX facilities and the already approved PostgreSQL TLS adapter. Certificate generation uses the existing OpenSSL tool family; Python uses only its standard-library socket module to select a loopback port. The CI-only image installs Ubuntu's openssl/python3 packages and prints their versions. Production image package lists do not change.

Local evidence: OpenSSL 3.0.13 (3.0.13-0ubuntu3.16), Python 3.12.3 (python3 3.12.3-0ubuntu2.1, python3.12 3.12.3-1ubuntu0.17). Packaged copyright evidence is /usr/share/doc/openssl/copyright (Apache-2.0 for upstream OpenSSL) and /usr/share/doc/python3.12/copyright (Python licensing and bundled notices). These are distro-managed test utilities, without vendored code, a new package registry, configure-time fetch or selected game dependency. CI records its actual installed versions; local package versions do not promise future CI versions.

The relay discards bytes at an application transport boundary on one machine. This is not kernel packet loss, a multi-host routing/asymmetric firewall drill, remote database/object-store failure, or a production orchestrator failover test. The local object stores remain available. Linked geometry/resources, maturation, global census/cuts, target-host cost and actual elapsed-day ecology remain open. Executed compiler/sanitizer results and environmental limits belong in VALIDATION. No World0 action or cellular clone/restore claim.