Repository navigation
PoC: Property Graph Engine with GQL-inspired Query Language - #2
Merged
Merged
Conversation
Replaced GraphQL parser with custom GQL (Graph Query Language) implementation featuring: - Property graph model (nodes, edges with labels and typed properties) - Thread-safe in-memory storage using Arc/RwLock - Query parser supporting CREATE, MATCH, and SHOW commands - Query executor with validation - Interactive REPL console - Comprehensive test coverage (20 tests) Architecture changes: - Added graph module (types, storage) - Added query module (parser, executor) - Added repl module for interactive console - Removed server module (logger, error_codes) - Updated dependencies (removed graphql-parser, added serde/anyhow/uuid) - Updated README with usage examples and documentation Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Added EOF detection in REPL to exit gracefully when stdin closes - Previously read_line returning Ok(0) caused infinite loop with piped input - Removed schema.gql.example as it's not needed for in-memory storage Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Replaced outdated references to graphql-parser and src/server/ module - Documented current architecture: graph, query, and repl modules - Added comprehensive query syntax examples - Updated to reflect in-memory storage (not RocksDB) - Documented test coverage (19 unit tests + 1 integration test) - Added notes on EOF handling, thread-safety, and property types - Listed future work items Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Added comprehensive GQL ISO/IEC 39075:2024 compliance status to README - Current implementation: ~2-5% of full spec - Documented implemented features vs. missing features - Categorized missing features: patterns, clauses, expressions, aggregations, etc. - Added 8-phase roadmap to eventual spec compliance - Updated CLAUDE.md to reference compliance status upfront - Sets realistic expectations: this is a learning project, not a compliant implementation Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Created PHILOSOPHY.md: - Defines Minigraf as "the SQLite of graph databases" - 10 core principles: zero-config, embedded-first, single-file, self-contained, cross-platform, reliability over features, stability, performance, documentation, long-term support - Clear boundaries: what Minigraf IS and IS NOT - Target use cases (mobile, desktop, WASM, embedded) - Design decision framework for evaluating features - Testing philosophy inspired by SQLite's rigor - Evolution strategy from PoC to maturity - When to say "no" to preserve focus Updated CLAUDE.md: - Added mandatory philosophy compliance checking section - Requires assessment of all features/changes against PHILOSOPHY.md - Defines warning protocol when philosophy violations are detected - Provides template for philosophy violation warnings - Ensures future development adheres to "SQLite for graphs" vision This establishes the long-term vision and decision-making framework for the project, preventing scope creep and maintaining focus on embedded, reliable, local-first graph database. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
etc-sw
pushed a commit
to etc-sw/vicia-db
that referenced
this pull request
Jul 11, 2026
Why: harrekki P0 project-minigraf#2 — the resident daemon's perception is "what changed since my last tick"; export_fact_log() only offered a full export, so a small tail paid a committed full scan. A2 slice of docs/APP_ADOPTION_GAP_PLAN.md. Includes: CommittedFactReader::for_each_fact_since (default full-scan filter); CommittedFactLoaderImpl override — binary search over packed base pages via the tx-nondecreasing page invariant (last_tx_count probe in packed_pages.rs), falling back to the full filter on any non-packed or empty probe; LayeredFactLoaderImpl override — base probe plus in-memory delta filter; FactStorage::for_each_fact_since pending filter; public Minigraf::export_fact_log_since. Tests: CountingBackend page-read bound, layer-equivalence sweep, tx-nondecreasing invariant lock across base/delta/recompact, SinceOnlyLoader no-full-scan double, last_tx_count probe cases, 3 integration tests (filtered-subsequence equivalence, base/delta/pending spans, stored-cursor reopen poll), and the ignored 1M gate fixture. Verification: cargo test (1155 passed, 12 ignored); cargo test --release --test fact_log_since_benchmark -- --ignored --nocapture (100-record base tail 91µs cold vs 256ms full export at 1M facts); cargo clippy --all-targets error set identical to main (3 pre-existing). Known gaps: page probe falls back to a full-scan filter if a non-packed or zero-record page appears inside the committed fact-page range (no current writer path produces one); delta filter cost is proportional to total delta size, not per-segment skip — acceptable while maintenance bounds delta growth. Confidence: high Scope-risk: narrow Reversibility: clean Tested: cargo test; cargo test --release --test fact_log_since_benchmark -- --ignored --nocapture; cargo clippy --all-targets Rejected: watermark-only base skip | degrades to a committed full scan the tick after any recompact folds the tail into the base
vizanto
added a commit
to axe-scale/minigraf
that referenced
this pull request
Jul 14, 2026
…gelog - BENCHMARKS-FORK.md: fresh 2026-07-14 measurements — rules bands 1.8/10.8-11.1/98ms, 60k grid (two-hop 1.8ms LFTJ, ordered k=1 0.01ms), temporal grid, zone-map file evidence UPGRADED from historical to fresh (as-of 75.1->50.2ms, 50.61% pages skipped; poisoned valid-at 0% as designed), H18 release gate PASSED fresh (139.4s, zero MISMATCH, LFTJ <=1.10x regret on every class), 965k CPG spike re-run fresh (TSV regenerated from the spike parquet: load 2,893ms, warm bound closure 398.8ms, unbound 7,892ms, no truncation). - docs/UPSTREAM-REPORTS.md (new): four filing-ready reports; repros for project-minigraf#1 (u16 saturation: probe 0 rows, scan exactly 65,536/70,000) and project-minigraf#2 (multi-value collapse: 1 row vs 2) RUN AND CONFIRMED against upstream cbf899e; project-minigraf#3 verified-by-inspection (lines confirmed inside migrate_v5_to_v6); project-minigraf#4 red-reproduced on pre-fix code via git-archive. Plus fork-dialect notes (avg, :limit, :order-by, :max-results). - CHANGELOG-FORK.md (new): all 18 commits, one-liners verified against commit bodies. - minigraf-bench/README + design docs: temporal-workload usage note, landed-since annotations. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Co-Authored-By: Codex GPT-5.6 Terra <noreply@openai.com>
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.
Overview
This PR introduces a working proof-of-concept for Minigraf - a tiny, portable GQL (Graph Query Language) engine written in Rust. The implementation demonstrates the core functionality needed for an embedded graph database following the "SQLite for graph databases" philosophy.
What's Included
Core Implementation
Property Graph Model:
Storage Engine:
Arc<RwLock<HashMap>>Query Language:
CREATE NODE (:Label) {prop: value}- Create nodes with labels/propertiesCREATE EDGE (id1)-[LABEL]->(id2) {prop: value}- Create edgesMATCH (:Label) [WHERE prop = value]- Query nodesMATCH -[:LABEL]->- Query edgesSHOW NODES/SHOW EDGES- List all entitiesHELP/EXIT- Console commandsInteractive REPL:
minigraf>)Testing & Quality
Test Coverage:
Documentation
Project Philosophy:
PHILOSOPHY.md- "SQLite for graph databases" design principlesDeveloper Guidance:
CLAUDE.md- Instructions for AI-assisted developmentUser Documentation:
README.md- Complete getting started guideTechnical Summary:
POC_SUMMARY.md- Implementation details and test resultsKey Design Decisions
In-Memory Storage: Switched from RocksDB to in-memory storage for the PoC to avoid compilation complexity. File-based persistence is planned for Phase 2.
Embedded-First: Library design, not client-server. Runs in-process with the application.
Simplified GQL: Implements a useful subset of ISO/IEC 39075:2024 GQL spec, prioritizing learning and practical use over full compliance.
Thread-Safe: Storage uses Arc/RwLock allowing safe concurrent access.
Zero-Configuration: No setup required - just
cargo runand start querying.Example Usage