Application state-machine companion

Draft protocolSource at 169cbd2 ↗Source SHA-256 e1f13ba…63e
Status
Draft normative refinement
Specification
Revision 14, 2026-09-22
Library baseline
Commonware v2026.9.0

This companion refines SPECIFICATION.md, especially sections 5, 7–13, 16, and 18. The specification takes precedence. These are semantic transition tables, not a second command catalog or wire format. The seventeen command tags remain unchanged. Canonical discriminants, field encodings, cryptographic profiles, and byte vectors belong to the encoding artifact; measured limits and prices belong to calibration. No implementation may invent those values from these tables. The client API companion describes how clients prepare and reconcile these transitions.

1. Execution contract

All guards evaluate under the executing block's Rules, consensus timestamp, and branch state. The block overlay initially reflects the supplied parent batches plus any activation installer. Commands execute in flat order. Every table row below also inherits the following steps:

  1. Bound and decode the complete envelope with exact consumption; check chain, command variant, ruleset, price schedule, and payload limits. Reserve worst-case bytes, work, and gross creations before expensive verification. A reservation includes indirect reads, refund ledgers, and every replaceable proof. A pause flag is evaluated from Rules, never from a local service setting.
  2. Create an isolated command change set over the block overlay. Read each key at most once from the underlying branch, then use the overlay for subsequent reads. Raw records remain available even when an effective read treats them as unauthorized, non-resolving, or expired.
  3. Authenticate the actor and required capability. Root witnesses use the account's current commitment and version; every approval is a key approval. Delegates must match generation, issuing epoch, class, scope, and time window. Check sequence strictly above its slot's high-water mark and any signed deadline. System commands instead use their settlement or governance guards, not an account replay slot.
  4. Check project control/grant context and parent-counter guards at command entry. Apply the variant's guards and operations in the order specified below. Repeated ref operations see earlier operations in this command. Root authorization never bypasses project authority.
  5. Accumulate non-refundable fees, new deposit locks, and stored-payer discharges by ledger key. Require gross fees plus new locks ≤ signed max_charge for charged account commands. Netting a discharge is permitted only for the resulting balance of its own payer; every final ledger must satisfy spent + locked ≤ credited. Neither refunds nor collapsed writes reduce resource reservations. System exceptions follow specification section 10.3.
  6. On success, advance the applicable replay mark, produce bounded event data, and merge all writes, counters, ledger deltas, membership appends, and events into the block overlay together. On failure, discard all of them. A proposer can skip a failed candidate; a verifier rejects a block containing one. Transient source failures stay pending; corruption is fatal-local.

The consensus_profile comes from the authenticated GenesisChainSpec, never from a process flag, RPC claim, or command. The two known semantic variants are FixedEpochZeroV1 and DynamicReshareV1; canonical field layout and discriminants remain format-contract work. For the fixed profile, every execution entry point first requires the block, round, proposal, vote, certificate, recovered context, and certified ancestry to name epoch zero and a height in 0..=u64::MAX - 1. It rejects a nonzero epoch before any signing-scheme lookup; a constant-provider success cannot authorize the scope. DynamicReshareV1 retains the production epoch, DKG, membership, and release behavior specified elsewhere.

At block completion, submit final writes and staged indices to QMDB and merkleize each of the three members once, including empty membership batches. Append the history leaf and use the specified metadata and membership floor. Re-derive all header fields, including the canonical current root. Never persist, publish events, or make external calls with side effects during speculative execution. Durability barriers, marshal acknowledgements, and restart reconciliation belong to glue.

valid_before_timestamp_ms, when present, is an exclusive bound: execution at or after it is invalid. This uses consensus time, just like key and offer expiry. All counter and timestamp arithmetic is checked, and the forbidden maximum is rejected before effects merge.

