GoalCell
One numeric target the deterministic goal gate checks. Field-for-field the contract ``evaluate_goal_gate`` already reads (``apps/api/src/wss/authoring/goal_gate.py``) — this model exists to make that contract authorable over HTTP, NOT to restate it. Two details are load-bearing and easy to get wrong: * ``tolerance_pct`` is in PERCENT units: ``0.5`` means 0.5%, not 0.5. * declaring NEITHER tolerance means exact-to-the-penny, which the gate enforces with its own epsilon. That is a real choice, so it is allowed. ``tolerance_abs`` wins when both are given — the same precedence the gate applies, kept here so the API cannot promise something the gate ignores. ``extra="forbid"`` belongs HERE, not only on the enclosing payload: a misspelled ``tolerence_abs`` inside a cell is otherwise dropped in silence and the cell falls back to exact-to-the-penny, so the author's declared tolerance vanishes without an error. Caught doing exactly that during the E2E for this change (PATCH returned 200 and persisted a tolerance-free cell), which is the "never silently widened" guardrail failing closed in the wrong direction.
| Field | Type | Description |
|---|---|---|
keyrequired | string | Stable cell identifier |
pathrequired | string | Dotted path resolved as <step_id>.<field>[.<sub>…] — the FIRST segment is the step id, not a field. 'vat_reconciliation.control_balance' means field control_balance of step vat_reconciliation. Getting this wrong yields got=None and delta=None rather than an error, so the cell simply never passes. |
expectedrequired | number | The gold value this cell must reproduce |
tolerance_abs | number | null | Absolute tolerance. Takes precedence over tolerance_pct. |
tolerance_pct | number | null | Tolerance in PERCENT units (0.5 means 0.5%) |