Implement M6.5a coupled resource snapshots and restore
This commit is contained in:
@@ -440,3 +440,8 @@ M6.5 sequencing review: [ADR-0054](adr/0054-m65-source-persistence-prerequisite.
|
||||
is proposed because ADR-0051 requires persistence before rates while ADR-0053 defers
|
||||
coupled persistence to M6.8. Its recommended prerequisite and task breakdown are
|
||||
pending scope confirmation; the M6.5 completion criteria above remain unchanged.
|
||||
|
||||
Accepted 2026-09-27: ADR-0054 brings coupled snapshot/restore into M6.5. M6.5a's
|
||||
resource codec is implemented; the earlier pending-scope statement is superseded.
|
||||
Next are 6.5b conversions, 6.5c complete rate/biology persistence and fixture, and
|
||||
6.5d qualification. M6.8 retains the full decomposition/regrowth ecology gate.
|
||||
|
||||
@@ -663,3 +663,17 @@ minimal coupled buffer codec forward, preserving the earlier guarantee. The prop
|
||||
breaks M6.5 into codec, explicit biological conversion contract, rate-driven fixture,
|
||||
and qualification segments. No source-rate code or public interface changed in this
|
||||
review; M6.5 remains incomplete. M6.4's validated behavior is unchanged.
|
||||
|
||||
## Accepted M6.5 sequencing and M6.5a codec (2026-09-27)
|
||||
|
||||
The maintainer accepted ADR-0054: bring coupled snapshot/restore forward. This
|
||||
supersedes the pending-decision status above. M6.5a now implements
|
||||
[resource snapshot v1](../schemas/coupled-resources.md): terrain, finite fields,
|
||||
organism accounts/capacities, adoption watermark and chronological full retry history
|
||||
restore as one validated owner. Restore audits retained transfers backwards against
|
||||
current balances and validates nested codecs and aggregate ownership/budgets.
|
||||
|
||||
Next: M6.5b explicit capture/growth/feeding conversion contract, followed by M6.5c's
|
||||
complete source-rate/biology envelope and M6.5d qualification. No rates are enabled
|
||||
by the resource codec; no source progress is invented during restore. M6.5 as a
|
||||
whole remains incomplete. Durable publication and region recovery remain M7.
|
||||
|
||||
@@ -75,3 +75,7 @@ Test last-nutrient contention, exact/changed/expired retries, stale/foreign view
|
||||
uncovered endpoints, capacity, overflow, peak budgets, late-leg rollback and independent
|
||||
per-channel conservation. No account may progress offline via this primitive: biology
|
||||
adapters must validate active lifecycle and permitted actions before submission.
|
||||
|
||||
M6.5 amendment (2026-09-27): accepted ADR-0054 brings the coupled buffer codec
|
||||
forward to M6.5a. This supersedes the deferral above; rate/biology progress must
|
||||
join the aggregate before rate-driven execution in M6.5c. Durable publication stays M7.
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
# ADR-0054: M6.5 source persistence prerequisite
|
||||
|
||||
## Status
|
||||
Proposed, 2026-09-27. No rate-driven implementation is authorized by this proposal.
|
||||
M6.4 remains complete as a scoped in-memory transfer primitive. M6.5 is pending
|
||||
resolution of the prerequisite below, not complete.
|
||||
Accepted by the maintainer, 2026-09-27. Bring coupled snapshot/restore into M6.5.
|
||||
M6.4 remains complete as a scoped in-memory transfer primitive. M6.5 follows the segments below and is not yet complete.
|
||||
|
||||
## Context
|
||||
The accepted contracts disagree about when coupled persistence is required:
|
||||
@@ -29,7 +28,7 @@ The repository working agreement requires stopping affected implementation and
|
||||
proposing a resolution when architecture conflicts. This record exposes the mismatch
|
||||
rather than silently interpreting the later scope statement as superseding ADR-0051.
|
||||
|
||||
## Decision (recommended, pending scope confirmation)
|
||||
## Decision
|
||||
Bring the minimal coupled binary-buffer snapshot/restore contract forward into the
|
||||
M6.5 prerequisite. Keep durable filesystem publication and region crash recovery in
|
||||
M7; a canonical buffer codec is not a durable acknowledgment or fencing mechanism.
|
||||
@@ -99,6 +98,6 @@ Buffer round trips do not prove disk crash consistency, host-loss safety or regi
|
||||
ownership. Keep those delivery gates separate and unclaimed.
|
||||
|
||||
## Consequences
|
||||
After acceptance, revise the scoped ADR and roadmap references together before code.
|
||||
Until then, do not enable rate integration, weaken persistence requirements, or report
|
||||
Acceptance brings the minimal coupled codec forward; revise scoped references together.
|
||||
Until complete rate/biology state is serialized, do not enable rate integration or report
|
||||
M6.5 as implemented. Existing tests and deployed behavior remain unchanged.
|
||||
|
||||
+1
-1
@@ -60,4 +60,4 @@ design. No unadopted candidate is a link dependency of the proof.
|
||||
- [ADR-0051: Optional environmental fields](0051-optional-environmental-fields.md) - accepted for M6.2 finite sparse pages, local transfers and field snapshot v1.
|
||||
- [ADR-0052: Environment views](0052-read-only-environment-views.md) - accepted for M6.3 bounded read-only footprint queries and freshness validation.
|
||||
- [ADR-0053: Atomic environmental transfers](0053-atomic-environmental-transfers.md) - accepted for M6.4 tagged resource ownership, atomic local batches and bounded exact retries.
|
||||
- [ADR-0054: M6.5 source persistence prerequisite](0054-m65-source-persistence-prerequisite.md) - proposed resolution of rate-persistence versus M6.8 sequencing; not implemented.
|
||||
- [ADR-0054: M6.5 source persistence prerequisite](0054-m65-source-persistence-prerequisite.md) - accepted: coupled codec brought forward into M6.5; M6.5a implemented, rate/biology envelope follows.
|
||||
|
||||
@@ -192,3 +192,8 @@ stocks, terrain binding and tagged organism resource accounts. Fresh views autho
|
||||
only staged transfers; both endpoints and the retry receipt publish together after
|
||||
validation and allocation. Accounts are resource endpoints; biological lifecycle
|
||||
integration follows in M6.5. Field-only snapshots cannot recover a coupled owner.
|
||||
|
||||
M6.5a now provides [coupled resource snapshots](../../schemas/coupled-resources.md)
|
||||
under accepted ADR-0054. This is a detached, bounded buffer codec; M7 still owns
|
||||
file publication and durable acknowledgment. M6.5c must extend persistence to
|
||||
source-rate and biological progress before enabling the corresponding simulation.
|
||||
|
||||
@@ -1800,3 +1800,28 @@ ADRs 0050/0051 and 0053. ADR-0054 proposes a resolution; it is not accepted or
|
||||
implemented. `git diff --check` passed. No source, public API, test, schema or build
|
||||
configuration changed, so builds/sanitizers were not rerun for this proposal. The
|
||||
M6.4 validation above remains historical evidence, not M6.5 completion evidence.
|
||||
|
||||
## M6.5a coupled resource codec - 2026-09-27
|
||||
|
||||
ADR-0054 accepted by the maintainer. Added resource envelope v1 without changing
|
||||
nested terrain/field formats or existing simulation goldens. Rates are still disabled;
|
||||
source configuration/residuals and biology join the later M6.5c fixture envelope.
|
||||
|
||||
Executed Windows checks:
|
||||
|
||||
- Release check: 52/52 CTests passed with NDEBUG.
|
||||
- Analysis check: clang-tidy/warnings-as-errors build and 52/52 CTests passed.
|
||||
- ASan check: 52/52 CTests passed.
|
||||
- After tightening restore to require all mapped chunks already in the snapshot,
|
||||
Release and analysis rebuilt and environment-transfers-contracts passed again;
|
||||
the ASan full run includes this final adjustment.
|
||||
- Release format target passed.
|
||||
|
||||
Codec tests cover empty history, 66 transfers crossing the retry-ring boundary,
|
||||
canonical restored bytes, exact/conflicting/expired retries, equivalent continuation,
|
||||
all truncation lengths, checksum errors, recomputed-checksum invalid version/counts/
|
||||
amounts, identity mismatch and each budget. Initial compilation caught missing codec
|
||||
error enum entries; corrected before the passing runs above.
|
||||
|
||||
No Linux/UBSan/TSan, disk crash, allocation-failure injection or cluster validation
|
||||
was performed locally. Buffer round trips are not durable publication. M6.5b-d remain.
|
||||
|
||||
@@ -83,3 +83,8 @@ coupled world state. Tests exercise in-memory atomicity, not crash recovery.
|
||||
M6.5 biology adapters must validate active/alive status, capabilities, source budgets
|
||||
and biological costs. This resource endpoint abstraction neither implements metabolism
|
||||
nor allows offline progression. Next: one producer/consumer fixture using this owner.
|
||||
|
||||
M6.5a amendment: accepted ADR-0054 brings a [coupled buffer codec](../../schemas/coupled-resources.md)
|
||||
forward. `snapshot`/`restore` now save terrain, fields, accounts and full retry history
|
||||
together. This supersedes the M6.8 resource-codec deferral above. No rate/biology
|
||||
state exists yet; the later fixture must include it before enabling source integration.
|
||||
|
||||
Reference in New Issue
Block a user