1.6 KiB
Prompt
Continue the gap-checker and history-backfiller repair plan. Start with deterministic analysis characterization, then fix canonical sorting, dedupe-derived columns, positive gap detection, and null grouping.
During review, the user challenged the replacement null-grouping algorithm because its initial tests did not assert exact endpoints. The user explicitly required retaining detailed, human-oriented algorithm documentation such as the existing ASCII segment map.
Response summary
Added deterministic analysis regressions and corrected normalization so sorting and duplicate resolution precede derived-column calculation. Unified null grouping for NumPy and Polars inputs, documented its exact inclusive-boundary contract with an adapted visual map, and verified all small null layouts against an independent state-machine oracle. Retained sorted smart-dedupe output.
Files changed
piker/tsp/_anal.py- canonical gap and documented null groupingpiker/tsp/_dedupe_smart.py- sorted duplicate resolutiontests/test_tsp_analysis.py- exact and exhaustive regressionsai/prompt-io/opencode/20260722T001357Z_16f3cd6f_prompt_io.raw.md- unedited response record
ai/prompt-io/opencode/20260722T001357Z_16f3cd6f_prompt_io.md- provenance metadata and response summary
Human edits
None - generated changes have not yet been edited by the human.