feat: wal durability - #27
Merged
Merged
Conversation
+ integrate storage durability into runtime and CLI + add custom WAL recovery, batching, acknowledgements, and fsync modes + add SQLite and WAL performance benchmarks + update HLC initialization and ignore database artifacts
+ batch queued requests into one fsync + enforce record, field, queue, and mutation limits + mark terminal writer failures and reject pending work + distinguish torn tails from corrupt WAL records
expose durability as a build option and use it when opening storage, with benchmarks reduced to a single inference iteration.
+ add queue capacity checks before publishing facts + defer eventual WAL cleanup until flush completion + expose queue fullness through DirtyQueue
Merging this PR will degrade performance by 14.58%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ❌ | runtime.execution |
7.4 s | 8.6 s | -14.58% |
| 🆕 | runtime.storage |
N/A | 2.1 ms | N/A |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing wal-durability (5bc15e9) with dev (89658db)
notxorand
force-pushed
the
wal-durability
branch
from
September 5, 2026 09:07
52ab58f to
f6ff9f9
Compare
notxorand
force-pushed
the
wal-durability
branch
from
September 5, 2026 09:48
13e48d1 to
1782f23
Compare
notxorand
force-pushed
the
wal-durability
branch
from
September 5, 2026 11:14
8b99e5e to
e631503
Compare
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.
closes: #21
Greptile Summary
This PR introduces a custom write-ahead log and integrates durable source ingestion and cascade checkpoints into the inference runtime.
Confidence Score: 5/5
No new actionable issue was established by the changes since the previous review, so the PR appears safe to merge.
The latest change guards strict rollback with the originally published timestamp, preventing failed writes from replacing a newer fact. All eight earlier Greptile threads were manually resolved without explanatory replies and therefore do not remain in the merge-safety scoring set.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD S[Source event] --> P[Persist source mutation] P --> W[WAL batch checkpoint] W --> D[Durable pending entry] D --> I[Inference loop] I --> L[Update in-memory LWW cache] L --> C[Accumulate cascade outputs] C --> F[Flush cascade checkpoint] F --> A[Acknowledge source pending entry] F --> R[Recover facts and pending work after restart]Reviews (5): Last reviewed commit: "fix: protect strict rollback state" | Re-trigger Greptile