Skip to content

Commit 849848d

Browse files
committed
feat: crash recovery and warmup enforcement (v1.8.0)
1 parent 3dbac8b commit 849848d

File tree

4 files changed

+38
-4
lines changed

4 files changed

+38
-4
lines changed

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,40 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [1.8.0] - 2026-01-25
6+
7+
### 🩹 Crash Recovery - "Trauma-Aware Restart"
8+
9+
MindFry now remembers how it was shut down and adapts accordingly.
10+
11+
### Added
12+
13+
- **`recovery.rs`**: Trauma detection on startup
14+
- `RecoveryState::Normal` — Clean restart
15+
- `RecoveryState::Shock` — Unclean shutdown (no graceful marker)
16+
- `RecoveryState::Coma` — Prolonged downtime (>1 hour)
17+
- **`RecoveryAnalyzer`**: Analyzes shutdown marker on startup
18+
- **`ShutdownMarker`**: Persisted to sled before graceful exit
19+
- **Warmup Enforcement**: Handler rejects ops during resurrection
20+
- `Ping` and `Stats` always allowed (exempt)
21+
- Other ops return `ErrorCode::WarmingUp`
22+
- **Stability Benchmark**: 10 new benchmarks, all sub-microsecond
23+
- `recovery_analyzer_analyze`: 1.21 ns
24+
- `warmup_tracker_is_ready`: 1.19 ns
25+
- `exhaustion_level_from_energy`: 715 ps
26+
27+
### Changed
28+
29+
- `CommandHandler` now accepts `WarmupTracker` via `with_warmup()`
30+
- `AkashicStore` has `read_shutdown_marker()` / `write_shutdown_marker()`
31+
32+
### Technical
33+
34+
- 89/89 tests passing (+6 recovery tests)
35+
- Server startup shows recovery state: `(clean)`, `(SHOCK detected)`, `(COMA detected)`
36+
37+
---
38+
539
## [1.7.0] - 2026-01-24
640

741
### 🛡️ Stability Layer - "Self-Healing Infrastructure"

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mindfry"
3-
version = "1.7.0"
3+
version = "1.8.0"
44
edition = "2021"
55
authors = ["Erdem Arslan <erdemarslan@ymail.com>"]
66
description = "Memory with a Conscience"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
> _"Databases store data. MindFry_ **_feels_** _it."_
66
77
[![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](LICENSE)
8-
[![Tests](https://img.shields.io/badge/tests-83%20passing-brightgreen)]()
9-
[![Version](https://img.shields.io/badge/version-1.7.0-blue)]()
8+
[![Tests](https://img.shields.io/badge/tests-89%20passing-brightgreen)]()
9+
[![Version](https://img.shields.io/badge/version-1.8.0-blue)]()
1010

1111
---
1212

0 commit comments

Comments
 (0)