Skip to content

feat: Phase 0 — QumuloDB foundation scaffold - #1

Open
SST-Engineering wants to merge 2 commits into
mainfrom
feat/foundation-scaffold
Open

feat: Phase 0 — QumuloDB foundation scaffold#1
SST-Engineering wants to merge 2 commits into
mainfrom
feat/foundation-scaffold

Conversation

@SST-Engineering

Copy link
Copy Markdown
Owner

What this is

The first PR for QumuloDB — the purpose-built project management database engine for the 21st century.

This is Phase 0: the complete foundation. Every type, every engine, and the full storage architecture is scaffolded and ready to build on.


What's in this PR

qdb-contract — Kernel boundary types

The single source of truth for every type that crosses the computation boundary. Pure data structs — no I/O, no async, no platform code. Compiles to wasm32-unknown-unknown unchanged.

  • calendarKernelCalendar, CalendarException with working-time arithmetic
  • scheduleActivityInput/Result, DependencyInput, ScheduleRequest/Result, ScheduleWarning
  • evmEVMPeriodInput/Result, EVMRequest, EVMResult (all standard EVM metrics)
  • simulationRiskInput, SimulationRequest/Result, HistogramBin, TornadoEntry, RiskContributionResult
  • resourcesResourceInput, AssignmentInput, ResourceRequest/Result, PeriodLoadResult, LevellingAdjustment

qdb-kernel — Computation engines

Pure functions. No I/O. The kernel IS the product.

Engine Implementation
CPM Scheduling Forward/backward pass, FS/SS/FF/SF deps with lag, ASAP/MSO/MFO/SNET/SNLT/FNET/FNLT constraints, working-time calendar arithmetic, total float, critical path, deadline warnings
EVM PV/EV/AC, CV/SV/CPI/SPI, EAC (CPI/SPI/remaining/manual methods), ETC/VAC/TCPI, S-curve period breakdown
Monte Carlo PERT-Beta/Triangular/Uniform/Fixed distributions, configurable iterations + seed, percentile outputs, Pearson correlation, tornado chart
Resources Per-resource period load profiles, over-allocation detection, utilisation ratios, total cost

qdb-store — Storage layer

Three-tier architecture using Apache Arrow, Parquet, and DataFusion as building materials:

  • Hot tier: Apache Arrow RecordBatch sessions per project — zero-copy in-memory access
  • Warm tier: Apache Parquet files, append-only, immutable, column-pruned reads
  • Query tier: Apache DataFusion SQL engine — registers Arrow tables and Parquet scans

Bitemporal schema on every table: valid_from/valid_to (world time) + txn_from/txn_to (system time).

qdb-cliqdb binary

# Schedule
echo '{...}' | qdb schedule

# EVM
qdb evm --input evm.json --output result.json

# Simulate
qdb simulate --input risks.json --persist

# Resources
qdb resources --input resources.json

# Read back
qdb get schedule PROJ-001

CI

  • Build + test on ubuntu-latest
  • Clippy (deny warnings)
  • rustfmt check
  • WASM compile check for qdb-contract and qdb-kernel

Docs

  • docs/architecture.md — full three-tier storage, bitemporal model, crate graph, Gentia/Artemis parallel
  • docs/qql.md — QQL language reference with AS OF VALID TIME, SCHEDULE_PERIOD OVERLAPS, native CPM/EVM columns

Design principles

"The computation kernel IS the product. One Rust codebase compiles to native binary, WASM (browser), iOS/Android FFI, and CLI — same intelligence on every surface."

QumuloDB draws its philosophy from Artemis (1977) and Gentia (1990s) — systems where the project model was the engine, not a layer over a general-purpose database. Artemis A2 had TIME, PERIOD, CALENDAR, ACTIVITY, RESOURCE, and COST-ACCOUNT as first-class language primitives. QumuloDB pursues the same idea in Rust for the 2020s and beyond.


Roadmap from here

Phase Focus
0 ✅ This PR — contract + kernel + store + CLI scaffold
1 Full CPM engine hardening + calendar arithmetic edge cases
2 Resource levelling algorithm
3 Full Arrow/Parquet bitemporal writes
4 DataFusion QQL extensions (AS OF VALID TIME, SCHEDULE_PERIOD OVERLAPS)
5 WASM build + browser Web Worker harness
6 Foresight engine — ML-driven delay prediction
7 CRDT sync protocol

🤖 Generated with Claude Code

Simon Rolph and others added 2 commits May 11, 2026 07:14
Establishes the complete QumuloDB foundation:

**qdb-contract** — kernel boundary types (pure data, WASM-safe)
- calendar: KernelCalendar, CalendarException
- schedule: ActivityInput/Result, DependencyInput, ScheduleRequest/Result
- evm: EVMPeriodInput/Result, EVMRequest/EVMResult
- simulation: RiskInput, SimulationRequest/Result, HistogramBin, TornadoEntry
- resources: ResourceInput, AssignmentInput, ResourceRequest/Result

**qdb-kernel** — computation engines (pure functions, no I/O)
- CPM scheduling: forward/backward pass, float, critical path, constraints
- EVM: CV, SV, CPI, SPI, EAC (4 methods), TCPI, S-curve periods
- Monte Carlo: PERT-Beta, Triangular, Uniform distributions, tornado chart
- Resource loading: per-period utilisation, over-allocation detection

**qdb-store** — Apache Arrow + Parquet + DataFusion storage layer
- Bitemporal schema (valid_time + transaction_time on every table)
- In-memory hot tier (Arrow RecordBatch sessions)
- On-disk warm tier (Parquet append-only)
- DataFusion SQL query engine registration

**qdb-cli** — `qdb` CLI binary (schedule/evm/simulate/resources subcommands)

CI: build + test + WASM compile check for contract and kernel crates

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove unused `uuid` dep from qdb-contract (WASM-unsafe without js feature)
- Remove unused `uuid` and `rayon` deps from qdb-kernel
- Gate rand/rand_distr as native-only in qdb-kernel (SmallRng::from_entropy
  requires getrandom/js on wasm32-unknown-unknown; simulation runs server-side)
- cfg-gate simulation engine module out of wasm32 builds in engines/mod.rs
- Add rustfmt.toml with max_width=120 (Arrow/DataFusion types have long names)
- Remove trailing blank line from qdb-store/src/store.rs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant