Skip to content

Conversation

@FUDCo
Copy link
Contributor

@FUDCo FUDCo commented Jan 23, 2026

Cleanup based on a close review of tests from my most recent PRs.


Note

Ensures crash recovery removes ACKed-but-not-deleted pending messages.

  • Add cleanupOrphanMessages(remoteId, startSeq) to store remote methods and export via kernel store
  • Invoke cleanupOrphanMessages from RemoteHandle.#restorePersistedState after restoring seq state; log deletions
  • Update recovery tests to expect orphan deletion (was ignored) and add focused tests for the new store method
  • Minor test fixture adjustments to use simple string payloads for pending messages

Written by Cursor Bugbot for commit 4319987. This will update automatically on new commits. Configure here.

- Add cleanupOrphanMessages store method to delete messages with seq < startSeq
- Call cleanup during RemoteHandle recovery to prevent accumulation
- Replace fake JSON test strings with simple placeholders

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@FUDCo FUDCo force-pushed the chip/cleanup-remote-tests branch from cf44950 to 4319987 Compare January 23, 2026 01:01
@FUDCo FUDCo marked this pull request as ready for review January 23, 2026 01:02
@FUDCo FUDCo requested a review from a team as a code owner January 23, 2026 01:02
@github-actions
Copy link
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 88.22%
⬇️ -0.15%
5702 / 6463
🔵 Statements 88.1%
⬇️ -0.14%
5794 / 6576
🔵 Functions 87.19%
⬇️ -0.31%
1484 / 1702
🔵 Branches 84.52%
⬆️ +0.09%
2059 / 2436
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/ocap-kernel/src/remotes/kernel/RemoteHandle.ts 84.42% 81.7% 84.44% 85.12% 338, 357-418, 453, 492, 499-501, 542-555, 898
packages/ocap-kernel/src/store/methods/remote.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
Generated in workflow #3302 for commit 4319987 by the Vitest Coverage Report Action

@FUDCo FUDCo added this pull request to the merge queue Jan 23, 2026
Merged via the queue into main with commit c03a052 Jan 23, 2026
29 checks passed
@FUDCo FUDCo deleted the chip/cleanup-remote-tests branch January 23, 2026 07:43
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.

3 participants