Complete M7.9a region clones and retained-history audit

Clone a verified committed head into an isolated world and database
(ADR-0067): world re-identification with a proven byte round trip, a
schema v7 clone genesis naming the source commit and digest with digested
inherited outcomes, a read-only source session, an owner-only atomic
target transaction and the evo-world-clone tool. audit_region_history
re-verifies every retained link. Real-process tests cover trajectory
equality after the cut, source isolation, killed clones and retention.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-09-29 06:47:45 -04:00
co-authored by Claude Opus 5.5
parent 7aec68db8e
commit 703f67834f
28 changed files with 2206 additions and 266 deletions
+63
View File
@@ -2422,3 +2422,66 @@ Only clean-to-v1 and exact-v1 restart are supported migration paths at this gate
the workflow YAML parses; `bash -n` passed for the smoke script.
- Not executed: the container build and smoke, the Gitea job, cluster apply,
Prometheus scraping, and TSan.
## M7.9a region clones and retained history - 2026-09-29
- Windows MSVC Release CTest passed 59/59. `lineage-region-contracts` now covers
rebinding: only the new identity restores, continuation matches, and rebinding
back is byte-exact. `region-checkpoint-contracts` covers the clone-genesis
manifest rules.
- WSL Linux `checks` set (GCC14 Debug and Release, clang19 analysis, clang19
ASan/UBSan) passed CTest 59/59 each. The format check passed.
- The PostgreSQL suites passed in GCC Release, clang-tidy analysis and ASan/UBSan.
These runs used a second database, `evo_clone`, with its own runtime group and
login. clang-tidy first flagged branch-clone in the tool's option parsing and
optional access in the new tests; both were fixed, then the suites were rebuilt
and rerun.
- Harness additions:
- A populated v6 database (a v2 genesis) upgrades in place to v7. The replaced
head constraint is `region_heads_published_tick`, and the v7 parser reads the
stored genesis.
- Upgrade paths now end at 1..7.
- Version and checksum drift checks now include v7.
- Clone tests (real `evo-server` and `evo-world-clone` processes):
- Trajectory: world 7 was run to tick 30, with a death at tick 20, then cloned
to world 8 in `evo_clone`. The clone recovered under the clone runtime at
tick 30, with the inherited death and retained ancestry, and the audit found
one clone link naming the source cut. Both worlds then ran inputs 31..90; after
rebinding the clone to world 7, the snapshots were byte-identical.
- Isolation:
- A same-world target was refused as `identity`.
- A world that already holds an original region was refused (22023).
- A forged origin was refused (22023).
- The runtime role cannot provision a clone (42501).
- A clone world refuses an original region.
- Origins are immutable (EVL09).
- The source session is read-only (25006, even through SECURITY DEFINER).
- A clone lease publishing a successor to the source is fenced.
- The clone runtime login cannot reach the source's functions (42501).
- The source head and decisions were unchanged afterwards.
- Failure: a SIGKILL before the target transaction left the source unchanged,
the target unprovisioned with one orphan object, and a target server that
quarantined (exit 4) without becoming ready. The tool refused a same
database or same user (exit 2) and a same world (exit 4). The retry
succeeded and reused the same object. A source with a damaged head payload
was refused (exit 3), and its target stayed untouched.
- Retention: an owner was SIGKILLed after acknowledging tick 100, and its
successor continued to tick 200. The audit verified every link, and the tool
printed the same result. A lower `max_commits` returned `bounds`. Removing the
first link's trace made the audit report `tail` at sequence 1 while head
recovery still succeeded; restoring the trace made the audit pass again.
- Environmental profile: a clone inherited the tick-20 death. Moving that
durable row to tick 19 (triggers disabled as break-glass) made recovery
report `history` and the audit report `history` at sequence 0. Moving it back
made recovery pass.
- Mutations (each restored and rebuilt afterwards). Each was caught by its
intended check:
- dropping the isolated-world refusal;
- dropping the origin check;
- a read-write source session;
- skipping the inherited-outcome digest;
- skipping the audit's per-link tail verification.
The first attempt at the inherited-outcome mutation did not compile, so its
stale-binary run was discarded and the mutation was rerun.
- Not executed: clones across separate PostgreSQL clusters or hosts, Docker, the
Gitea CI, and cluster runs.