Launch duration arithmetic uses fixed elapsed time, never calendar arithmetic: one day is 86,400,000 milliseconds and one year is 365 days. Thus the key term is 730 days, the username term is 365 days, the rename cooldown is 28 days, and both username grace and offer expiry are 30 days. The username horizon remains a calibrated parameter; the companion fixes no price or work weight.

2. Record access notation and bounds

The notation below names semantic identities; actual state keys use the family's registered digest formula from specification section 9.2. Every loaded value must carry the matching identity.

Symbol Record identity
L(a) AccountLedger for account a
A(a) AccountRoot for account a
K(a,k) DelegatedKey for account a and its full account-scoped key identity k
P(p), M(p) Project and ProjectMetadata for project p
S(a,s) SlugClaim for owner a and canonical slug s
G(p,a) ProjectRole for grantee a in project p
O(p) TransferOffer for project p
F(p,n) Ref for project p and digest of exact signed RefName n
U(n), N(a) UsernameLease for name n; permanent AccountUsername for account a
B SettlementAnchor
R, R(e) ProtocolScheduleState and a specifically addressed ProtocolReleaseEntry
V(id) Specifically addressed validator schedule or permanent public-key reservation entry within the ValidatorScheduleEntry family

Every account command has a common access set: L(actor), A(actor), the signing K when applicable. The replay write is to A(actor) for root or to its signing K for a delegate. System commands omit this set unless a row explicitly names a beneficiary ledger. INIT_ACCOUNT uses its special genesis witness.

Every operation authorized over an existing project adds P(p) and, for a non-controller actor, G(p,actor); metadata or slug work adds M(p). PROJECT_CREATE uses its absence checks instead of authority over an existing project. Acceptance uses the named destination's authority, not a writer role in the source project. Read/write sets in the next tables are additional to these common sets. All price, capability, signature, and pause checks are inherited even when not repeated in a row.

A deletion/replacement additionally reads and writes L(raw.deposit_payer) for each deposited record it consumes. These ledgers may coincide with each other or the actor's ledger; deltas must accumulate, not overwrite. Replacement always reserves one gross creation and charges the current creation fee/deposit, while discharging exactly the old stored amount. A read-only expiry test never deletes or unlocks anything.

Let r be the bounded number of ref operations, c the commitment count, and w the number of CREATE/SET operations (w ≤ r). PUSH reads at most r distinct ref keys and at most r additional payer ledgers; it appends c membership leaves and verifies w witnesses. No row discovers children by enumerating a project, account, history log, or database index. Each witness has its own bounded proof-node budget; source reads do not create validity-state keys.

The creation bounds below count gross creations, including same-key replacements. Base byte and work reservations are compositional: the common access set plus every optional branch's maximum, not the branch observed after execution. Calibration assigns weights; it cannot omit a branch.

3. Account and delegated-key transitions

Command / variant Guards beyond common checks Additional reads → writes Creation/deposit effects
INIT_ACCOUNT Ledger exists and funds charges; root absent; positive sequence in version-zero root slot; genesis witness recomputes the actor address and satisfies genesis authority A(actor) absence, L(actor) → initialize A with accepted root sequence, charge L At most 1 permanent root creation; no delegated-key deposit
ROOT_CONFIGURE Current root quorum; valid address-sorted owner configuration and exact next version; preserve current salt, or derive the upgrade salt for the first single-key upgrade; unset-commitment genesis path only for that upgrade A(actor) → new config commitment/version, preserve other fields except normal replay advancement 0 creations; no delegate or deposit changes
KEY_AUTHORIZE.Authorize Root; expected keychain revision; predecessor absent or exact expected generation invalidated by expiry/window end/epoch; valid new policy Target K, A → fresh generation, current epoch, initial replay mark and expiry; advance allocation counter/keychain revision 1 key creation; discharge resident predecessor if any, then fresh fee/lock
KEY_AUTHORIZE.Renew Root; expected keychain revision and generation; current epoch and neither expiry nor window end reached; new expiry strictly later Target K, A → max(old_expiry, now + key_term), advance keychain revision 0 creations; preserve policy, scope, replay mark, generation, deposit
KEY_REVOKE.One Root; expected keychain revision and raw resident generation, even if invalidated Target K, A → delete K, advance keychain revision 0 creations; discharge stored payer; no command charge
KEY_REVOKE.All Root; expected keychain revision/epoch; allocation counter greater than epoch-start watermark A only → increment epoch/revision; set watermark to allocation counter 0 creations or discharges; no key enumeration and no command charge

