aetherlight: the read-work gate, the gate world and the index oracles
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>
This commit is contained in:
parent
edeea42f5e
commit
3aeea1749d
5 changed files with 584 additions and 26 deletions
|
|
@ -2752,6 +2752,30 @@ fn audience(state: &WorldState, actor: SubjectId, of: &Audience) -> BTreeSet<Sub
|
|||
}
|
||||
}
|
||||
|
||||
/// What `audience` was before the index: every position compared with the
|
||||
/// actor's, and `under_place_by_scan` for a channel's place. The index read
|
||||
/// must equal it.
|
||||
#[cfg(test)]
|
||||
fn audience_by_scan(state: &WorldState, actor: SubjectId, of: &Audience) -> BTreeSet<SubjectId> {
|
||||
match of {
|
||||
Audience::Colocated => {
|
||||
let Some(here) = state.positions.get(&actor).copied() else {
|
||||
return BTreeSet::new();
|
||||
};
|
||||
state
|
||||
.positions
|
||||
.iter()
|
||||
.filter(|(_, position)| **position == here)
|
||||
.map(|(subject_id, _)| *subject_id)
|
||||
.collect()
|
||||
}
|
||||
Audience::Channel(channel) => match state.channels.get(channel).map(|record| &record.reach) {
|
||||
Some(Reach::Place(root)) => under_place_by_scan(state, *root),
|
||||
_ => audience(state, actor, of),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/// Whether an actor may broadcast into an audience: either the actor stands
|
||||
/// inside the declared reach, or — for a channel — the actor is that
|
||||
/// channel's controller. The controller's privilege is narrow: it lets the
|
||||
|
|
|
|||
Loading…
Reference in a new issue