All problems

Observation Exports Omit the Final Partial Page

Level 2 · node · Reliability · Final partial page in paged exports

Scenario

A fictional ridge station packages its regularly collected readings as pages for an offline review tool. Some exports are missing their last readings. Trace how the data moves from the repository to the page builder and then to the download function.

Requirements

Fix station exports so they preserve input order and never drop a reading. The page size is a positive integer; do not emit empty pages.

Acceptance criteria

  • Full pages contain readings in input order.
  • A final partial page contains any remaining readings.
  • Fewer readings than the page size produce one page with all readings.
  • Empty inputs and exact multiples of the page size do not produce an empty page.
  • Exclude readings from other stations and return null for invalid page sizes.