INIT initializes counters/epochs at their specified bases and records the accepted root sequence; subsequent configuration preserves them. Authorize consumes the account's next key allocation value and advances it. Its fresh generation cannot inherit the predecessor's replay mark. Renew preserves its mark. All leaves every raw key and its locked deposit resident; it emits only the old/new epoch. Cleanup never reduces the permanent counters. AccountUsername is initialized lazily on the first operation that needs to mutate that account's name allocation/pointer state, counted and priced as a permanent creation in section 6 below.

3.1 Initial values

Initial values are protocol rules, never Rust defaults. Every increment rejects exhaustion before mutation. The generic bases below do not replace a specifically allocated predecessor revision.

Record or field Initial value and first transition
AccountRoot version = 0; single-key genesis has no config commitment, configured genesis stores the commitment of its verified version-zero configuration; root_sequence is the positive sequence accepted by INIT_ACCOUNT
Root counters delegation_epoch = key_allocation_counter = epoch_start_key_counter = 1; keychain_revision = 0
Root envelope slot BLAKE3("makechain.root-slot" || AccountId); authorization generation equals current root configuration version; every version shares the permanent root replay mark
New DelegatedKey Generation consumes the parent's key allocation counter; issuing epoch copies the current delegation epoch; sequence_mark = 0
New Project Controller and scheme come from creation; ACTIVE; control_generation = lifecycle_revision = 1; mutation counter begins at 1, then the initial slug allocation consumes it so the stored counter is 2
New child revision/generation Consume the relevant parent counter, then increment it; never initialize independently from a guessed zero or timestamp
First AccountUsername Allocation counter starts at 1; the first lease consumes incarnation counter 1 and stores counter 2; current name/incarnation and selection timestamp are those of the successful claim
Governance/release/validator singleton revisions and nonce Zero at genesis, with no pending schedule entry; exact genesis records are defined by the encoding contract
First AccountLedger credited is the proved positive cumulative, spent is its first-import creation fee, locked = 0; the import must fund that fee and all ordinary ledger invariants

Makechain persists its own genesis configuration commitment as an authorization commitment. It does not copy Tempo's storage layout or its counterfactual no-record convention. Address derivation, configuration preimages, owner ordering and upgrade salt still follow the pinned account reference.

4. Project transitions

Command / variant Guards beyond common checks Additional reads → writes Maximum gross creations
PROJECT_CREATE Root/ACCOUNT; derived project id absent; canonical owner/slug pair unoccupied; registered project scheme; optional origin has its own scheme's id length P, M, S(actor,slug) → ACTIVE project owned by actor, metadata, matching claim 3: P, M, S; only S is deposited
PROJECT_SET_METADATA Controller root/ACCOUNT; valid bounded metadata; new slug pair free unless unchanged; expected project mutation counter present exactly when slug changes M, old/proposed S → metadata; move claim only if slug changes; update P counter when allocating 1 successor claim; description-only update creates nothing
PROJECT_SET_STATUS Exact lifecycle revision; controller or maintainer to freeze, controller alone to unfreeze; root/ACCOUNT/PROJECT P → requested status, advanced lifecycle revision 0
ROLE_SET.Grant ACTIVE; controller for maintainer; controller/current maintainer for writer; grantee not controller; exact old grant generation or guarded absence; both old/new roles within actor's authority Target G, P → current control generation and fresh grant generation 1 grant, including replacement; discharge predecessor
ROLE_SET.Revoke Controller for any raw grant; maintainer only for writer grant; exact target generation; allowed FROZEN Target G → delete 0; discharge stored payer
TRANSFER_OFFER.Set Controller root/ACCOUNT; destination not current owner; absence + parent guard or exact old revision; bounded expiry O, P → named destination, issuing control generation, fresh revision, expiry 1 when absent or expired; 0 for live update retaining deposit
TRANSFER_OFFER.Clear Controller root/ACCOUNT; raw resident offer with exact revision, even if expired O → delete 0; discharge
TRANSFER_ACCEPT Root/ACCOUNT of named destination; exact offer revision and issuing control generation; live offer; destination slug free; exact project mutation counter; self-transfer invalid O, M, old/destination S, P → consume offer, move claim, set owner, rotate control generation, preserve status/lifecycle revision and refs 1 successor claim; discharge offer/old claim to stored payers

