Skip to content

fix: preserve full peer inbox messages and report overflow - #893

Merged
justrach merged 5 commits into
release/v0.0.298from
fix/peer-inbox-loss
Sep 14, 2026
Merged

fix: preserve full peer inbox messages and report overflow#893
justrach merged 5 commits into
release/v0.0.298from
fix/peer-inbox-loss

Conversation

@yxlyx

@yxlyx yxlyx commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

What changed

Retain complete peer message bodies and sender names, report dropped-message counts, and preserve loss accounting across resume. Failed inbox reads return an error without consuming unread state.

Why

Clipped previews, silent eviction, and clearing after formatting failures made incomplete reads appear successful. Keep the bounded eight-message pull inbox rather than introducing an unbounded queue; full messages use more memory, while wakes remain short.

Verification

  • scripts/eval-tier1.sh — full pre-push gate passed: 2,244 unit tests, 589 TUI tests, all 19 PTY probes, formatting, source-size, reachability, invariants, and SDK drift checks.
  • python3 scripts/eval-tier2.py --only peer-inbox-preserves-live-body-865 — passed full-body delivery and empty second read.
  • python3 scripts/eval-tier2.py --only peer-inbox-live-multidrain-overflow-unicode-clear-865 — passed cumulative overflow, exact retained order and Unicode bodies, clearing, and fresh delivery without stale loss.
  • 22 added unit tests cover content ownership, parking/read allocation failures and leaks, 960 deterministic state transitions, malformed snapshots, fingerprints, and resume compatibility. The storage allocator override is test-only; production keeps its existing allocator.
  • All checks passed for the current head. The native macOS visual job initially missed a wheel-input event and passed on rerun without code changes.

Fixes #865.

justrach and others added 5 commits September 13, 2026 08:35
Clipped previews and silent eviction made inbox reads appear complete when they were not. Own full message strings, persist loss accounting across resume, and clear unread state only after the complete read result is allocated. Keep the bounded pull mailbox and advisory wakes.

Cover content ownership, overflow, allocation-failure retries through inbox dispatch, legacy resume, and live delivery. Fixes #865.
Exercise parking allocation failures with leak-tracked storage, mixed mailbox transitions against an independent FIFO, malformed and escaped snapshots, and live overflow across multiple drains. A test-only allocator override makes storage ownership failures observable without changing the production allocator.
@justrach
justrach changed the base branch from main to release/v0.0.298 September 14, 2026 11:47
@justrach
justrach merged commit 12d7c6d into release/v0.0.298 Sep 14, 2026
9 of 10 checks passed
@justrach
justrach deleted the fix/peer-inbox-loss branch September 14, 2026 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Peer inbox silently truncates messages and hides queue overflow

2 participants