*Continent · 2 territory* ## Summary Two documents describe how a rulebook that cannot be used gets refused: the specification says compiling, validating and checking a rulebook throw a DomainRulesError on configuration that cannot make a valid rulebook and on a rulebook of another format, while validateRulebook returns problems instead of throwing, and the changelog says the evaluators give a decision-shaped BLOCK, never a throw, while the check and the backtest give a DomainRulesError. ## Explanation - The specification says compileDomain, validateRule, validatePlanRule and checkRulebook, when given an input rather than a compiled rulebook, throw a DomainRulesError on configuration that cannot make a valid rulebook, and that checkRulebook and backtest throw a DomainRulesError on a rulebook of another format, while validateRulebook returns problems instead of throwing. - compileDomain, validateRule, validatePlanRule and checkRulebook(input) (when given an input rather than a compiled rulebook) throw DomainRulesError on configur… - The changelog says the evaluators give a decision-shaped BLOCK with the rule's id and the rulebook version, never a throw, while the check and the backtest give a DomainRulesError. - The evaluators give a decision-shaped BLOCK with ruleId rulebook_version (never a throw), while the check and the backtest give a DomainRulesError. - Both documents describe refusal of a rulebook that cannot be used, and they differ on what the evaluators do: the specification has compiling and checking throw, the changelog has evaluating return a BLOCK. - compileDomain, validateRule, validatePlanRule and checkRulebook(input) (when given an input rather than a compiled rulebook) throw DomainRulesError on configur… - The evaluators give a decision-shaped BLOCK with ruleId rulebook_version (never a throw), while the check and the backtest give a DomainRulesError. ## Threads - The specification's refusal rules: which functions throw a DomainRulesError and which return problems. - compileDomain, validateRule, validatePlanRule and checkRulebook(input) (when given an input rather than a compiled rulebook) throw DomainRulesError on configur… - The changelog's note that the evaluators return a BLOCK with the rule's id and rulebook version, never a throw. - The evaluators give a decision-shaped BLOCK with ruleId rulebook_version (never a throw), while the check and the backtest give a DomainRulesError. ## Two sides The specification has compiling and checking throw a DomainRulesError, while the changelog has the evaluators return a decision-shaped BLOCK and never throw. - One side - compileDomain, validateRule, validatePlanRule and checkRulebook(input) (when given an input rather than a compiled rulebook) throw DomainRulesError on configur… - The other side - The evaluators give a decision-shaped BLOCK with ruleId rulebook_version (never a throw), while the check and the backtest give a DomainRulesError. ## Consultant **Where it shows up** — Refusal of a rulebook that cannot be used keeps coming up: the specification has compileDomain, validateRule, validatePlanRule and checkRulebook throw a DomainRulesError, and the changelog has the evaluators return a BLOCK with the rule's id and the rulebook version. **A question to sit with** — When a rulebook cannot be used, which door should speak first — the one that throws, or the one that returns a BLOCK? ## Ideas - Evaluation functions should answer with a BLOCK decision instead of throwing when the input is malformed. - Validation should return problems rather than throw, so a bad rulebook is reported instead of refused outright. ## Territories - [[Bevia/World/Territories/Refusing unusable rulebooks- throws versus BLOCK|Refusing unusable rulebooks: throws versus BLOCK]] - [[Bevia/World/Territories/Evaluator rulebook decisions and DomainRulesError|Evaluator rulebook decisions and DomainRulesError]]