Project mutation-counter allocations supply fresh ref revisions, grant generations, offer revisions, and slug incarnations. Every allocation consumes then advances the counter; no child operation resets it. Parent absence guards are checked once at command entry. Controller authority comes from P.owner, never a role record. Grants issued before a transfer remain physically resident but confer no authority; neither transfer nor its event enumerates them. Their deposits remain with their payers. A grant's individual generation and its issuing control generation are different fields.

Metadata is last-write-wins under the signed authority context; there is no implicit metadata CAS. The old slug key comes from the executing M/P records. Transfer may choose a replacement slug when the old spelling is taken in the destination namespace. The acting destination pays the new claim. Project creation's origin is an assertion only and neither appends membership nor establishes a source project's endorsement. Roles, status, and transfers never confer object-retrieval rights.

5. PUSH transitions

PUSH is one account command, regardless of its number of commitment entries or ref operations. Resolve project authority and scope, require ACTIVE, and check the command-entry parent guard if any CREATE exists. All commitments and non-delete targets must match the project's fixed scheme and registered native id length. Validate signed RefNames as specified in specification section 8.3; derive digest keys locally. Do not accept an independently supplied name digest or display name as authority.

Unsigned evidence has exactly w witnesses, paired with CREATE/SET in operation order. DELETE consumes none. No surplus, missing, or reordered evidence is accepted. A SameCommand witness must index this command's commitment array, even if another command earlier in the block appended the same leaf. Location/Proof eligibility uses the executing parent's canonical window/ancestry, not a node's current retained bytes or another command's new append. Validate every target witness against Keccak256(project_id || scheme_id || native_id) under specification section 8.3.

Append commitments in array order, tentatively assigning locations after all earlier successful commands' appends. Then process refs in list order:

Operation Guard at operation position Effect Gross creations
CREATE(name,target) Ref absent; command-entry parent counter matched; target witness valid Allocate fresh revision; write target and actor-paid deposit 1
SET(name,expected_revision,target) Ref resident with matching revision; target witness valid If target differs, allocate fresh revision and replace target, retaining deposit; otherwise retain ref/revision unchanged 0
DELETE(name,expected_revision) Ref resident with matching revision Delete raw record and discharge stored payer; no target/witness 0

Repeated names are legal and their operations are sequential; delete-then-create allocates a new revision and pays a new fee/deposit. A later operation on a revision allocated earlier in the command must name that actual revision; execution never repairs signed expectations. A SET no-op still pays ordinary bytes/work and advances the command replay mark. Commitment-only and ref-only pushes are supported. Each commitment occurrence is retained, including duplicates. No scan checks ancestry, fast-forward, deduplication, object availability, or object signatures.

Failure anywhere discards all tentative appends, allocations, refunds, writes, and events. Success emits CommandFinalized, CommitmentAdded in commitment order, and RefsChanged, with bounded deposit lists from logical execution. A publication receipt exists only for a commitment array entry; ref operations alone are proven through ordinary command inclusion or current-state proofs.

6. Username transitions

