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:
@@ -68,6 +68,13 @@ class EnvironmentalCommunity {
|
||||
[[nodiscard]] std::uint64_t tick_microseconds() const noexcept {
|
||||
return config_.tick_microseconds;
|
||||
}
|
||||
[[nodiscard]] std::uint64_t world() const noexcept {
|
||||
return config_.world;
|
||||
}
|
||||
// Clone support (ADR-0067): records the region under another nonzero world ID,
|
||||
// keeping its frame. Rules, content and trajectory do not depend on the world ID
|
||||
// (ADR-0044), so rebinding back yields byte-identical snapshots. False for 0.
|
||||
[[nodiscard]] bool rebind_world(std::uint64_t world) noexcept;
|
||||
|
||||
private:
|
||||
struct State {
|
||||
|
||||
@@ -66,6 +66,11 @@ class LineageRegion {
|
||||
[[nodiscard]] const LineageBinding& binding() const noexcept {
|
||||
return binding_;
|
||||
}
|
||||
// Clone support (ADR-0067): only the nested community records a world; the
|
||||
// archive and binding are identity-free. False for world 0 or a poisoned region.
|
||||
[[nodiscard]] bool rebind_world(std::uint64_t world) noexcept {
|
||||
return !poisoned_ && community_->rebind_world(world);
|
||||
}
|
||||
|
||||
private:
|
||||
LineageRegion(std::unique_ptr<EnvironmentalCommunity> community,
|
||||
|
||||
Reference in New Issue
Block a user