Skip to content

Fix 5 bugs: persistence, join-links, stack overflow, storage ordering, pinned messages#97

Merged
intendednull merged 1 commit into
mainfrom
claude/plan-bug-fixes-tests-gvUBW
Apr 8, 2026
Merged

Fix 5 bugs: persistence, join-links, stack overflow, storage ordering, pinned messages#97
intendednull merged 1 commit into
mainfrom
claude/plan-bug-fixes-tests-gvUBW

Conversation

@intendednull
Copy link
Copy Markdown
Owner

Summary

Test plan

  • 14 new tests added across 4 crates
  • cargo fmt — clean
  • cargo clippy -D warnings — zero warnings
  • cargo test --workspace — all pass (0 failures)
  • WASM compilation — cargo check --target wasm32-unknown-unknown passes

https://claude.ai/code/session_01WYFM1sZdwSPoQF8CakdCZm

…, pinned messages (#44, #45, #61, #83, #94)

- #61: Add missing `pinned_messages: BTreeSet<EventHash>` field to
  `willow_channel::Channel` with serde(default) for backward compat.
  Add state-level pin/unpin tests.

- #44: PersistEvent handler now writes events to disk via new
  `storage::save_events()`/`load_events()` functions, following the
  same pattern as PersistServerState. Add round-trip storage tests.

- #94: Replace recursive `insert_and_apply()` with iterative VecDeque
  work queue to prevent stack overflow on deep pending chains (3000+).
  Cache pending count in PendingBuffer for O(1) evict_to instead of
  O(n²). Add deep-chain and eviction performance tests.

- #83: Change history() ORDER BY from `timestamp_hint_ms DESC` to
  `seq DESC, hash ASC` for deterministic ordering. Replace silent
  `.ok()` in 6 locations with `tracing::warn!` logging for corrupt
  event data and DB read errors. Add deterministic ordering and
  corruption resilience tests.

- #45: Wire `server_registry` into `ListenerCtx` and replace hardcoded
  `None::<String>` in JoinRequest handler with actual invite generation
  via `invite::generate_invite()`. Add invite-via-endpoint-id test.

https://claude.ai/code/session_01WYFM1sZdwSPoQF8CakdCZm
@intendednull intendednull merged commit 9e77b32 into main Apr 8, 2026
4 checks passed
@intendednull intendednull deleted the claude/plan-bug-fixes-tests-gvUBW branch April 8, 2026 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment