[habit][library] Habit: the local day with rollover, days read, the forgiving weekly streak, the reminder schedule, medals as a pure function of the log; sessions carry their UTC offset

This commit is contained in:
2026-11-17 11:58:09 +01:00
parent b9462af39f
commit 9a2ba174ce
15 changed files with 822 additions and 9 deletions
+3 -1
View File
@@ -11,11 +11,13 @@ crates/liber-format EPUB 2/3, FB2 (+ .fb2.zip), TXT, DRM-free MOBI/AZW3 -> on
writer; the sanitizer (whitelist, no scripts, no remote URLs); positions (CFI + text quote)
crates/liber-library book identity (ISBN, text fingerprint), the library model, the event log and its merge
(sync semantics), stats, Goodreads/StoryGraph CSV import, the liber-export format
crates/liber-habit Day 2: the local day (the only day computation in Liber), days read, the forgiving streak,
the reminder schedule, the medal rules (a pure function of the log)
fixtures-fetch/ sha256-pinned hostile corpora -> fixtures/fetched/ (never in git; the tests generate theirs)
docs/ FORMATS.md (formats, limits, positions, DRM), DEPENDENCIES.md (every crate, its licence)
scripts/deps.mjs regenerates the crate table in DEPENDENCIES.md; exits 1 on a licence outside the allowed set
```
Direction: `liber-library -> liber-format`. Neither crate opens files, sockets or reads the clock: bytes in, values
Direction: `liber-habit -> liber-library -> liber-format`. Neither crate opens files, sockets or reads the clock: bytes in, values
out; time and ids are parameters (`tests/purity.rs` checks the sources).
## Commands