Skip to content

onlyworlds 0.24.0

Choose a tag to compare

@github-actions github-actions released this 22 Oct 12:57
· 500 commits to main since this release
  • The doctor reads a world's house rules (flag 11; the checks profile, schema-dist profiles/checks.md, dist.47). A Law with supertype Charter may carry x_checks_rules, a list of rules; each element a rule finds short is a finding with the rule's sentence as its reason and the charter, the rule's index and its field as evidence, and --packet takes those findings like any other. A rule the reader cannot apply is a finding on the charter that names the rule and why; a key that is not a list is one finding on the charter; a charter without the key checks nothing and says so. compared["11"] carries every rule's scoped and short counts and the view read (folder, or the key's role). Both doors, folder and API. A known-of stub is not judged, since its absent fields are unknown. Rules on a charter that is not a Law are a finding, not read: the profile puts them on the Law only. The ids 9 and 10 stay the file-side flags.
  • onlyworlds.apply_checks(rules, elements, *, fields=None) is the reader the doctor uses: one CheckRow per rule (index, rule, field, scoped, short as {type, id, name}, not_checked), in the list's order. where folds as is_room_element folds the room pairs (Unicode White_Space trimmed, simple case folding), and an empty string matches an empty or absent value. A rule is reported not checked, never passed and never raised, for a predicate outside the four, more than one predicate, a type the pinned schema does not name, a field a scoped type lacks that is not an extension key, links_min on a field that is not a link, a malformed rule, or a pattern refused. A pattern is refused when it is longer than PATTERN_CAP (400), outside the subset Python and JavaScript share (lookbehind, a named group, an inline flag other than a leading (?i) or (?m)), or when Python's re will not compile it. It never writes, reorders or repairs the list.
  • Tests: the dist's checks.fixture.json replayed from the vendored file, every case's verdict (13 cases, 32 expectations, 0 misses) and every not_checked row's reason-or-none (8 rows, 0 misses). Also a world's three rules on a folder, through the API, in prose, in --json and in --packet; the key read from elements/law/<charter>.json, the folder unchanged; a charter without the key; an empty list; a key that is not a list; a fifth predicate; a known-of stub; rules on a Construct charter; present, links_min, where.type as a list, and the regex subset. All were watched red before the reader and the flag existed.