Every USERNAME_CLAIM variant first rejects when resolved username_claims_paused is true. USERNAME_RELEASE is unaffected. Every row uses root or unscoped ACCOUNT capability. A resident lease guard is its full incarnation (owner_account, allocated_counter) plus revision, including post-reservation replacement. A fresh claim also binds the actor's name allocation counter. A missing N is interpreted at its initial counter base solely for this guard, and created atomically with its first mutation. No absence proof is implied; a stale service lookup loses at execution.

Common additional access set: requested U; actor N; the U named by actor N, if any, to decide whether another name resolves; the former owner's N when replacing a lease; and stored-payer ledgers when replacing. Rename may touch a source and destination U but never searches for other owned names. At most two U keys and two N keys are involved, plus at most one old-payer ledger. The actor's N creation, if required, adds one permanent gross creation to the row's bound.

Command / variant Guards Ordered effects Lease creations
USERNAME_CLAIM.Claim Requested name absent or reservation ended; no other resolving name for actor; minimum/canonical spelling, term/horizon, expected allocation counter; cooldown if selecting a different name Discharge replaced raw lease and conditionally clear old owner's matching pointer; allocate new incarnation; set resolution and reservation deadlines, actor pointer/cooldown 1
USERNAME_CLAIM.Extend Named lease currently resolves; exact incarnation/revision; paid whole-year increments fit horizon Advance revision and extend from old resolution deadline; reservation = new resolution + grace 0; preserve owner/pointer/incarnation/deposit/cooldown; actor may differ from owner
USERNAME_CLAIM.Restore Actor owns name in grace; no other resolving name; cooldown if selection differs; paid term fits horizon Retain incarnation/deposit; advance revision; set new term from now, reservation, pointer and selection metadata 0
USERNAME_CLAIM.Rename Another current name resolves; exact source and destination guards; destination eligible for Claim or owner Restore; cooldown and horizon pass Release source under rule below; then Claim/Restore destination atomically; preserve source reservation/deposit At most 1 destination creation
USERNAME_RELEASE Owner; exact incarnation/revision; name currently resolves End resolution at now; reservation = now + grace; advance revision and clear matching pointer; preserve cooldown/deposit 0

A released or naturally expired name never resolves during grace. At the reservation deadline a new owner may claim and RECLAIM may remove it. Extension is not restoration: a third party cannot re-enable a name in grace. Release already in grace is invalid and cannot extend its reservation. Rename forfeits the source's unused term; there is no credit refund. Replacing/reclaiming a lease clears the old owner's pointer only when both the name and incarnation match. Allocation counters and cooldown metadata always survive.

7. RECLAIM

RECLAIM first rejects when resolved reclaims_paused is true. It is one account command targeting exactly one stale record. The caller uses root or an unscoped key of WRITE or above; no target authority is required. Read one raw target and require its expected incarnation, plus revision for UsernameLease. Reclaim enabled under Rules and the following stale predicate are both required:

Target Additional dependency Stale predicate Writes besides target deletion/refund
DelegatedKey Target account A Expired, window end reached, or issuing epoch differs None to target account authority/counters
TransferOffer None for its time predicate Expiry reached None to P counters
ProjectRole P Issuing control generation differs None to P counters
UsernameLease Old owner's N Reservation deadline reached Clear N pointer only on name + incarnation match

All four discharge the stored amount to the stored payer. Missing target, moved incarnation, non-stale target, Ref, SlugClaim, or a permanent family is invalid. Caller pays bytes/work, receives no bounty, and cannot choose the refund recipient. The target's parent and payer are taken from the raw verified identity, not unchecked request fields. No row allocates a new record. If the target is the caller's own invalid key, it cannot authenticate this reclaim; another usable signing slot is required. Reclaim does not update the target's keychain revision.

8. System commands and block transitions

These rows incorporate the exact guards of specification sections 13, 16, and 18 by reference; this companion does not create an alternate governance, DKG, or settlement state machine.

Command / variant Guards and progress Additional reads → writes Bounded effects
IMPORT_CREDITS.Credit Settlement enabled; unpaused; prior dual deadline unexpired before authenticating evidence; pinned complete Tempo profile/identity/settlement contract/code/slot proof; certificate epoch at or above the installed source floor; strict beneficiary cumulative advance B, proved L(beneficiary) → credited frontier; checkpoint refresh only if eligible At most 1 ledger creation; first import creates the beneficiary ledger and charges its creation fee to that beneficiary; preserve spent/locked otherwise; failed import refreshes nothing
IMPORT_CREDITS.Refresh Same identity/time/pause eligibility; strictly newer certified header; no storage proof B → checkpoint only 0 creations; no ledger read/write or monetary effect
SCHEDULE_RELEASE.ACTIVATE Current governance set/revision/nonce; manifest/class/surfaces valid; correct predecessor/ruleset; pending slot empty; ordinary lead and critical epoch-start/lock constraints. Under FixedEpochZeroV1, invalid if the manifest is consensus_critical or declares any consensus-critical surface R, specifically referenced tail/entries → bounded schedule append and pending slot Entries/marker limits come from release schema and are metered; no state/history scan
SCHEDULE_RELEASE.DEFER Exact pending entry; unlocked; strictly later height; critical entry revalidated at the new epoch start. Under FixedEpochZeroV1, invalid if it names a consensus-critical pending entry; no such entry is reachable from valid fixed-profile genesis state R, pending entry → deferral entry and changed pending digest/height No activation or installer in this command
SCHEDULE_RELEASE.CANCEL Exact pending entry; before activation and before critical lock, including rejection in lock block. Under FixedEpochZeroV1, invalid if it names a consensus-critical pending entry; ordinary pending entries retain this row's rules R, pending entry → cancellation and vacated pending slot Never becomes active
SCHEDULE_RELEASE.EMERGENCY_ACTIVATE Every governance key signs; parameter/format-preserving only; non-critical; emergency lead; other applicable schedule guards R and named entries → bounded schedule append/pending slot Does not bypass predecessor or occupied-pending-slot rules
VALIDATOR_SET_SCHEDULE.Append Under FixedEpochZeroV1, invalid for every input. Under DynamicReshareV1: governance; no pending entry or carry-over; target ≥ current epoch + 3; size bounds; at most one add/remove; reserved-key and possession checks; pending release bounds Named V records, current/locked bounded sets and R → scheduled entry and key-reservation changes Participant/directory bound caps work/creations; no immediate effective-voting-set change
VALIDATOR_SET_SCHEDULE.Cancel Under FixedEpochZeroV1, invalid for every input. Under DynamicReshareV1: exact pending entry; before final block of target epoch − 2 Named V and schedule metadata → pure cancel entry No deletion of reserved-key history or reversal after lock

Governance nonce/revision checks and updates are in the governed schedule's state, never an account replay slot. The canonical schema must expose directly addressable tail, pending, and reserved-key records so these guards are point reads with bounded participants; a history search is not an implementation of validity. Schedule entry creation counts are reserved from the bounded entry shape. Root computations, DKG payloads, activation installers/markers, and epoch lock-in remain block-level effects, not extra command tags. An installer runs before commands and its marker and writes share the validity batch; resources are reserved before command selection. Every monetary frontier survives settlement anchor replacement.

In FixedEpochZeroV1, the chainspec commits the public trusted-dealer output, normal epoch-zero EpochInfo, and ordered seven-validator committee; the genesis block reproduces that public output and binds its digest. The output names those seven players with total = 7 and required = quorum<N3f1>(7) = 5. Startup requires the selected share to match that output and participant position. Every header and body, including genesis where those options occur, must encode dealer_log, dkg_outcome, and their commitments as canonical None; Some(empty) is invalid. The DKG bootstrap/orchestrator/reshare transitions do not run. This removes only DKG boundary-history retention; ordinary marshal, execution, restart, proof, exporter, and recovery retention remain unchanged.

