Skip to content

fix(osmviews-builder): upload the stats JSON before the BOM - #97

Merged
brawer merged 1 commit into
mainfrom
fix-upload-order
Sep 3, 2026
Merged

fix(osmviews-builder): upload the stats JSON before the BOM#97
brawer merged 1 commit into
mainfrom
fix-upload-order

Conversation

@brawer

@brawer brawer commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Follow-up agreed in review. Publish order is now stats → BOM → GeoTIFF.

The reference graph: a consumer starts from the GeoTIFF (stable URL) → its Link header → the BOM → the BOM's externalReference → the statistics JSON. Uploading referenced‑before‑referencer means whatever a consumer can reach from a fetchable GeoTIFF is already there.

Previously stats went last, so between the BOM and stats uploads the BOM briefly referenced a stats object that didn't exist. Harmless today (the BOM is only reachable via the GeoTIFF, which was already uploaded last), but now correct by construction.

3 sequential PutFile calls reordered + comment. No test asserts upload order — main() isn't unit-tested and FakeStorage doesn't record call order; the comment states the invariant.

🤖 Generated with Claude Code

The publish order is now stats -> BOM -> GeoTIFF. A consumer starts from
the GeoTIFF (stable URL), follows its Link header to the BOM, and the BOM
references the statistics JSON; uploading referenced-before-referencer
means anything reachable from a fetchable GeoTIFF is already in place.

Previously the stats went last, so between the BOM and stats uploads the
BOM briefly referenced a stats object that did not exist yet. Harmless in
practice today (the BOM is only reachable via the GeoTIFF, which was
already last), but the ordering is now correct by construction.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0124hdGM7xKmGF3HPDy7PL6j
@brawer
brawer merged commit d553e8e into main Sep 3, 2026
8 checks passed
@brawer
brawer deleted the fix-upload-order branch September 3, 2026 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant