fix(osmviews-builder): upload the stats JSON before the BOM - #97
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up agreed in review. Publish order is now stats → BOM → GeoTIFF.
The reference graph: a consumer starts from the GeoTIFF (stable URL) → its
Linkheader → the BOM → the BOM'sexternalReference→ 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
PutFilecalls reordered + comment. No test asserts upload order —main()isn't unit-tested andFakeStoragedoesn't record call order; the comment states the invariant.🤖 Generated with Claude Code