The fixed profile's release overrides apply to every scheduling path: ordinary activation, deferral, cancellation, and emergency activation cannot introduce a consensus-critical release. EMERGENCY_ACTIVATE already rejects that class under its ordinary rules. Non-critical parameter, format-preserving, and versioned-state releases keep the normal guards and activation-height semantics in the table. A profile, epoch construction, committee, threshold output/group key, canonical-encoding, or chain-identity change is reset-class and cannot be described as non-critical.

No profile has genesis credit allocations. Every deployed devnet and qualification testnet pins a complete Tempo Moderato settlement profile; mainnet under DynamicReshareV1 pins the complete Tempo Mainnet profile. IMPORT_CREDITS.Credit always verifies a real certified Tempo header and storage proof through the production verifier; Refresh verifies a real strictly newer certified header and carries no storage proof. The selected contract is a dedicated beneficiary-cumulative immutable, non-proxy deployment on each network, leaving the existing deployment intact; its slot-zero uint256 mapping and ABI are defined in settlement interface, while deployment runtime code hashes and authentic fixtures remain external inputs. The existing global-issuance contract cannot satisfy this row. Consequently, the first funded flow is IMPORT_CREDITS.Credit, which creates the ledger, followed by INIT_ACCOUNT; a missing settlement deployment or proof blocks this flow rather than enabling a Makechain-side faucet or mint, mock proof, test-credit realm, or genesis-funded exception. Acquiring the accepted asset from a Tempo Moderato faucet and depositing it into the pinned contract still uses the normal external deposit and proof path.

All monetary fields use unsigned 256-bit Amount, exactly 32 big-endian bytes on the Makechain wire. Checked arithmetic covers fees, deposits, totals, and the conservation sum spent + locked. Credit and refresh certificates must satisfy the installed identity's from_epoch; only bootstrap or release activation replaces that floor, never a submitted proof or refresh.

9. Commonware integration and qualification

The following source contracts were checked at tag v2026.9.0 (paths relative to Commonware):

Source Required implementation behavior
glue/src/stateful/mod.rs, Application::verify/apply Fork-scoped, cancellable execution; pending on transient inability; application checks canonical current root in addition to wrapper sync-target checks
glue/src/stateful/db/current.rs, stage/expand/merkleize Deduplicate reads in the application overlay; stable staged indices; application owns command-visible writes until final merkleization
storage/src/qmdb/current/batch.rs, UnmerkleizedBatch::write Last write to a key wins; do not derive fees, gross creations, refunds, or events from the collapsed write set
storage/src/qmdb/keyless/batch.rs, merkleize One commit operation per member batch; membership operation locations include prior block commits
storage/src/bmt/mod.rs, Builder/Proof Use the library's position- and count-bound command tree and proofs; no hand-built sibling-path format

First qualification milestone: use the same rules executor through propose, verify, and apply under the deterministic runtime and real database adapters. Start without genesis credits, apply a real certified Tempo Moderato cumulative-deposit fixture through IMPORT_CREDITS.Credit, and only then run INIT_ACCOUNT and the application slice. Produce a real receipt checked by the reference verifier. Persist and restart using glue's database-set barriers and SyncPlan, including a restart with members at different durable progress points. The funded slice remains blocked until the settlement layout, code-identity policy, deployment, and captured proof exist; no synthetic substitute earns conformance credit. Broader services follow this slice.

Required scenarios, to become executable tests when code exists:

