Retain intermediate meaning when a Boolean cast chain produces -24
Check the nonzero-is-true policy beside the final 1/0 codes. An Int8 dtype alone cannot admit the status code.
The raw integer and the true code
Reconcile an integer→Boolean→integer chain with the approved true-value code rather than only its final Int8 dtype. Narrowing the original integer directly is a different operation. Retain intermediate meaning to locate where the promised transformation changes. Join policy-defined codes with final codes so Truthound can check the handoff condition. [1, 2, 3]
The scope of the cuDF follow-up
Polars #25564 reports input 1000 becoming CPU code 1 but GPU code -24 after Boolean then Int8 casts. Follow-ups reference cuDF PR #20773 and the then-current nightlies and next-release plan. These are attributed statements, not this article’s verification of the reader’s installed fix. [1]
Retain the intermediate Boolean
Record the raw integer, intermediate Boolean, and final integer, comparing with the 1/0 expectations of a nonzero-is-true policy. Withhold other codes from consumers. First approve that raw domain and separately test 0 and NULL handling. [1, 3]
The reference 1000→true→1
The illustrative policy interprets nonzero input 1000 as true and exports true as Int8 code 1. Actual 1 passes against the independent policy reference; -24 fails. A task permitting only raw 0 and 1 needs its domain check first rather than this nonzero policy. [1, 3]
Code comparison versus casting
ColumnPairValidator in Truthound Python SDK 3.3.2 compares final_boolean_code and approved_boolean_code retained by the operator. The raw domain, actual intermediate Boolean, and cast execution are external inputs. Core does not repair cast optimization or decide the source status-code policy. [1, 2, 3]
Retest explicit-condition alternatives
Test a verified engine or explicit condition producing 1/0, reconciling intermediate Booleans and final values again. Existing regressions for the actual stack reduce another audit’s benefit. A declared final dtype does not replace checking the values sent to consumers. [1, 3]
Application conditions
Approve the nonzero-is-true domain first, retaining raw, intermediate, and final values plus 0 and NULL policies.
Alternatives
Reconcile intermediate and final values from a verified engine or explicit 1/0 condition.
Limitations
Code agreement does not repair cast optimization or establish the source status-code domain.
Evidence
- Event checked
- Subject checked
- Modified
