(#9) Nest message log + replay #16

Merged
jacisjake merged 2 commits from task/9-nest-message-log into main 2026-10-28 06:09:12 +00:00
jacisjake commented 2026-10-28 06:02:54 +00:00 (Migrated from github.com)
  • Message struct per the #8 contract (nest_id, id, kind, author, text, to, refers_to, tagged_by, ts; MsgID() = <nest_id>-<n>).
  • MessageStore: append-only per nest, auto-incrementing ids, After(nestID,lastID) replay, All(); persisted as JSON Lines per nest (.crows/messages/<nest>.jsonl), loaded on startup, atomic tmp+rename save like NestStore.save().

Closes #9 · Epic: #2

Red (before):

vet: ./nestlog_test.go:9:7: undefined: NewMessageStore
./nestlog_test.go:53:29: undefined: Message
FAIL	somanycrows [build failed]

Green (after):

--- PASS: TestMessageLogAppendOrder
--- PASS: TestMessageLogReplayFrom
--- PASS: TestMessageLogPersists
go test -race -count=1 . → ok  somanycrows
- `Message` struct per the #8 contract (nest_id, id, kind, author, text, to, refers_to, tagged_by, ts; `MsgID()` = `<nest_id>-<n>`). - `MessageStore`: append-only per nest, auto-incrementing ids, `After(nestID,lastID)` replay, `All()`; persisted as JSON Lines per nest (`.crows/messages/<nest>.jsonl`), loaded on startup, atomic tmp+rename save like `NestStore.save()`. Closes #9 · Epic: #2 **Red (before):** ``` vet: ./nestlog_test.go:9:7: undefined: NewMessageStore ./nestlog_test.go:53:29: undefined: Message FAIL somanycrows [build failed] ``` **Green (after):** ``` --- PASS: TestMessageLogAppendOrder --- PASS: TestMessageLogReplayFrom --- PASS: TestMessageLogPersists go test -race -count=1 . → ok somanycrows ```
Sign in to join this conversation.