Implement reviewed F01/D01 foundations without changing active trading runtimes. Validate strict Rust/TypeScript financial wire contracts, decimal postings, versioned datasets, explicit calendars, provenance, and v1 compatibility.
299 lines
11 KiB
JSON
299 lines
11 KiB
JSON
{
|
||
"schemaVersion": 1,
|
||
"grammar": "^-?(0|[1-9][0-9]*)(\\.[0-9]{1,8})?$",
|
||
"range": "[-792281625142643375935.43950335, 792281625142643375935.43950335]",
|
||
"canonical": "Exactly eight fractional digits; signed zero becomes zero. External excess precision rejects, including trailing zeroes. No exponent, whitespace, plus, leading zeroes or numeric coercion.",
|
||
"cases": [
|
||
{
|
||
"id": "integer",
|
||
"owningTask": "F01",
|
||
"assumptions": "Strict external posting string; no computation.",
|
||
"handCalculation": "Pad to eight places without changing value; normalize signed zero.",
|
||
"input": "3",
|
||
"canonical": "3.00000000"
|
||
},
|
||
{
|
||
"id": "fraction",
|
||
"owningTask": "F01",
|
||
"assumptions": "Strict external posting string; no computation.",
|
||
"handCalculation": "Pad to eight places without changing value; normalize signed zero.",
|
||
"input": "-1.25",
|
||
"canonical": "-1.25000000"
|
||
},
|
||
{
|
||
"id": "negative_zero",
|
||
"owningTask": "F01",
|
||
"assumptions": "Strict external posting string; no computation.",
|
||
"handCalculation": "Pad to eight places without changing value; normalize signed zero.",
|
||
"input": "-0.00000000",
|
||
"canonical": "0.00000000"
|
||
},
|
||
{
|
||
"id": "maximum",
|
||
"owningTask": "F01",
|
||
"assumptions": "Strict external posting string; no computation.",
|
||
"handCalculation": "Pad to eight places without changing value; normalize signed zero.",
|
||
"input": "792281625142643375935.43950335",
|
||
"canonical": "792281625142643375935.43950335"
|
||
},
|
||
{
|
||
"id": "minimum",
|
||
"owningTask": "F01",
|
||
"assumptions": "Strict external posting string; no computation.",
|
||
"handCalculation": "Pad to eight places without changing value; normalize signed zero.",
|
||
"input": "-792281625142643375935.43950335",
|
||
"canonical": "-792281625142643375935.43950335"
|
||
},
|
||
{
|
||
"id": "near_max_padding",
|
||
"owningTask": "F01",
|
||
"assumptions": "Strict external posting string; no computation.",
|
||
"handCalculation": "Pad to eight places without changing value; normalize signed zero.",
|
||
"input": "792281625142643375935.4",
|
||
"canonical": "792281625142643375935.40000000"
|
||
},
|
||
{
|
||
"id": "invalid_0",
|
||
"owningTask": "F01",
|
||
"assumptions": "Strict decimal-string ingress only.",
|
||
"handCalculation": "Reject unsupported syntax/type/precision or fixed-eight coefficient overflow; do not round.",
|
||
"input": "1e2",
|
||
"canonical": null
|
||
},
|
||
{
|
||
"id": "invalid_1",
|
||
"owningTask": "F01",
|
||
"assumptions": "Strict decimal-string ingress only.",
|
||
"handCalculation": "Reject unsupported syntax/type/precision or fixed-eight coefficient overflow; do not round.",
|
||
"input": "1E2",
|
||
"canonical": null
|
||
},
|
||
{
|
||
"id": "invalid_2",
|
||
"owningTask": "F01",
|
||
"assumptions": "Strict decimal-string ingress only.",
|
||
"handCalculation": "Reject unsupported syntax/type/precision or fixed-eight coefficient overflow; do not round.",
|
||
"input": "+1",
|
||
"canonical": null
|
||
},
|
||
{
|
||
"id": "invalid_3",
|
||
"owningTask": "F01",
|
||
"assumptions": "Strict decimal-string ingress only.",
|
||
"handCalculation": "Reject unsupported syntax/type/precision or fixed-eight coefficient overflow; do not round.",
|
||
"input": " 1",
|
||
"canonical": null
|
||
},
|
||
{
|
||
"id": "invalid_4",
|
||
"owningTask": "F01",
|
||
"assumptions": "Strict decimal-string ingress only.",
|
||
"handCalculation": "Reject unsupported syntax/type/precision or fixed-eight coefficient overflow; do not round.",
|
||
"input": "1 ",
|
||
"canonical": null
|
||
},
|
||
{
|
||
"id": "invalid_5",
|
||
"owningTask": "F01",
|
||
"assumptions": "Strict decimal-string ingress only.",
|
||
"handCalculation": "Reject unsupported syntax/type/precision or fixed-eight coefficient overflow; do not round.",
|
||
"input": "01",
|
||
"canonical": null
|
||
},
|
||
{
|
||
"id": "invalid_6",
|
||
"owningTask": "F01",
|
||
"assumptions": "Strict decimal-string ingress only.",
|
||
"handCalculation": "Reject unsupported syntax/type/precision or fixed-eight coefficient overflow; do not round.",
|
||
"input": "1.",
|
||
"canonical": null
|
||
},
|
||
{
|
||
"id": "invalid_7",
|
||
"owningTask": "F01",
|
||
"assumptions": "Strict decimal-string ingress only.",
|
||
"handCalculation": "Reject unsupported syntax/type/precision or fixed-eight coefficient overflow; do not round.",
|
||
"input": ".1",
|
||
"canonical": null
|
||
},
|
||
{
|
||
"id": "invalid_8",
|
||
"owningTask": "F01",
|
||
"assumptions": "Strict decimal-string ingress only.",
|
||
"handCalculation": "Reject unsupported syntax/type/precision or fixed-eight coefficient overflow; do not round.",
|
||
"input": "1.000000000",
|
||
"canonical": null
|
||
},
|
||
{
|
||
"id": "invalid_9",
|
||
"owningTask": "F01",
|
||
"assumptions": "Strict decimal-string ingress only.",
|
||
"handCalculation": "Reject unsupported syntax/type/precision or fixed-eight coefficient overflow; do not round.",
|
||
"input": "NaN",
|
||
"canonical": null
|
||
},
|
||
{
|
||
"id": "invalid_10",
|
||
"owningTask": "F01",
|
||
"assumptions": "Strict decimal-string ingress only.",
|
||
"handCalculation": "Reject unsupported syntax/type/precision or fixed-eight coefficient overflow; do not round.",
|
||
"input": "Infinity",
|
||
"canonical": null
|
||
},
|
||
{
|
||
"id": "invalid_11",
|
||
"owningTask": "F01",
|
||
"assumptions": "Strict decimal-string ingress only.",
|
||
"handCalculation": "Reject unsupported syntax/type/precision or fixed-eight coefficient overflow; do not round.",
|
||
"input": "-Infinity",
|
||
"canonical": null
|
||
},
|
||
{
|
||
"id": "invalid_12",
|
||
"owningTask": "F01",
|
||
"assumptions": "Strict decimal-string ingress only.",
|
||
"handCalculation": "Reject unsupported syntax/type/precision or fixed-eight coefficient overflow; do not round.",
|
||
"input": "792281625142643375935.43950336",
|
||
"canonical": null
|
||
},
|
||
{
|
||
"id": "invalid_13",
|
||
"owningTask": "F01",
|
||
"assumptions": "Strict decimal-string ingress only.",
|
||
"handCalculation": "Reject unsupported syntax/type/precision or fixed-eight coefficient overflow; do not round.",
|
||
"input": "-792281625142643375935.43950336",
|
||
"canonical": null
|
||
},
|
||
{
|
||
"id": "invalid_14",
|
||
"owningTask": "F01",
|
||
"assumptions": "Strict decimal-string ingress only.",
|
||
"handCalculation": "Reject unsupported syntax/type/precision or fixed-eight coefficient overflow; do not round.",
|
||
"input": "792281625142643375936",
|
||
"canonical": null
|
||
},
|
||
{
|
||
"id": "invalid_15",
|
||
"owningTask": "F01",
|
||
"assumptions": "Strict decimal-string ingress only.",
|
||
"handCalculation": "Reject unsupported syntax/type/precision or fixed-eight coefficient overflow; do not round.",
|
||
"input": 1,
|
||
"canonical": null
|
||
},
|
||
{
|
||
"id": "invalid_16",
|
||
"owningTask": "F01",
|
||
"assumptions": "Strict decimal-string ingress only.",
|
||
"handCalculation": "Reject unsupported syntax/type/precision or fixed-eight coefficient overflow; do not round.",
|
||
"input": null,
|
||
"canonical": null
|
||
},
|
||
{
|
||
"id": "invalid_17",
|
||
"owningTask": "F01",
|
||
"assumptions": "Strict decimal-string ingress only.",
|
||
"handCalculation": "Reject unsupported syntax/type/precision or fixed-eight coefficient overflow; do not round.",
|
||
"input": true,
|
||
"canonical": null
|
||
},
|
||
{
|
||
"id": "terminal_line_separator_0",
|
||
"owningTask": "F01",
|
||
"assumptions": "Strict entire-string decimal ingress; JavaScript dollar-anchor alone is insufficient.",
|
||
"handCalculation": "Reject trailing line separators rather than padding malformed text.",
|
||
"input": "1\n",
|
||
"canonical": null
|
||
},
|
||
{
|
||
"id": "terminal_line_separator_1",
|
||
"owningTask": "F01",
|
||
"assumptions": "Strict entire-string decimal ingress; JavaScript dollar-anchor alone is insufficient.",
|
||
"handCalculation": "Reject trailing line separators rather than padding malformed text.",
|
||
"input": "1\r\n",
|
||
"canonical": null
|
||
},
|
||
{
|
||
"id": "terminal_line_separator_2",
|
||
"owningTask": "F01",
|
||
"assumptions": "Strict entire-string decimal ingress; JavaScript dollar-anchor alone is insufficient.",
|
||
"handCalculation": "Reject trailing line separators rather than padding malformed text.",
|
||
"input": "1
",
|
||
"canonical": null
|
||
},
|
||
{
|
||
"id": "terminal_line_separator_3",
|
||
"owningTask": "F01",
|
||
"assumptions": "Strict entire-string decimal ingress; JavaScript dollar-anchor alone is insufficient.",
|
||
"handCalculation": "Reject trailing line separators rather than padding malformed text.",
|
||
"input": "1
",
|
||
"canonical": null
|
||
}
|
||
],
|
||
"rounding": [
|
||
{
|
||
"id": "positive_tie",
|
||
"owningTask": "F01",
|
||
"assumptions": "Exact internal decimal, not an accepted external command.",
|
||
"handCalculation": "Round nearest at eight places; midpoint chooses larger absolute value.",
|
||
"input": "1.234567885",
|
||
"expected": "1.23456789"
|
||
},
|
||
{
|
||
"id": "negative_tie",
|
||
"owningTask": "F01",
|
||
"assumptions": "Exact internal decimal, not an accepted external command.",
|
||
"handCalculation": "Round nearest at eight places; midpoint chooses larger absolute value.",
|
||
"input": "-1.234567885",
|
||
"expected": "-1.23456789"
|
||
},
|
||
{
|
||
"id": "positive_below",
|
||
"owningTask": "F01",
|
||
"assumptions": "Exact internal decimal, not an accepted external command.",
|
||
"handCalculation": "Round nearest at eight places; midpoint chooses larger absolute value.",
|
||
"input": "1.234567884",
|
||
"expected": "1.23456788"
|
||
},
|
||
{
|
||
"id": "negative_below",
|
||
"owningTask": "F01",
|
||
"assumptions": "Exact internal decimal, not an accepted external command.",
|
||
"handCalculation": "Round nearest at eight places; midpoint chooses larger absolute value.",
|
||
"input": "-1.234567884",
|
||
"expected": "-1.23456788"
|
||
},
|
||
{
|
||
"id": "zero_tie",
|
||
"owningTask": "F01",
|
||
"assumptions": "Exact internal decimal, not an accepted external command.",
|
||
"handCalculation": "Round nearest at eight places; midpoint chooses larger absolute value.",
|
||
"input": "0.000000005",
|
||
"expected": "0.00000001"
|
||
},
|
||
{
|
||
"id": "negative_zero_tie",
|
||
"owningTask": "F01",
|
||
"assumptions": "Exact internal decimal, not an accepted external command.",
|
||
"handCalculation": "Round nearest at eight places; midpoint chooses larger absolute value.",
|
||
"input": "-0.000000005",
|
||
"expected": "-0.00000001"
|
||
},
|
||
{
|
||
"id": "negative_underflow",
|
||
"owningTask": "F01",
|
||
"assumptions": "Exact internal decimal, not an accepted external command.",
|
||
"handCalculation": "Round nearest at eight places; midpoint chooses larger absolute value.",
|
||
"input": "-0.000000004",
|
||
"expected": "0.00000000"
|
||
}
|
||
],
|
||
"overflow": {
|
||
"id": "overflow_rejected",
|
||
"owningTask": "F01",
|
||
"assumptions": "Fixed-eight 96-bit coefficient; calculations must fail rather than saturate or silently rescale.",
|
||
"handCalculation": "Max+0.00000001 and Min-0.00000001 overflow. Exact internal magnitude792281625142643375935.5 already exceeds max; reject before quantization.",
|
||
"maximum": "792281625142643375935.43950335",
|
||
"quantum": "0.00000001",
|
||
"roundingOverflow": "792281625142643375935.5"
|
||
}
|
||
}
|