Skip to content

rulec v0.21.0

Choose a tag to compare

@github-actions github-actions released this 26 Sep 05:28
· 12 commits to main since this release

Rules that passed and now fail

Each of these was read as something other than what was written, or passed the check and then failed in the generated code. A rule that now fails with one of them was being misread.

Code What it stops
E058 A declaration line that cannot be read: a define, derive, result, enum, group or table with no name, or with something before its =. A table with no name was read as an anonymous one, and its generated code lost the scale of its output — an answer a thousand times too large. A rule line with no name passed as a rule with nothing in it.
E059 An expression that cannot be read to its end. amount tax (an operator left out) and amount -100円 (a sign touching the digits) were both read as amount.
E060 A step or a rounding grid of zero or less. round up(0円) divided by zero in the generated code, and rate[step 0%] was read as a step of one. A rounding call whose grid is a name is now E118.
E061 A range with no value in it (range >=10円 <=0円).
E062 A date that does not exist (2026-01-99).
E063 A cell that cannot be read. Words after a comparison (<=0円 + false) or after a value (a b) were dropped, and a cell that could not be read at all moved every cell after it one column to the left.
E064 A row that does not fit its header. A row whose closing | was left off lost its last cell, and a row one cell short was read as it stood.
E019 Now also an example whose value lies outside the declared range, an input the generated code refuses at its door.

Fixed

  • A malformed derive line no longer makes rulec check run for ever (in the playground, typing one froze the page), and ÷ 0 and a where with nothing to compare no longer panic.
  • A one-letter flag is refused before anything is done. rulec gen x.rule -o out used to write into generated/ first, and rulec fmt x.rule -c rewrote the file it was asked to look at. -h is --help, and a misspelled flag is answered with the one it was most likely meant to be.
  • JSON nested deeper than 256 levels is refused instead of running the process out of stack.

Added

  • rulec mcp --timeout <seconds>, 600 by default. A tool call that runs past it is stopped together with what it started, answered as failed, and the server goes on to the next call. Any exit other than 0 and 1 is now reported as an error.
  • The certificate carries "v":1. Both re-checkers — tools/recheck.py and the Lean program in proofs/ — refuse a version they were not written for.
  • Compatibility (日本語): what every 1.x release will keep, and what it may still change.

Changed

  • E115 is titled "The divisor is not a positive constant". Zero, negative numbers and fractions were already refused under it, as "Cannot divide by a variable".
  • The ledger has 109 diagnostic codes, up from 102.

One static binary per platform, no runtime. Verify an archive against SHA256SUMS before running it; the install page says how.