Repository navigation
v0.0.1
A PREVIEW, NOT AN ENGINE. It computes nothing. Published so a tool layer
(Prism's doMath) can depend on the frozen contract from Packagist while the
real evaluator is built. StubEngine returns schema-valid output in which every
result is #N/A with a "stub" detail and the engine string is
fancy-formula 0.0.0-stub. Never price, total or report anything with this
version. The first real evaluator is 0.1.0.
This is phase P0: the contract and the oracle, with no evaluator.
Fixed
- The capture workbook is rebuilt with holy-sheet 2.11.3, and the dev
requirement is now^2.11.3. The first build wrote each row's cells in
column-letter order (A, AA, ..., B), and Google Sheets silently dropped 184
of its input cells on import, so the first capture computed over blanks and
was refused. Same cases and ids; only the workbook bytes and its digest in
request.jsonchanged.
Added
SPEC.md, spec version 1: grammar, value model, coercion, floating-point
policy, dates, input types and constraints, results, stable codes, trace,
security and limits. Every Google Sheets behaviour not yet verified is marked
as a hypothesis (H-01 to H-35) and names the capture rows that decide it.schema/request.schema.json,check-report.schema.json,
evaluation.schema.jsonandtrace.schema.json, each with examples that the
test suite validates. These are the contract Prism's doMath builds against.
The request schema refuses a clock, seed or provider, and any limit above its
hard ceiling.FancyFormula\FormulaErrorwith the stable codes, held by a test to the same
sets as the schemas and SPEC.md.FancyFormula\StubEngine: schema-validcheck()/evaluate()output that
computes nothing (every result is#N/Awith a "stub" detail, engine
fancy-formula 0.0.0-stub), plusStubEngine::example()for the schemas'
refusal and abort shapes.- The capture workbook v1 (
capture/v1/capture-v1.xlsx, 689 rows, every
formula written with no cached value) and itsrequest.json, built by
scripts/build-capture-workbook.phpwith holy-sheet. Not yet captured. - Dev dependency
particle-academy/holy-sheet(first party) for the capture
generator. No runtime dependencies. - Three ADDITIVE request-schema rules from MOIC's real pricing model
(2026-10-28). Every document the schemas accepted before still validates, and
no stable code was added. A host needs to do nothing unless it wants the
new rules.constraints.requiredWhen: {input, oneOf}on every input type: required
only when another input's supplied value is one ofoneOf. An absent
controller never triggers it. Noequalssugar; the schema refuses it.
Violations carryrule: "requiredWhen"andwhen: {input, value}.constraints.columnConstraintson range and table inputs: per-column
required,integer,min,max,oneOfand
oneOfColumn: {input?, column, where?: {column, oneOf}}, keyed by a
1-based index or a header text. Types stay incolumns, ordering and
uniqueness inkey. Violations carryrule: "column.*",row,column
andheader.- Array outputs:
outputs.<binding> = {type: "array", columns, maxRows?, currency?}.
The result is a{t: "array"}value with nodisplay. P1 refuses an array
output atcheck()withFORMULA_TYPE; P2 produces it. A scalar output
that receives a multi-cell array gets a#REF!value (SPEC.md 9.3). StubEnginereturns one row of stub#N/Acells, one per declared
column, for an array output.
- Violation order and caps for
FORMULA_INPUT_CONSTRAINTrefusals (SPEC.md
8.2.3, agreed with MOIC and Prism). One total order on values: input binding
by UTF-8 bytes (not declaration order, which JSON does not carry), then row,
column, a fixed rule rank, header and canonical JSON. At most 100 violations
per input and 500 per request. New refusal memberstruncatedViolations
(input -> how many of its violations were not reported) and
truncatedByRequestCap(how many the 500 cap cut);violationsnow has
maxItems: 500.FancyFormula\Violations::refusal()is the reference
implementation. A host needs to do nothing unless it relied on the order
ofviolations, which was unspecified until now. The evaluation schema's
own example was reordered to the canonical order.