Skip to content

COLEMAN 4.4.1 — Keep exact CI quantities bounded

COLEMAN now enforces the declared precision of exact quantities independently of the active Decimal context. Compact, nonzero values beyond a contract's fractional limit reject before serialization or expensive rational conversion. They are never rounded into a free test, a zero budget or a zero probability.

What changed

  • Nonnegative quantities, signed scenario payoffs, exact output moments, scenario probabilities and application budget overrides receive context-independent fractional-precision validation. Each quantity retains its field's existing limit: twelve places for ordinary inputs and 48 for exact output moments.
  • Versioned artifact from_json readers preserve numeric decimal literals until typed validation. Decimal fields retain their exact input; explicitly binary64 fields continue to project to floats. The legacy domain-record decoder keeps its existing binary64 behavior.
  • Independent benchmark references bound text length, Decimal coefficients and exponents, and preconstructed integer/fraction bit lengths before Fraction conversion. Bounded scientific notation remains supported. Valid negative reference values and genuine zero remain valid.

Compatibility and limits

This is a validation correction, not a schema migration. Canonical v1 decimal strings, valid signed values, logical identities and existing golden artifacts retain their meaning. Out-of-contract values formerly admitted through Decimal underflow now reject with a validation error; no clipping, rounding, fallback value or silent artifact rewrite occurs. No runtime, CLI, MCP or data dependency is added. An already serialized zero does not retain evidence of whether an earlier input underflowed. This patch does not reconstruct missing precision; reproductions must use the original inputs when their encoding is uncertain.

Use the documented COLEMAN from_json artifact readers, and encode exact decimal quantities as decimal strings when producing JSON. Generic Pydantic JSON helpers are not a substitute for the duplicate-key and precision-preserving artifact reader. Explicit binary64 measurements keep their declared floating-point semantics.

New rational-reference safety ceilings are 4096 text characters, 512 coefficient digits/absolute exponent for nonzero Decimal literals, and 4096 numerator or denominator bits for parsed or preconstructed exact values. These are parsing/resource bounds, not claims about the quality or independence of an experiment. Native CI results and source admission remain separate contracts. Previously readable references outside these safety ceilings now reject; there is no automatic truncation or migration.

Validation

Regression coverage includes compact exponent amplification, JSON numeric underflow, altered Decimal contexts, valid precision boundaries/trailing zeros, negative payoffs, null/zero budgets, nonfinite inputs and bounded exact fractions. The noneditable installed-wheel check exercises the corrected quantity contracts outside the checkout alongside the real native TCPCI and optional transport workflows. All 1,971 tests pass, including the existing mathematical golden fixtures, with 95.27% combined line/branch coverage. Lint, formatting, type checks, Pylint, structural checks, strict documentation and package builds also pass.

The RTPTorrent research/adapter work in #261 continues separately. This patch adds no source admission or cross-corpus performance claim.

Full changes from 4.4.0.