feat(simulation): atlas proxy layers + data-delivery endpoints (T-960, T-949)
T-960: RoadGraphLayer (L2 edges/junctions, MaintenanceAuthority, rail flag, named routes) + SettlementLayer (name/position/size-class/is_capital/is_port from T-955 placements) as new Option fields on AtlasLayerResponse — T-1046 precedent; layer_proxy doc comment corrected (cascade runs through RoadGraph, client up_to ignored). T-949: new StarMapRequest/StarMapResponse (raw JSON passthrough of the star_map_data.json bake) + CityNamesRequest/CityNamesResponse (atlas_city_names via CityContextReader) with defense-in-depth Sol exclusion (GJ-0 system id OR settlement_wave='origin', D-236). Inbound demux extended with mandatory boolean discriminator fields (serde ignores unknown fields — optional-shape sniffing would be ambiguous); AtlasLayerRequest unchanged. SimBridge trait +2 methods, implemented on TcpBridge + LocalBridge. CityPlacement/CityRecord gained name/population/is_capital (BodyWorldState cache-hit path stays DB-free). ~30 new unit tests incl. demux disambiguation + Sol branches; gen_fixtures extended for road/settlement samples. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -199,6 +199,22 @@ fn main() {
|
||||
),
|
||||
}
|
||||
|
||||
// Star-map dataset proxy (T-949a): resolve the repo-root-relative path to
|
||||
// the client's pre-generated star_map_data.json (tooling/generate-star-map-data.py).
|
||||
// Read fresh on every request — no caching, see atlas_data_proxy module doc.
|
||||
let star_map_data_path = world_root.join("client/data/star_map_data.json");
|
||||
if star_map_data_path.exists() {
|
||||
tracing::info!("Star map data path resolved: {:?}", star_map_data_path);
|
||||
} else {
|
||||
tracing::warn!(
|
||||
"star_map_data.json not found at {:?}. Star map requests will error until it exists.",
|
||||
star_map_data_path
|
||||
);
|
||||
}
|
||||
app.insert_resource(settled_reach_server::atlas::atlas_data_proxy::StarMapDataPath(
|
||||
star_map_data_path,
|
||||
));
|
||||
|
||||
// Settlement reader for Layer-3 placement (#955): reads a body's settlements
|
||||
// from systems.db on a cache miss so the cascade work item stays DB-free.
|
||||
match settled_reach_server::atlas::city_context_reader::CityContextReader::open(
|
||||
|
||||
Reference in New Issue
Block a user