# Changelog

All notable changes to `geographdb-core` will be documented in this file.

The format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this crate follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

### Fixed

## [0.3.0] – 2026-05-20

### Added

- Dual octree spatial indexing with spatial page store for efficient 3D spatial
  lookups over persisted graph data (`src/storage/dual_octree.rs`,
  `src/storage/spatial_page.rs`).
- `GraphStorageManager` for coordinated persistent storage of 4D graph data,
  managing node files, edge files, octree state, and property store sections
  (`src/storage/graph_storage_manager.rs`).
- Custom binary property store (`prop_store`) for node property persistence.
  Uses a 32-byte header, sorted lookup table (binary search), and inline
  variable-length typed-value blocks. Replaces sled (removed due to security
  advisories) and the transient JSON sidecar. Provides O(log N) random access
  with no parse overhead (`src/storage/prop_store.rs`).
- Public API for 4D graph persistence: `save_graph4d` and `load_graph4d`,
  re-exported from the crate root. Serializes full 4D graph state including
  nodes, edges, spatial index, and typed properties to a `.geo` archive.
- Additional public types for property handling: `PropertyValue`, `PropStore`,
  `NodeProperties`, `PropLookupEntry`, and helper functions
  `build_prop_store`, `write_prop_store`, `read_prop_store`, `lookup`,
  `encode_node_properties`, `decode_value`, `decode_node_properties`.
- Benchmark suite `benches/prop_store_benchmarks.rs` comparing the binary
  property store against JSON sidecar and previous sled approaches for build,
  write, read, lookup, and file-size metrics.
- CI smoke test for benchmarks (`cargo bench --quick`) in `validate.yml`.

### Fixed

- `LoopGuard` import path resolution in `graph4d_storage.rs` (latent bug
  exposed by module reorganization).
- `cargo clippy` errors in new modules (`dual_octree`, `graph4d_storage`,
  `prop_store`).

## [0.2.0] – 2026-05-19

### Added

- 4D graph traversal API for spatial-temporal analysis:
  - `GraphNode4D`, `TemporalEdge`, `TemporalWindow`, `SpatialRegion`, and
    `TraversalContext4D`.
  - `reachable_4d()` for time/space-filtered reachability.
  - `astar_find_path_4d()` for weighted graph + spatial + temporal path search.
  - `strongly_connected_components_4d()` for SCCs constrained by temporal and
    spatial eligibility.
  - `articulation_points_4d()` and `bridges_4d()` for active 4D bottleneck
    analysis.
  - `time_dependent_dijkstra_4d()` for single-source earliest-arrival
    propagation.
  - `earliest_arrival_path_4d()` and `fastest_temporal_path_4d()` for causal
    temporal journeys.
- Small Cypher-like 4D query layer:
  - `query_4d()` entrypoint.
  - `GeoCypherResult` and `GeoCypherError`.
  - `MATCH ... WHERE time_window(...)`, `MATCH ... WHERE spatial_sphere(...)`,
    `CALL db.route.temporal(...)`, and `CALL db.impact.radius(...)`.
  - Property projection rows for `MATCH ... RETURN a.name, b.name` backed by
    `GraphNode4D::properties`.
- `GraphNode4D::properties` for attaching JSON metadata to spatial-temporal
  nodes.
- Runnable 4D demos for dependency timelines, impact-radius analysis,
  time-windowed route planning, signal propagation, temporal delivery,
  temporal bottleneck resilience, orbit constellation, metamaterial design,
  and protein conformation.
- Cypher-like query demos for match filters, temporal route, impact radius,
  bottlenecks, signal propagation, and disaster response.
- JSON export mode for each 4D demo via `-- --json`.
- Standalone repository metadata for crates.io publication.
- Public README describing the spatial CFG and graph-analysis use case.
- GPL-3.0-only license file.

### Fixed

- Corrected CFG octree persistence tests to query the same `z` coordinate used
  by stored CFG blocks.
- Fixed doctest snippets in path and sectioned-storage documentation.

## [0.1.0] – 2026-04-27

### Added

- Octree spatial indexing and Morton encoding primitives.
- Sectioned `.geo` storage helpers for graph, CFG, and symbol metadata sections.
- CFG store for spatially indexing control-flow blocks.
- Graph algorithms for A*, dominance, natural loops, SCCs, slicing,
  transitive closure/reduction, and topological sorting.
- Optional telemetry feature for instrumentation.