ID Scenario and required result Specification invariants
APP-01 Real Tempo credit import creates ledger → initialize → delegate → project → PUSH; identical roots/outcomes through propose/verify/apply INV-CONS-01, INV-CONS-02, INV-STATE-11, INV-SETTLE-01, INV-SETTLE-08
APP-02 Mixed CREATE/SET/DELETE; exact witness association; changed signed name or target rejected INV-CONS-06, INV-MEMBER-03
APP-03 Ref created then deleted in one block; no resident ref, but creation reservation/fee and lock/discharge retained INV-STATE-05, INV-STATE-07
APP-04 Late bad CAS after valid appends/ref changes; no leaked sequence, location, counter, money, or event INV-CONS-03, INV-STATE-11
APP-05 Two commands refund/update one payer; overlay accumulates deltas; price change refunds stored amount INV-STATE-01, INV-STATE-05
APP-06 Bulk revoke followed by delegated use fails; reauthorization fresh; old deposit unlocked once; empty bulk repeat fails INV-AUTH-07, INV-AUTH-09
APP-07 Maintainer escalation, scoped-key administration, writer unfreeze rejected; maintainer writer management/freeze accepted INV-AUTH-08, INV-STATE-09
APP-08 Transfer out/back, stale role reclaim, slug collision, consumed offer replay INV-AUTH-04, INV-STATE-08, INV-STATE-10
APP-09 Exact username deadlines; third-party extend cannot restore; release/rename cannot bypass cooldown; old-pointer cleanup safe INV-AUTH-05, INV-AUTH-10
APP-10 Expired trust/pause rejects both settlement variants; failed credit import never refreshes INV-SETTLE-01, INV-SETTLE-03, INV-SETTLE-06
APP-11 Speculative cancellation and restart preserve roots/replay/deposits across all members; events re-derived after sync gaps INV-CONS-02, INV-EVENT-01, INV-EVENT-02
APP-12 Duplicate commitments remain separate ordered publications; membership includes no per-commit current-state key INV-MEMBER-01, INV-MEMBER-02
APP-13 Empty membership block still commits once; window-edge proofs obey parent ancestry, including speculative parent INV-MEMBER-03, INV-MEMBER-06
APP-14 Installer replay/state sync and schedule cancellation at lock boundary; no duplicate installer effects INV-GOV-06, INV-GOV-09, INV-GOV-10
APP-15 Seven fixed-profile validators independently derive one chain_id, genesis hash, ordered committee, threshold-output digest and quorum; each supplied share verifies at its position INV-CONS-01, INV-CONS-07
APP-16 Fixed-profile round, proposal, vote, certificate, recovered context, or ancestry names a nonzero epoch or height outside epoch zero, or any DKG field is Some, including empty; reject before scheme use and reject the block identically in propose/verify/apply, while canonical None succeeds INV-CONS-08
APP-17 Exercise both validator-schedule variants and every critical release scheduling path under FixedEpochZeroV1, then an ordinary non-critical release; disabled variants are deterministically invalid with no effects while ordinary release checks and effects are unchanged INV-GOV-12
APP-18 With no genesis ledger, import an authentic strict-advance Moderato cumulative proof, then run INIT_ACCOUNT; global issuance, synthetic proof, wrong Tempo profile, contract/code identity, slot, beneficiary, or cumulative is rejected and failed import refreshes nothing INV-SETTLE-01, INV-SETTLE-04, INV-SETTLE-08
APP-19 Reset a fixed-profile run with a fresh incarnation, output/shares and storage; all old commands, certificates, receipts, state/inclusion proofs, and bootstrap artifacts fail the new chain/genesis binding, no old state or credit is imported, and an externally valid Tempo fact has effect only through a new-chain import that passes the new profile and normal strict-advance rules INV-CONS-07, INV-PROOF-01
APP-20 Both profiles require genesis-only epoch info and its matching header hash at height zero; reject missing or mismatched pairs and any post-genesis presence. Dynamic genesis projects to Commonware Payload::EpochInfo; fixed genesis remains separate from DKG options, which are all None INV-CONS-01, INV-CONS-07, INV-CONS-08

No test result is claimed by this table. Encoding conformance and numeric qualification remain required before implementation can be considered launch-ready.