Repository navigation
obc data: the planet region reads osm-planet and the daily diffs after it - #2702
Draft
timohueser wants to merge 9 commits into
Draft
timohueser wants to merge 9 commits into
timohueser wants to merge 9 commits into
Conversation
- `device/landmark-content` and `device/peak-content` read `wiki` at the version that the target reads: `common.tar.zst` and the shards of the 2^20 µdeg cells that the region polygon touches, as its manifest lists them. Without a version, the content layers block with the prepare Fix, and the catalog and planner/search with them. - obc-pack unpacks the shards (tar under zstd) into the view. A fact that the version lacks is no content; the step metrics count it by kind (`absent`). - The content layers publish nothing: the `shared-content` bundles had no reader once the facts live on the target as `wiki`. - Deleted: the Wikimedia capture fetcher and its run-journal field, the regional capture selection, the legacy capture read, gc's resumable capture work, the HTTP counters and rate limit that only it used, and `tools/wikimedia_acquire.py` and `tools/wikimedia_adopt.py` with their tests. The wikidata, wikipedia and commons rows stay, without a fetcher, as the named inputs of `wiki`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MdLzBWpdcQRZLATaT7poQZ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MdLzBWpdcQRZLATaT7poQZ
- In the producer, a fact that the export lacks is a fault: the round-2 compile refuses it, so it gets the per-subject retry, the count and the majority stop. A castle without facts counts as a failed compile again. - The reader's content step names its absent facts in the run log. - A region whose `wiki` version lists no shard of it blocks: a snapshot input without files reads every file of the version. - `Client::sorted` is public, for the release that a test declares. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MdLzBWpdcQRZLATaT7poQZ
…mpile The summits take the link tags that `subjects` kept, so the export has a link fact of each. Round 2 no longer drops a summit without a linked identity: its compile counts the absent link and refuses it, so a regression of the peak links feeds the failure count and the majority stop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MdLzBWpdcQRZLATaT7poQZ
…o or a fault A summit compiles in round 2 when it links an asked identity, or when it has a link tag and no identity, so that an absent link fact still fails its compile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MdLzBWpdcQRZLATaT7poQZ
…mmits Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MdLzBWpdcQRZLATaT7poQZ
…r it A region of kind `planet` is the OSM planet. The device maps read it through one source step, `device/source/planet`, which applies the daily diffs of osm-replication (from=B) to osm-planet B with `osmium apply-changes --generator obc-data`. The step has no client file, so a target never gets the updated planet. The content reads that step, and the catalog picks every Geofabrik area and the planet. The planner refuses a planet region before it fetches anything. osm-planet is due after 28 days, so that apply-changes reads at most about five weeks of diffs. The dead "before osm-planet" staleness rule goes: the diffs name their base in from=B. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MdLzBWpdcQRZLATaT7poQZ
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The discovery listing, which fetches only small metadata, now reports the products that do not suit the settings. The update and --dry-run fail there with "layers cannot be planned", so a planet update no longer downloads the planet before the planner refuses it. The OSM source steps link through target::link, which copies only across file systems. The resolve builds a Geofabrik source once its extract version is known. The spec names the first planet listing and the no-diff link. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MdLzBWpdcQRZLATaT7poQZ
link moves from target to engine, beside view and pass, and pass uses it too: every step that links a store object copies only across file systems. The early refusal of an unsuited product judges with the metadata in the store, so its fix names the region, the layers, or a fetch of newer Geofabrik metadata. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MdLzBWpdcQRZLATaT7poQZ
This branch has not been deployed
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.
Part of #2655 (P7-D).
Stacked on #2701. This branch starts from #2701 (
claude/obc-data-v2-p6-wiki-readers,c056967fe), so its diff holds #2701 until #2701 merges. After that, I mergedevelopinto this branch. I do not rebase. The commits of this PR are87735e305,eeaec4250andee3c1883b.Problem
No region can select the OSM planet.
osm-planetandosm-replicationhave fetchers, but no product reads them.Behavior
planetis the OSM planet. A union that holds it is the planet too.data/regions/planet.tomlis the preset.areas --jsonand the web type know the kind. Its overview box is the world.region_sources::resolvefor a planet:B= the version ofosm-planet, andE= the version ofosm-replicationwithfrom=B. The outline is the world box.device/source/planet, runsobc_osm::step::planet. It doesosmium apply-changes -F pbf --change-file-format osc.gz --generator obc-dataof the diffs, in the order of their sequences, and writessource.osm.pbfandsource.poly, the same files as the area step. With no diff,source.osm.pbfis a link to the planet file.device/osmreads it as the one source.linkmoves fromtargettoengine, next toviewandpass. The two OSM source steps andengine::passuse it. It copies only across file systems and never opens an existing file for writing, so no step can write through a link to a store object.BandEin the snapshots of the step. The catalog writesCellSource { extract_id: "planet", snapshot: E }.osm-planetandosm-replicationon the target.wikireaders): the planet content readssource.osm.pbfandsource.polyofdevice/source/planet, and thewikishards of every world cell that the manifest names.obc-packcontent_viewnow also finds its.osm.pbfand.polyin step files. A Geofabrik content reads the same inputs as before.planetregion asInvalid. This is the recommended answer to Q1. If the owner chooses the other answer, that is a later PR.freshness::discoverlists with only small metadata fetched, and it now reports the products that do not suit the settings.--dry-runthen fail withlayers cannot be plannedbefore the bulk listing. A planet update, and the "Planet" preset on the operator page, no longer download the planet and its diffs before the planner refuses.obc data fetch geofabrik-indexand update again.osm-planetand the diffs to learnBandE, as a Geofabrik listing fetches its extract. So a review lists them as downloads only for a laterBorE, or on another machine. The size of the diffs isunknown.terrain-referenceprepare: with a planet scope, it keeps every tile of the model.osm-planetrefreshis now 28 days (it was 90).sources::statuslost itsbaseparameter and the "beforeosm-planet" rule.freshness.rslooked up the base with the params of the replication, so the rule never fired. The diffs now name their base infrom=B.stalerow, the OSM planet section, the update rule for an unsuited product, the device section, adevice/source/planetrow, the content row, and the regenerated schemas.Planet-scale risks (to measure, not solved here)
osmium apply-changesholds every change in memory: ≈0.55 GB per daily diff, so ≈20 GB at 35 days. The 28-day refresh bounds it.partial/. The collection keeps one updated planet in the store for each kept release.copy_keyincludes the version, so each weeklyEuploads every diff sinceBagain undersources/osm-replication/E/…. That is up to ≈35 × 105 MB ≈ 3.7 GB a week, and the copies of the serving and the rollback release overlap.device/source/planetanddevice/osmtake hours, and a step cannot resume.device/catalogoptions list each cell of each pick, about 2M ids, which grows the key and the manifest.wikishard of its manifest.Lines
git diff --shortstat c056967fe..ee3c1883b: 23 files changed, 374 insertions(+), 132 deletions(-).Tests
region_sources::tests::a_planet_lists_one_source_step_that_reads_the_planet_and_the_diffs_after_it:osm-planetin the store, the listing first asks forosm-planet.device/source/planet. It readsosm-planetBandosm-replicationEwithfrom=B, has no client file, and its outline is the world.Bdoes not change for either.separate_input_layers_retain_distinct_versions_in_release_provenancenow also asserts that a Geofabrik listing requests noosm-replication.obc-osmthe_planet_step_applies_the_daily_diffs_to_the_planet: a tiny planet and two.osc.gzdiffs, stored without a file extension. The output holds only the newest node, the deleted node is gone, andsource.polyis the option.planetregion as invalid, before a fetch.a_machine_with_less_memory_or_disk_than_the_estimates_refuses_the_updatenow has an unsuited product next to one that needs a bulk fetch that the registry cannot give. The update fails withlayers cannot be planned: test (test): …, not with the error of that fetch. So it refuses before the bulk fetch.Checks
Run on the head, with the shared lock and debug off:
obc test -p obc-data: 181 passed, 1 skipped. The spec schema test passes.obc test -p obc-data-steps: 34 passed.builder/web/node_modulescame from another worktree with the same lock file.cargo test -p obc-osm: 4 passed, with Osmium 1.16.0.cargo clippy -p obc-data -p obc-data-steps -p obc-osm --all-targets -- -D warnings: clean.cargo fmt --all --check: clean.obc suites check: test plan OK.Run on the first commit only:
obc test -p obc-pack: 95 passed.obc-pack: clean.tools/prose.py --check: pass.tools/check_data_sources.py: pass.tools/check_obc_data_licence.py: pass.tools.tests.test_fixtures: pass.svelte-check: no error from this change. Its 16 errors are the wasm packages that this machine does not build.Left to CI: the rest of
obc test affected, and the web suites.Public docs: unchanged (contract change in
specs/obc-data.mdonly).Requirements: none. No planet target can publish until the planner builds the planet. I could not run
obc reqhere.🤖 Generated with Claude Code
https://claude.ai/code/session_01MdLzBWpdcQRZLATaT7poQZ