3. Read AND and OR gates
A dependency gate describes links added by the author between records already in the case:
-
all_of(AND): every member is presented as a prerequisite of the target. -
any_of(OR): the members are presented as alternative supports.
Slean checks the shape, IDs, prior existence, and visibility of these links. The gate does not calculate whether the members are true, sufficient, or scientifically persuasive.
From the repository root, validate the synthetic schema 0.3.0 case:
lake build lake exe slean validate examples/dependency-gates.json
The second command prints exactly:
{"case_id":"synthetic-decision-1","events":13,"ok":true}
Here ok: true confirms that both gates are admissible records with references available at the right time; it does not evaluate AND or OR. In this case, event-12 adds gate-all-1: protocol-1 AND assessment-1 are recorded prerequisites for decision-1. event-13 adds gate-any-1: observation-1 OR observation-2 are recorded alternative supports for claim-1. Both events follow the decision at event-7; they do not retroactively change its assessment.
See when each gate appears
for n in 11 12 13; do
lake exe slean replay examples/dependency-gates.json "$n" |
python3 -c 'import json,sys; print(len(json.load(sys.stdin)["dependency_gates"]))'
done
The exact output is 0, then 1, then 2 on separate lines. A prefix is the number of events from the beginning of the journal included in a replay. Prefix 11 ends before the gates; 12 includes AND; 13 includes both AND and OR. lake exe slean view examples/dependency-gates.json agent exposes their operators, members, and targets under dependency_gates.
To inspect those same prefixes in the local Explorer:
python3 explorer/render.py examples/dependency-gates.json --output explorer/_out/gates python3 -m http.server 8768 --directory explorer/_out/gates
Open http://127.0.0.1:8768/, then select events 11, 12, and 13. The keyboard-readable list, exact selected event, and 2D map come from the same validated journal. The map repeats recorded links; it does not prove their truth.
Keep unknown distinct from zero
Compare the two agent views:
lake exe slean view examples/dependency-gates-unknown.json agent lake exe slean view examples/dependency-gates-zero.json agent
In the first case, the first observation has status: "unknown", value: null, and the earlier decision is defer; its assessment is undetermined. In the second, it has status: "measured", value: "0", and the decision is reject; its assessment is fail. Both cases have the same AND/OR gates and a later positive second observation. The OR gate therefore turns neither missing data into zero nor the earlier decision into promote.