stop paging when the provider stops making progress
An ArcGIS layer without supportsPagination accepts resultOffset and ignores it, answering every page with the first one. The VHA profile reader advanced its offset by the page length and stopped at the announced count, so for a count that is a multiple of the page size it collected N copies of page one — and its completeness check, len(features) == candidate_count, passed. Four announced records became four stored records, two of them duplicates, filed under an official provenance. That is the substitution bounded acquisition exists to prevent, arriving through the front door. The reader now refuses a record it already collected. It fails rather than silently dropping the duplicate: a provider that cannot page is a provider whose count proves nothing, so a smaller-but-clean result would still be unverifiable. Its watercourse-name loop was worse — a bare `while True` that ended only when the provider stopped setting exceededTransferLimit, with names deduplicated by code so a stuck provider produced no visible change while the requests continued. It now refuses a repeated page body, and both loops have the page budget the sibling readers already had. Those siblings turned out to be fine. GRB and official vector already refuse a repeated page URL, bound the page count, and deduplicate on feature identity — but none of it had a test, so none of it was known to work. Exercised now, including the case where distinct URLs defeat the loop check and the budget is the only backstop. A duplicate across two genuinely different pages is kept once rather than failing, because a cursor over a changing table produces that legitimately. Also: _bash_path fell back to the raw path whenever wslpath failed, except on timeout, which propagated and reddened the suite when starting WSL took more than ten seconds under load. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -71,6 +71,16 @@ runtime source of truth.
|
||||
that legitimately moves to a new host therefore fails closed until the
|
||||
operator updates the configured URL, which is the intended trade: bytes from
|
||||
an unexpected host must never be persisted under an official provenance.
|
||||
- A paged reader stops when the provider stops making progress: a repeated page
|
||||
URL, a repeated page body, or a record already collected all fail the
|
||||
acquisition, and every reader has a page budget. An ArcGIS layer that lacks
|
||||
`supportsPagination` accepts `resultOffset` and ignores it, which otherwise
|
||||
yields a dataset holding several copies of page one while matching the
|
||||
announced record count exactly. Failing is deliberate: a provider that cannot
|
||||
page is a provider whose count proves nothing, so its data cannot carry an
|
||||
official provenance. A duplicate record arriving across two genuinely
|
||||
different pages is kept once instead, since a cursor over a changing table
|
||||
can produce that legitimately.
|
||||
|
||||
## Historical analysis
|
||||
|
||||
|
||||
Reference in New Issue
Block a user