Ten seeds of thirty random patches through the kernel: the resolver and
apply_operations never disagree (no Invariant error), a refusal writes nothing
and repeats, and every accepted commit leaves indexes equal to scans, no
overlap standing and the grain total unchanged.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A retirement only removes lent authority, so it cannot add an overlap; the
clause changed no answer over 20000 forged lists.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
One holder with a same-kind levy over two subjects, a pressure advanced then
resolved or reduced inside one patch, and a declared subject's own affordance
granted or revoked-then-granted: each fails under its mutant
(candidate.rs targets_overlap ==, patch.rs pressure next == 0, patch.rs
!granted.is_empty()).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The conservation sum covers the union of the holders written at entry and the
holders the log reports, so a holder written before the operations and
returned to its transaction-start value (absent from changes()) still counts.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
patch_read_work_is_equal_at_100_and_1600 submits ten patch shapes through
AdmitPatch and holds their rows read equal at 100, 400 and 1600 persons. The
DischargeCommitment case that called apply_operation directly moves into it.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
resolve_patch no longer seeds fifteen maps by copying every partition. Each
candidate map is an Overlay over its committed partition (patch/candidate.rs):
reads fall through by point get, the patch's writes sit in a local map. The
scale-sensitive reads are named methods of Candidate: occupants_under,
offices_of, offices_held_by, kind_taken, import_key_held, custody, and a
running overlap set re-judged at every write to authority, offices or
retirement, which is graph_overlaps' answer because the committed world is
disjoint. The seeding block and the old scans live on only as test references
(Materialized), and the new tests hold every named read to them.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Conservation sums only the holders the transaction wrote, with before taken from
each holder's value when the operations began; disjointness judges only the
holders whose grants, offices or institutions the transaction touched, through
holder_overlaps, which overlapping_holder now also calls for the open-time
whole-world check. resource_total becomes the test-only resource_total_by_scan.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Subjects gain a ByImportKey index and the affordance catalog a ByKind index.
held_import_keys and the per-patch kind_names set are deleted: import_key_fault
takes a held predicate, and admit_resolved, resolve_patch and
verify_state_shape's open-time check ask the index (or nothing, at open).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Random bind, release, route, holding, relocate, retire, tick, speech and refused
commands over the clockwork world, reopened every 50 commits; after each, views ==
rebuild and derive_motion == scan at +1, +30 and +5000. PROVENANCE records the Soul
pass 1 fixes and the failing-dependency cost the gate does not defend.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
clockwork_commit_cost takes the median of 200 samples with ticks and speeches
interleaved instead of a 30-sample mean per kind, whose speech ratio swung 2 to 4
over runs with flat rows. open_cost (ignored, like it) reports median open times
at 200 to 3200 persons, the bulk path the per-commit gate does not reach.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
derive_motion asserts, not debug_asserts, that the six partitions the views join
have no open log, so a stale view cannot be read silently in a shipped build; the
refusal test runs in every profile.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The view scenario retires a subject bound to a route and then closes the route;
dropping the retired-dependent guard in the fold's moved-targets arm now fails
views_are_derived.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The moved-targets arm called Docs::indexed once per changed placement or route,
and indexed walks every touched key while a log is open, so genesis and every
replayed commit paid touched dependencies x changed targets. Docs::indexed_unchanged
names the committed index entries of keys the log did not change, with no log walk;
a changed dependencies key is already re-judged whole, so the fold loses nothing.
folding_a_bulk_commit_reads_rows_in_proportion_to_the_change pins it by rows read.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Release deleted the dependency row only, so a pressed dependency's pressure row
outlived it and verify_state_shape refused the world at open (export then open
failed CorruptJournal). The Release arm now clears the dependency's pressure
through set_pressure, the one pressure writer. Pre-existing at 609b3ba5e.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A dependency per person (to the previous live person), two failing on the last
place's grain, a forum per place, a Holds check on every routine, every tenth
person from the 35th retired, and the clock moved one period so every routine
is past due. The fixed-count pins on dependencies and redress go; the gate
asserts the population at scale, so a walk of dependencies, retired pledges,
holdings or forums fails it. PROVENANCE records the cut.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
views.rs owns Views { live_due, failing }, folded only by WorldState::finish
from the open change lists of commitments, subjects, dependencies, edges,
holdings and positions, before the logs close. Derived like a Docs index: not
digested, not encoded, ignored by equality, rebuilt by replay on open, never
touched by rollback. derive_motion reads it with clean logs (asserted) and no
longer walks every dependency row or visits retired subjects' dead pledges.
DueAt leaves commitments (the due question has one owner); dependencies gains
the DependsOn index the fold uses to re-judge a changed route's or placement's
dependents. The old walks live on as cfg(test) derive_motion_by_scan and
Views::rebuild; views_are_derived, view_reads_equal_reference_scans,
a_corrupted_view_is_detected and a debug refusal of an open-log read pin them.
golden.digests is byte-identical.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A pressure target fed by three sources and an institution with three
distinct incumbents (one in two offices) join the walked states, so a
projection that keeps only the first or last point of a document loses a
row the reference scans still see. indexes_are_derived now also compares
every read with its _by_scan twin, since a rebuild through P::points agrees
with a wrong projection.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
One grain holding and one known fact per person, a fact and a resource per
place, and two dependencies (a fixed count: derive_motion still walks every
dependency row, follow-up aetherlight-cross-partition-views). read_work now
asserts the partitions are populated, so a scan of knowledge, holdings or
facts grows the count and fails it. golden.digests untouched.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Delegation to the inner iterator's hint; cargo-mutants found only equivalent
mutants of it. The default hint costs nothing here.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The clockwork world now holds a route per consecutive place, a Reach::Place
channel per place, an institution with a warden office per place and two
past-due obligations, so no partition a read index serves is empty.
read_work_is_equal_at_100_and_1600 and operation_reads_are_equal_at_100_and_1600
gate the rows a commit and a set of otherwise unreached reads touch;
indexes_are_derived, index_reads_equal_reference_scans,
an_index_read_mid_transaction_sees_the_log and a_corrupted_index_is_detected
hold the index to its map and to the scans it replaced. The harness prints
rows read beside time and digests and asserts nothing. golden.digests
byte-identical.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A Docs may carry a Projection: a pure function of one document's value.
Docs::finish folds each changed key (old points out, new points in) from
the list the digest folds; Docs::indexed returns (point, key) in order,
corrected by the open log so it is true mid-transaction; rollback never
touches the index. Seven projections: DueAt, StandsAt, ChildOf, BySource,
ByEndpoint, ByController, ByIncumbent. under_place, audience Colocated,
DischargeCommitment holders, scope_components routes and controls,
delegated_authority, derive_motion's commitments and reachable's outbound
edges now read the index; each old scan is kept as a cfg(test) *_by_scan
reference. golden.digests byte-identical.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
No behaviour change. Reads of a partition go through get, contains_key,
len, is_empty, iter, keys, values, range, Index and IntoIterator, so no
reader can bypass the test-build row counter by coercing to BTreeMap.
Resolver and is_genesis parameters take &Docs. golden.digests untouched.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A live check from a Routine is put on an obligation or goal and
verify_state_shape must refuse it; the honest world is the control. Kills the
survivor of && to || on the routine-or-no-checks conjunction (shape-conjunction-survivor).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
every_partition_is_digested_undone_and_finished iterates the declaration: for
each partition one written document must be in the folded digest and agree with
the full recompute, be put back by rollback (state, bytes, logs), and leave the
logs empty and the accumulator at the full recompute on finish; a partition no
fixture world populates fails loudly. a_failed_apply_rolls_back now runs a tick
that rolls routines, a tick that writes pressure rows (the old tick wrote none,
contrary to its doc), a speech and a forget, each under the revision overflow
and under an injected failure after the digest is folded and the commit sealed
(test-only thread-local seam in submit). Addresses table-rows-undefended.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
TickMinutes was serde(transparent): a stored zero-minute tick (or a span above
MAX_ROUTE_COST, which submit cannot build) decoded, and replay's clock clause
alone judged it. The type now decodes through TryFrom<u32> (1..=MAX_ROUTE_COST),
so a command, a routine period or a stored tick outside the bound cannot be read.
With that the clock clause in verify_history is unreachable (only TimeAdvanced
writes the clock, and a tick's span is at least one minute), so it is deleted
rather than defended; so is the period clause in verify_state_shape. Tests:
bounds at decode, and an export whose tick span is rewritten to 0 or over the
bound does not open. Addresses clock-clause-not-redundant.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A v1 export is well-formed, so it is not corruption: open now returns
UnsupportedSchema{found, supported} from the one schema judge, asked of every
commit before its other fields are believed, instead of CorruptJournal at
genesis. The test asserts the version in the error for a v1 chain and a later
commit of another generation. Addresses v1-refusal-unnamed.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The WorldState partition fields, the table begin/folded/finish/rollback and the
test oracle walk, and the empty world all come from one world_state! row list.
A partition cannot be a field without being in the digest and under the undo
log, and a field added to the generated struct without a row fails to compile
(missing field in with_header). Addresses partition-table-second-authority.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
An unchanged touched document costs no digest, begin refuses an open log, known_by is the knowledge
partition read the other way, each arm of the knowledge shape check and of the committed-command
target check is judged alone, the replay future check reads only touched new keys, and document keys
are canonical text.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Incremental digest equals a full recompute at every revision of the golden
session and across a removal; LtHash16 add then subtract returns to zero in any
order and wraps; digest work per tick and per speech is equal at 100 and 1600
persons and equals Added + Removed + 2 x Updated; a failed apply rolls every
partition back; a v1 commit chain is refused. The clockwork harness takes
period N/2 and prints digests per submit beside the times. PROVENANCE records
the cut.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The world digest is now a homomorphic set hash over per-document digests
(sha256 of schema, key and the named encoding of the value), updated by the
documents a commit changed, sealed with the revision. WorldState is no longer
an encoded value and loses Serialize; events live once, in the Acted commit
that applied them, and snapshot folds minted_at and last_acted_at over the
journal; knowledge is one document per (subject, fact). Schemas become
world_state.v2 and world_commit.v2, so every digest and the export hash move
and golden.digests is regenerated. verify_state_shape no longer judges events:
replay re-derives each through action::exercise.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Docs and Tracked<WorldHeader> record the first-touch value of every written
key. submit applies to the live state between begin and finish and rolls back
on any error, so the world is no longer cloned per commit; replay reads the
commitments subjects finish() reports instead of cloning the partition.
The encoding is unchanged: golden.digests is byte-identical.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A stored digest flipped without re-sealing, and each genesis clause rewritten
and re-sealed on a lone genesis, are now refused by tests that only that clause
can satisfy. The golden session declares a two-band toss and uses it three
times, so band selection is pinned (golden.digests regenerated). The
BandPreimage doc no longer claims the payload cannot reach the draw; WorldId
byte-equality, and truncation or rollback of an export, are documented as host
contracts in the code and PROVENANCE.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Mutants that survived the first pass: dropping the genesis world-id check,
dropping the resulting-revision contiguity check, and a ghostlight commit schema
check (the old fixture left the next commit's previous digest stale, so the
chain refused it for the wrong reason). Each now has a test that fails without
the rule; all eleven named mutants are killed.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
fixtures/golden.digests pins every committed revision's state and commit digest
and the export digest for one scripted session: speech (Told), a display, a
routine placed and rolled by a thirty-minute tick, and a refused convene. The
round-trip test reopens the export and checks the next command gives equal
receipts on both worlds. clockwork_commit_cost is an ignored harness that
prints mean tick and speech submit times at 100, 400 and 1600 persons.
PROVENANCE.md records the id, journal and dependency changes.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The redb store, the state row, health and ownership checks, verify_append and
the retry paths are gone. WorldJournal holds the commits in revision order;
export() writes { schema: aetherlight.journal.v1, commits } as canonical named
messagepack and open(bytes) decodes canonically and replays through
verify_history, which now reads the slice and returns the head state it
derives. A genesis commit must carry WorldId::of(creation id). chrono,
cultcache-rs and tempfile leave the manifest; uuid v4 is dev-only. Tests build
worlds in memory and reopen from export(); forgery tests build exports.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A command is named by sha256 over world, expected revision, caller and body;
a creation by its own bytes; a world by its creation. The id fields, the
random CommandId::new / WorldId::issue and WorldCommit.committed_at are gone,
so equal commands commit equal bytes. Retry identity goes with them:
SubmitReceipt collapses into CommitReceipt and a resubmitted command is a
RevisionMismatch. Schemas are aetherlight.world_state.v1 and
aetherlight.world_commit.v1; ghostlight rows stay refused.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ControllerAssignment, ControllerId/Mode, NewController, DecisionScope,
SubjectDeclaration.controller, UnadmittedController, validate_assignment and
the snapshot controller fields go. admits_human becomes is_genesis. The
fixture lookup is by label. The channel controller is untouched.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
SubjectState.retired is the one stored statement; is_retired reads it. The
Retire arm sets it; affordance_grants is keyed by SubjectId. Controllers still
compiled; removed in the next commit.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A non-Play caller's broken patch and ungranted act are Unauthorized, so dropping
require_play from reduce fails a test (it was not equivalent: the refusal would
leak world structure). A forged empty or padded stored title is Corrupt.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Records what went (with f51275c61 locations), the born-Active genesis and the
one gate; restates the AL2b-1 residue as what AL2b-2b still owns and drops the
leave-set bullets and the valid_until obligation this cut deleted.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
after_genesis_only_play_writes, apply_effect_re_decides_play,
a_world_is_born_active, retired_tags_do_not_decode,
a_revoke_may_leave_a_subject_with_no_verbs, a_subject_may_be_declared_with_no_verbs,
a_retired_subject_takes_no_grant, apply_refuses_a_grant_to_a_retired_subject,
retire_applies_to_every_subject. Deletes CommandId::derived (its only caller was
ConsumerId::of_name) and restates comments that named deleted lanes.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
CallerId is { Principal, Play }; one require_play gate at the top of reduce and
apply_effect replaces the capability table, the owner's post-genesis doors and
the Clock capability. The consumer lane (ConsumerId, PatchGround, mirrors,
confine_to_ground, operation_ground), the draft phase and approvals,
VerifiedPrincipalEvidence, the dead intents and the never-mute and Retire-side
refusals are deleted. GrantsOutsideControl becomes GrantsToRetired; a grant row
exists iff the subject holds a verb. require_ruler is genesis-only
(forbid_rulings_at_genesis). Schema consumer.v9. Tests of deleted lanes are
deleted, the rest go through submit_play.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>