Skip to content

Commit 914aa8d

Browse files
hyperpolymathclaude
andcommitted
Remove template-only ABI files that falsely implied formal verification
Template Idris2 ABI files (Types.idr, Layout.idr, Foreign.idr) contained only RSR template scaffolding with unresolved placeholders and no domain-specific proofs. Removed to prevent false impression of formal verification coverage. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 0550824 commit 914aa8d

File tree

24 files changed

+120
-4404
lines changed

24 files changed

+120
-4404
lines changed

PROOF-NEEDS.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# PROOF-NEEDS.md — nextgen-databases
2+
3+
## Current State
4+
5+
- **src/abi/*.idr**: YES (in lithoglyph) — `BofigEntities.idr`, `GQLdt/ABI/Foreign.idr`
6+
- **Dangerous patterns**: 0 (4 references are documentation asserting "no believe_me" invariant)
7+
- **LOC**: ~202,000 (Rust + Idris2)
8+
- **ABI layer**: Lithoglyph has Idris2 ABI with constructive proofs, explicit no-believe_me policy
9+
10+
## What Needs Proving
11+
12+
| Component | What | Why |
13+
|-----------|------|-----|
14+
| VeriSimDB WAL correctness | Write-ahead log guarantees durability and ordering | WAL bugs cause data loss — the worst database bug |
15+
| VeriSimDB transaction isolation | ACID properties hold under concurrent access | Isolation violations corrupt data silently |
16+
| VeriSimDB ZKP bridge | Zero-knowledge proof generation is sound | Unsound ZKP breaks semantic verification |
17+
| VeriSimDB HNSW index | Vector similarity search returns correct nearest neighbours | Wrong results from vector search corrupt ML pipelines |
18+
| VeriSimDB query planner | Query optimization preserves result equivalence | Optimized query must return same results as unoptimized |
19+
| VeriSimDB drift detection | Drift detector correctly identifies schema changes | Missed drift causes silent data corruption |
20+
| Lithoglyph entity proofs | Extend BofigEntities constructive proofs | Current proofs cover basic entities; need full coverage |
21+
| QuandleDB algebraic laws | Quandle operations satisfy rack/quandle axioms | Mathematical structure must be correct by construction |
22+
23+
## Recommended Prover
24+
25+
**Idris2** — Lithoglyph already has constructive Idris2 proofs. VeriSimDB WAL and transaction proofs fit naturally. ZKP soundness may need **Coq** for deeper cryptographic proofs.
26+
27+
## Priority
28+
29+
**HIGH** — VeriSimDB is the standard database across the ecosystem. WAL correctness and transaction isolation are critical — bugs here corrupt data in every downstream project. The ZKP bridge is security-critical.
30+
31+
## Template ABI Cleanup (2026-03-29)
32+
33+
Template ABI removed -- was creating false impression of formal verification.
34+
The removed files (Types.idr, Layout.idr, Foreign.idr) contained only RSR template
35+
scaffolding with unresolved {{PROJECT}}/{{AUTHOR}} placeholders and no domain-specific proofs.

TEST-NEEDS.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# TEST-NEEDS.md — nextgen-databases
2+
3+
> Generated 2026-03-29 by punishing audit.
4+
5+
## Current State
6+
7+
| Category | Count | Notes |
8+
|-------------|-------|-------|
9+
| Unit tests | ~40 | VeriSimDB Elixir: consensus (kraft_node, kraft_wal, kraft_recovery, kraft_transport), federation adapters (mongodb, redis, duckdb, clickhouse, surrealdb, sqlite, neo4j, vector_db, influxdb, object_storage), resolver, adapter + base tests |
10+
| Integration | ~12 | Federation adapter integration tests (mongodb, redis, neo4j, clickhouse, surrealdb, influxdb) |
11+
| E2E | 0 | None |
12+
| Benchmarks | 2 | verisimdb/benches/modality_benchmarks.rs (Rust), lithoglyph core-factor benchmarks.factor |
13+
14+
**Source modules:** ~833 across 2 major subsystems. verisimdb: ~248 files (Rust core, Elixir orchestration, Gleam, Idris2 ABI, Zig FFI, ReScript). lithoglyph: ~212 files (Gleam, Rust, Factor).
15+
16+
## What's Missing
17+
18+
### P2P (Property-Based) Tests
19+
- [ ] Kraft consensus: property tests for leader election, log replication, partition tolerance
20+
- [ ] CRDT convergence: property tests for VeriSimDB's CRDT operations
21+
- [ ] VQL query parsing: arbitrary query fuzzing
22+
- [ ] Federation: property tests for data consistency across adapters
23+
- [ ] lithoglyph: data structure invariant tests
24+
25+
### E2E Tests
26+
- [ ] VeriSimDB: full write -> replicate -> read across nodes
27+
- [ ] Federation: write through adapter -> verify in external DB -> read back
28+
- [ ] Kraft consensus: cluster formation -> leader election -> write -> node failure -> recovery
29+
- [ ] lithoglyph: full lifecycle (create -> write -> query -> archive)
30+
- [ ] VQL: complex query execution with joins/aggregations
31+
32+
### Aspect Tests
33+
- **Security:** No tests for authentication bypass, unauthorized federation access, injection through VQL, data exfiltration across adapters
34+
- **Performance:** Rust modality benchmark exists. Missing: Elixir orchestration throughput, Kraft consensus latency, federation adapter comparison benchmarks
35+
- **Concurrency:** No tests for concurrent writes across Kraft nodes, federation adapter connection pooling, VQL query contention
36+
- **Error handling:** No tests for adapter connection failure, Kraft split-brain recovery, malformed VQL, storage corruption
37+
38+
### Build & Execution
39+
- [ ] `mix test` for VeriSimDB Elixir
40+
- [ ] `cargo test` for VeriSimDB Rust
41+
- [ ] `gleam test` for lithoglyph
42+
- [ ] Zig FFI tests
43+
- [ ] Container-based multi-node tests
44+
45+
### Benchmarks Needed
46+
- [ ] Write throughput (single node, cluster)
47+
- [ ] Read latency (hot, cold, cache miss)
48+
- [ ] Kraft consensus round-trip time
49+
- [ ] Federation adapter roundtrip per backend
50+
- [ ] VQL query execution time by complexity
51+
- [ ] lithoglyph query performance
52+
- [ ] Replication lag measurement
53+
54+
### Self-Tests
55+
- [ ] Cluster health self-check
56+
- [ ] Federation adapter connectivity verification
57+
- [ ] Data integrity checksums
58+
- [ ] WAL consistency validation
59+
60+
## Priority
61+
62+
**CRITICAL.** Two database systems with 833 source files and ~52 tests (6.2%). The consensus layer (Kraft) has 4 tests for a distributed consensus protocol — that is dangerously low. Federation adapters have decent unit coverage but zero E2E. lithoglyph appears to have no dedicated tests at all. A database with no concurrency tests is a ticking time bomb.
63+
64+
## FAKE-FUZZ ALERT
65+
66+
- `tests/fuzz/placeholder.txt` is a scorecard placeholder inherited from rsr-template-repo — it does NOT provide real fuzz testing
67+
- Replace with an actual fuzz harness (see rsr-template-repo/tests/fuzz/README.adoc) or remove the file
68+
- Priority: P2 — creates false impression of fuzz coverage

lithoglyph/analytics/src/abi/Foreign.idr

Lines changed: 0 additions & 226 deletions
This file was deleted.

0 commit comments

Comments
 (0)