AI-assisted engineering/Review the AI's PR

Review PR #1187: write each order once per batch

Review the AI's PRHard45 min
Write each order once per batchOpen

The order indexer spends most of each batch committing offsets and rewriting orders that changed more than once. An assistant made it write each order once per batch and commit once. Five defects hide in the rework, and some untouched lines that look wrong are right.

AIOpened by the assistantorder_indexer.py

Your task

Review PR #1187. Find the defects, place them on their lines, and rank them.

  • read pr.diff, then file one entry in FINDINGS for each defect you find
  • line is the line number in the NEW file, the numbers down the left of the diff
  • severity is one of blocker, major, minor
  • a finding filed against code this PR did not change is a false alarm
  • the module docstring is the contract; check every changed line against it

At submit, your findings are matched against the planted defects by file and line.