chore: fix all build warnings and add stabilization roadmap

- Fix 3× ResultShadowed in cypher.nim, recovery.nim, shell.nim
- Remove 6× UnusedImport in test files
- Build is now clean: 0 warnings, 294 tests pass
- Add 4-week stabilization plan to PLAN.md (Sessions 9.1–9.4)
This commit is contained in:
2026-05-17 03:47:17 +03:00
parent 5231724e77
commit 07a22d305d
7 changed files with 87 additions and 15 deletions
+3 -3
View File
@@ -164,10 +164,10 @@ proc processCommand*(state: var CliState, input: string): string =
of "history", "\\history":
if state.history.len == 0:
return "(no history)"
var result = ""
var res = ""
for i, h in state.history:
result &= " " & $(i + 1) & ": " & h & "\n"
return result
res &= " " & $(i + 1) & ": " & h & "\n"
return res
of "verbose":
state.verbose = not state.verbose
return "Verbose mode: " & (if state.verbose: "ON" else: "OFF")
-1
View File
@@ -212,7 +212,6 @@ proc executeCypher*(g: Graph, query: CypherQuery): CypherResult =
proc toCypher*(query: string): string =
## Convert basic BaraQL to Cypher-like syntax for graph queries
var result = ""
let upper = query.toUpper()
if upper.startsWith("SELECT") and upper.contains("MATCH"):
# Already Cypher-like
+5 -5
View File
@@ -136,19 +136,19 @@ proc analyze*(rec: CrashRecovery): RecoveryResult =
return rec.result
proc recover*(rec: CrashRecovery, db: LSMTree = nil): RecoveryResult =
let result = rec.analyze()
let analysis = rec.analyze()
if not result.applied:
return result
if not analysis.applied:
return analysis
if db == nil:
return result
return analysis
# REDO: apply committed entries (txnId < lastCommitted) to LSM-Tree
var redoCount = 0
var undoCount = 0
for entry in rec.entries:
if entry.txnId < result.lastTxn:
if entry.txnId < analysis.lastTxn:
# Committed — redo
if entry.isDelete:
db.delete(entry.key)