*Worldview · 2 continents*
## Summary
What does a rulebook's conformance loop require of an implementation, and what does comparing two rulebooks report?
## Explanation
- In README.md, dated Oct 19, 2026, a backtest expectation is stated: backtest(rulebook, events, options) must equal the report exactly (SPEC.md § 13).
- For a backtest expectation backtest(rulebook, events, options) must equal this report exactly (SPEC.md § 13).
- In the same README.md, a comparison expectation is stated: compareBacktests(backtest(rulebook, …), backtest(proposed, …)) must equal the comparison exactly.
- For a comparison expectation compareBacktests(backtest(rulebook, …), backtest(proposed, …)) must equal this exactly.
- For a findings expectation, the loop compares the sorted output of project(check(rulebook)) with the sorted case.expect.findings, asserts both ruleIds of each finding with a witness are in matches(rulebook, witness), and asserts that set(matches(rulebook, witness)) equals set(witnessMatches) for each expected finding with a witness.
- For a findings expectation the loop compares sort(project(check(rulebook))) with sort(case.expect.findings), asserts both ruleIds of each finding with a witnes…
- For a backtest expectation, the loop asserts backtest(rulebook, case.events, case.options) equals expect.backtest.
- For a backtest expectation the loop asserts backtest(rulebook, case.events, case.options) equals expect.backtest.
- For a comparison expectation, the loop asserts compareBacktests(backtest(rulebook, case.events, case.options), backtest(case.proposed, case.events, case.options)) equals expect.comparison.
- For a comparison expectation the loop asserts compareBacktests(backtest(rulebook, case.events, case.options), backtest(case.proposed, case.events, case.options…
- The robot-domain-rules changelog states that compareBacktests(baseline, proposed) sets a current rulebook against a proposed one on the same log, with newly blocked, newly allowed, other changes, and each rule's decided count before and after.
- compareBacktests(baseline, proposed) sets a current rulebook against a proposed one on the same log: newly blocked, newly allowed, other changes, and each rule…
- The README states that compareBacktests says what a proposed rulebook would change.
- `compareBacktests` says what a proposed rulebook would change.
- For a plan expectation the implementation must call evaluatePlan(rulebook, plan) and match as below, and for a verifiedPlan expectation it must call verifyAndEvaluatePlan(rulebook, plan), the same for every step's facts and the initial facts.
- For a plan expectation the implementation must call evaluatePlan(rulebook, plan) and match as below.
- For a verifiedPlan expectation the implementation must call verifyAndEvaluatePlan(rulebook, plan) (the same, for every step's facts and the initial facts) and…
- evaluatePlan takes a /1 rulebook and a /1 plan carrying a principal, a participant, optional delegation, steps with tool, scope, args, facts and note, initialFacts, optional history, clock, startTime, stepDurationSeconds, now and consumedApprovals.
- evaluatePlan takes a /1 rulebook and a /1 plan { principal, participant, delegation?, steps: [{ tool, scope?, args?, facts?, note? }], initialFacts, history?,…
- evaluatePlan evaluates a whole plan in which a planner proposes participant, steps, initialFacts, history, clock, startTime and stepDurationSeconds, deciding each step with the single-action evaluator on facts projected from the earlier steps' declared effects.
- evaluatePlan(rulebook, plan) evaluates a whole plan in which a planner proposes participant, steps, initialFacts, history, clock, startTime and stepDurationSec…
- For a decision expectation the loop compares project(evaluate(rulebook, case.request)) with case.expect.decision, and for a verifiedDecision expectation it compares project(verifyAndEvaluate(rulebook, case.request)) with case.expect.verifiedDecision.
- For a decision expectation the loop compares project(evaluate(rulebook, case.request)) with case.expect.decision.
- For a verifiedDecision expectation the loop compares project(verifyAndEvaluate(rulebook, case.request)) with case.expect.verifiedDecision.
- For a plan expectation the loop compares project(evaluatePlan(rulebook, case.plan)) with case.expect.plan, and for a verifiedPlan expectation it compares project(verifyAndEvaluatePlan(rulebook, case.plan)) with case.expect.verifiedPlan.
- For a plan expectation the loop compares project(evaluatePlan(rulebook, case.plan)) with case.expect.plan.
- For a verifiedPlan expectation the loop compares project(verifyAndEvaluatePlan(rulebook, case.plan)) with case.expect.verifiedPlan.
- No document records a comparison actually run, so no outcome of any proposed rulebook change is stated.
- `compareBacktests` says what a proposed rulebook would change.
- compareBacktests(baseline, proposed) sets a current rulebook against a proposed one on the same log: newly blocked, newly allowed, other changes, and each rule…
- For a backtest expectation backtest(rulebook, events, options) must equal this report exactly (SPEC.md § 13).
- For a comparison expectation compareBacktests(backtest(rulebook, …), backtest(proposed, …)) must equal this exactly.
- For a findings expectation the loop compares sort(project(check(rulebook))) with sort(case.expect.findings), asserts both ruleIds of each finding with a witnes…
- …and 2 more
- The README does not say what the matching looks like or what an implementation should do when a plan expectation does not match.
- For a plan expectation the implementation must call evaluatePlan(rulebook, plan) and match as below.
- For a verifiedPlan expectation the implementation must call verifyAndEvaluatePlan(rulebook, plan) (the same, for every step's facts and the initial facts) and…
- One question these readings may be pursuing together is whether the same conformance loop that pins exact outputs for backtests and comparisons also pins the step-by-step evaluation of plans and decisions, so that every expectation kind is checked by one uniform matching discipline.
- [[Bevia/World/Continents/Backtest and comparison conformance expectations|Backtest and comparison conformance expectations]]
- [[Bevia/World/Continents/Plan and verified-plan expectation calls in the conformance loop|Plan and verified-plan expectation calls in the conformance loop]]
## Two sides
The comparison and backtest expectations are stated as exact-output checks, while the plan and decision expectations route through evaluators whose matching behavior the README leaves unspecified.
- One side
- [[Bevia/World/Continents/Backtest and comparison conformance expectations|Backtest and comparison conformance expectations]]
- The other side
- [[Bevia/World/Continents/Plan and verified-plan expectation calls in the conformance loop|Plan and verified-plan expectation calls in the conformance loop]]
## Continents
- [[Bevia/World/Continents/Backtest and comparison conformance expectations|Backtest and comparison conformance expectations]]
- [[Bevia/World/Continents/Plan and verified-plan expectation calls in the conformance loop|Plan and verified-plan expectation calls in the conformance loop]]