Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions crates/cockpit-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@ object_store = { version = "0.13.2", features = ["aws"] }
sha2 = "0.10"
hex = "0.4"
futures = "0.3"
# `osm_lance`: convert the hydrated `.soa` slab into a Lance dataset on the
# same persistent volume (the `soa_to_lance` recipe, see that module's doc).
# Both are ALREADY locked transitively at these exact versions via
# `lance-graph` -> `lance` -> `arrow` — declaring them directly here changes
# no resolved version, it just makes the capability this crate USES a thing
# this crate ASKS FOR. Same move lance-graph PR #931 made for `object_store`.
lance = "=9.0.0"
arrow = { version = "58", features = ["prettyprint"] }


# ── Quarto rendering pipeline ───────────────────────────────────────
Expand Down Expand Up @@ -118,3 +126,7 @@ planner = ["notebook-query/planner"]
orchestrator = ["notebook-query/orchestrator"]
# Neo4j Aura fallback — only for live demos when lance-graph is unreachable
neo4j-fallback = ["notebook-query/neo4j-fallback"]

[dev-dependencies]
# `osm_lance`'s warm-skip test needs an isolated directory per run.
tempfile = "3"
15 changes: 15 additions & 0 deletions crates/cockpit-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ mod osint_classview;
mod osm_tiles;
mod osm;
mod osm_features;
mod osm_lance;
mod osm_slab_hydrate;

// ── Embed the Vite build at compile time ─────────────────────────────────────
Expand Down Expand Up @@ -197,6 +198,20 @@ async fn main() {
if let Some(path) = osm_slab_hydrate::ensure_slab_local().await {
// SAFETY: single-threaded startup, before any task or listener exists.
unsafe { std::env::set_var("OSM_SLAB_PATH", &path) };

// Load the map into lance-graph: convert the hydrated `.soa` slab
// into a Lance dataset on the same persistent volume (medcare-rs's
// own hydrate-into-Lance shape; see `osm_lance`'s module doc for the
// full recipe and why it stays local rather than S3-backed).
// Best-effort and non-blocking to correctness: `osm_features::
// open_slab` still mmaps the raw `.soa` file regardless of whether
// this succeeds, so a conversion failure never takes the map down.
if osm_lance::ensure_lance_local(&path).await.is_none() {
tracing::warn!(
"osm lance: conversion to a Lance dataset failed or was skipped; \
the raw .soa slab still serves the map unaffected"
);
}
}

let (tx, _rx) = broadcast::channel::<SseEvent>(256);
Expand Down
Loading