Styxis
Company
Knowledge

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.

Equal values are not equal ownership

Where the out contract matters, admit numerical equality and identity of the caller-owned buffer separately. A downstream step reading only the original buffer may disagree with a team that checked only returned numbers. Test object identity and write-through contents as distinct requirements. Object-identity flags measured immediately after a call can feed a Truthound handoff-condition check. [1, 2, 3]

The reported dtype and out combination

SciPy #26149 reports sparse sum calls with dtype and out returning a different object in some combinations. A follow-up contributor announces a test and fix PR; this article does not verify a released correction. The report does not establish general corruption of the computed values. [1]

Capture identity immediately after the call

Record whether the returned object is the supplied out immediately after the call. On an identity mismatch, use the separate return value explicitly and revise code depending on a shared buffer. Operators prepare the identity observation and independent API requirement under the same call ID. [1, 3]

A small contract distinguishing B and C

The illustrative contract requires returning the caller’s buffer B itself. An external returned is B observation of true passes. A new buffer C holding the same numbers gives false and fails. Apply this contract only to an API path that promises out identity. [1, 3]

The measured-flag boundary

ColumnPairValidator in Truthound Python SDK 3.3.2 compares the externally measured returned-is-supplied-out Boolean with the required state. It does not accept Python objects and automatically trace aliases. Core neither verifies write-through contents from the flag alone nor proves numerical correctness. [1, 2, 3]

Pass the return value explicitly

Explicitly capture the returned array and pass it downstream, or use a verified same-dtype out path. Recheck buffer contents separately where they matter. Existing regressions covering the relevant identity contract reduce the value of another audit table. [1, 3]

Application conditions

Externally measure identity of the returned object and supplied out immediately after the call, joining by call ID.

Alternatives

Pass the actual returned array explicitly or use a verified same-dtype out path.

Limitations

  • The Boolean comparison does not automatically inspect aliases, write-through contents, or numerical correctness.

Evidence

Event checked
Subject checked
Modified