Truthound · All articles · 13/24
Evidence-led Truthound Core guidance on data contracts, check inputs and operational limits.
480 articles
Do not read a two-point regression’s zero standard error as certainty
An exact line through the points need not leave degrees of freedom for estimating residual variance.
Check information lost near a Student-t CDF of 0.5
A finite CDF within range can still lose small distinctions. Use the df=1 closed form and an error budget appropriate to the task.
Admit sparse-sum values and out-buffer identity separately
A new array containing the same numbers is different from the supplied buffer itself. Make the shared-output contract explicit.
Hand off a sparse matrix exponential with its unitary residual
Derive the property and norm tolerance from the Hermitian generator. A returned matrix alone cannot admit a conserved-quantity calculation.
Before admitting a finite scalar sqrtm result as a square root
Separate the scalar-input policy from an explicit 1×1 matrix. Verify the returned value against the original equation.
Admit a budget-limited trust-region step using its model cost
Compare a returned step with a feasible interior candidate using the original rank-deficient subproblem objective.
Check original MILP constraints before interpreting optimal status
Separate feasibility from optimality in that order. Do not use equality to one solution vector as the only reference.
Admit the value remaining after signed logsumexp cancellation
Use an independent reference for the remainder and sign after leading terms cancel. Do not replace NaN with an arbitrary zero.
A SciPy Laplacian diagonal of -56: a correct degree written into a narrow buffer
Even a correct degree of 200 can be lost when assigned to a narrow work matrix. Compare the original-edge reference with the actual diagonal.
Before clipping a tiny negative interpolated variance at an input knot
Check knot reproduction separately from variance nonnegativity. Even tiny values need an error policy appropriate to their use.
Do not dismiss an integer matrix’s 0.5 power as a dtype preference
Use a squared residual to check preservation of the fractional exponent. A plausible dtype can conceal a different operation.
Which grid does an even Savitzky–Golay window describe?
The central evaluation point and the original sample grid can be different contracts. Do not read a half-grid shift as error magnitude alone.
Explain a tiny slope in an exactly constant series
Retain direct evidence of constancy and the task’s error budget. Separate a tiny slope from the interpretation of its p-value.
When reversing Canberra distance inputs changes the sign
A finite distance alone cannot admit a neighbor relation. Compare both directions with a reference derived from the original vectors and preserve the integer absolute-value boundary.
Before inheriting UTC sortedness for local calendar dates
A calendar reversal after timezone conversion differs from UTC order. Derive the minimum from actual values rather than trusting the flag.
A small experiment before deduplicating NULL structs and NULL children
Define whether an absent parent differs from a present parent with a NULL child. Check overall distinct counts and row-level decisions separately.
When a filter moved before shift changes transition statistics
Derive previous states from the original sequence. A test expecting only row counts is insufficient to establish operation order.
Check whether another parent’s element moves into an empty list
Equal total element counts can conceal changed parent ownership. Retain an empty parent in the small fixture.
Why unknown NaN-page statistics cannot be omitted from row-group bounds
An unknown range is different from an empty page. Check that the advertised lower bound does not exclude original valid values.
Polars mixed-key full join: two rows still require key and payload reconciliation
Equal row counts do not establish preservation of keys or payloads after a full join.
