This document closes M11-T05 by evaluating the shared-runtime boundary after the third engine
proof:
allocdb-corequota-corereservation-core
The question is no longer whether there is an engine family here. That is now proven strongly enough. The question is whether the repository has crossed the line from "family of engines" to "extract a reusable runtime now."
Do not extract a broad shared runtime crate yet.
Do prepare the first tiny internal extraction slice now.
The right outcome after the third engine is:
- still no
dsm-runtimeor public database-building library onmain - still keep command surfaces, snapshot schemas, recovery entry points, and state-machine logic engine-local
- now treat
retire_queueas an immediate extraction candidate - keep
wal,wal_file, andsnapshot_fileas the next likely candidates only after the first micro-extraction lands cleanly
So the third engine changed the answer from "defer everything" to "defer the big runtime, but start one tiny internal extraction."
The engine thesis is now materially stronger than it was after quota-core.
All three engines now demonstrate the same trusted-core discipline:
- bounded in-memory hot-path structures
- WAL-backed durable ordering
- snapshot plus WAL replay through the live apply path
- logical
request_slot - bounded retry and retirement state
- fail-closed recovery on corruption or monotonicity violations
That is enough to say allocdb contains a real deterministic-engine family, not just one lease
allocator plus one adjacent experiment.
retire_queue is now the strongest extraction candidate.
It is byte-identical across:
crates/allocdb-core/src/retire_queue.rscrates/quota-core/src/retire_queue.rscrates/reservation-core/src/retire_queue.rs
This is the first module that is no longer just "similar." It is the same substrate in all three engines.
wal.rs is byte-identical between:
crates/quota-core/src/wal.rscrates/reservation-core/src/wal.rs
That is a stronger seam than M10 had, but it is still not universal across all three engines
because allocdb-core carries a richer record surface and recovery/reporting contract.
wal_file.rs is now extremely close between quota-core and reservation-core.
The remaining delta is small and concrete:
reservation-corerefreshes the append handle after truncation- the test fixtures differ only in engine-local payloads
This is close to extractable, but still wants one more deliberate pass rather than a speculative generic crate.
The runtime discipline is effectively the same between quota-core and reservation-core.
Most visible diffs are test-fixture and domain-shape differences. The remaining constructor/path
surface still differs from allocdb-core, so this is a later extraction candidate, not the first
one.
The third engine did not make these safer to extract.
Do not extract the snapshot schema layer.
reservation-core widened the divergence:
- active-hold rebuild only for
heldrecords - deadline-based expiry semantics
- hold/pool state that has nothing to do with quota buckets or lease reservations
The persistence discipline is shared. The schema is not.
Do not extract the top-level recovery API yet.
The replay skeleton is recognizably similar, but the third engine made the semantic hooks more obvious, not less:
- overdue-hold expiry on later request slots
- held-only rebuild behavior on restore
- torn-tail proof around expiry boundaries
- engine-specific replay and mutation contracts
There may be helper seams later, but the public recovery entry points are still engine-local.
Do not extract state-machine traits or generic apply plumbing.
The shared truth is still at the discipline level:
- bounded state
- deterministic apply
- logical time
- retry retirement
The actual mutation logic diverged further:
allocdb-coreis identity-heavy and fence-heavyquota-coreis arithmetic-heavy and refill-heavyreservation-coreis lifecycle-heavy and expiry-heavy
That divergence is healthy. It means the engines are real.
A broad extraction would still create cost too early:
- more crate boundaries
- more generic traits and type plumbing
- more internal APIs to stabilize
- more coordination every time an engine evolves
The third engine improved the evidence, but not enough for a full runtime crate:
- one module is now fully mechanical across all three
- two to three more modules are close only within the smaller quota/reservation pair
- snapshot, recovery, config, command, and state-machine layers still diverge in important ways
So the right move is smaller than "extract the runtime."
Close M11 after this readout.
Then start one narrowly scoped extraction slice:
- extract
retire_queueinto one tiny internal shared crate or module - prove that no engine behavior changes
- only after that, reassess
wal,wal_file, andsnapshot_file
Do not start with:
- snapshot schemas
- recovery entry points
- command codecs
- generic state-machine traits
- a public library story
The third engine strengthened the thesis, but it did not yet produce a reusable "database-building library."
The honest status is:
- there is now enough common substrate to justify the first tiny internal extraction
- there is still not enough stable shared shape to claim a general DB-construction framework
That is progress, but it is not the same thing as "the library is ready."