Lane 11 PR 2: the sheet language — expressions, evaluator, dice, definitions, validator, conformance fixtures (#737) #961
Loading…
Reference in a new issue
No description provided.
Delete branch "build/lane11-2-evaluator"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Lane 11 (#737) PR 2. This is the engine every sheet is computed with (IS-405 server, IS-431, IS-425). It adds no database, no routes and no UI; nothing outside
app/sheets/imports it yet.webapp/backend/app/sheets/:expr.py: the expression language from the contract's §3.4. It is total and side-effect free.@a.b.c,[*]lists, repeat keys, androw./entry.locals.if, the math functions,lookup,rank(plus a two-argument form),has, andsum/count/any/all/min/max.%, round half away from zero, and normalised output.evaluator.py: evaluates a definition overdata/entries/resources/overrides/ext.bonus(best per type) orflat.when, repeat groups, entries with provenance and a snapshot, derived rows, resources and tracks.dice.py:NdM, keep/drop, an injectable RNG, and the individual dice kept. It's for creation and levelling only (D85).definition_model.pyanddefinition.schema.json: the Pydantic model and the published JSON Schema.validator.py: the §3.2 checks.@path/refresolves, with did-you-mean.whenormax_expr;whenparses; generators and views are well-formed.builtin/generic/: the generic character and creature (§3.6, owner answer L2).conformance/: 309 expression cases and 13 sheet cases, language-neutral, plus a README spelling out every semantic. PR 4's JavaScript evaluator runs these same files, so the two can't drift.Tests:
tests/sheets/passes: 442. That covers every conformance case, parser limits, totality over random inputs, overflow, dice with a scripted RNG, every validator check, did-you-mean, schema staleness, and the generic definitions validating clean.changelog.py checkpasses.Stacked on it (in progress): PR 3 (the server), PR 4 (the JS evaluator), and PRs 5a and 5b (the PF2e and 5e definitions).
Changelog:
changelog.d/737-lane11-evaluator.added.md.🤖 Generated with Claude Code