Repository navigation
fix(compare): calibration compares raw Arrow values, never Python objects (ITL-1347) - #518
Conversation
…ects (ITL-1347) Codex on PR #510: a time64[ns] column changing from [1, 9] to [2, 9] in place was labelled row-order variation, because both became the same microsecond Python time. The multiset of a column's values is now taken from each raw value written in the Arrow IPC format (after _bits; a null one fixed key): equal exactly when the values are. Tests: a value changed in place is a change (time64/timestamp/duration ns, decimal256, -0.0, a NaN payload, a long string) and the same raw values reordered are a reorder, for each. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
Part of ITL-1347.
Codex review of PR #510 (minor, reproduced):
docs/dev/scripts/itl_1347/compare.py's calibration labelled atime64[ns]column changing from[1, 9]to[2, 9]in place as row-order variation, because both arrays became the same microsecond Pythontime. The multiset of a column's values is now built from each raw value written in the Arrow IPC format (after_bits, which keeps float bits; the element copied withtakeso no offset enters the bytes; a null one fixed key): two values are equal exactly when their Arrow values are. Never a Python object.Tests (
tests/test_dev_scripts/test_itl_1347_compare.py): a value changed in place is a change, not a reorder, and the same raw values reordered are a reorder, each fortime64[ns],timestamp[ns](with and without a zone),duration[ns],decimal256(76, 40),-0.0against0.0, a NaN payload, and a 5,000-character string (whose text form Arrow shortens). The reviewer'stime64[ns]case fails against the old Python-object comparison.Could a gate tonight have been affected? No. The direction of the old error could only keep a column out of the volatile list (compared exactly), never hide a drift; and re-running the calibration of both gates with this fix gives the volatile lists the gates used, and no reorder-only column:
volatile.jsonequals the fixed calibrationmain8ee6c6d vs job-speed+516 5045660__data_id2,__pod_ts2,__record_id2,_source_mean_rate_hz2,_source_rate_hz5__data_id2,__pod_ts2,__record_id2,_source_bin5,_source_n_bins3,_source_n_spikes4,executed_at1,pipeline_run_id1main83c5476 vs job-speed 087ff54Every volatile column is a run-made identifier (
__data_id,__pod_ts,__record_id,executed_at,pipeline_run_id) or a function output's source-info token (which embeds a run's data id); no data column.Checks: the test file 22 passed; basedpyright on the changed files exit 0; ruff clean. Tooling and tests only: no library code changes.
🤖 Generated with Claude Code
Summary by CodeRabbit