Skip to content

🐛 fix(session): deliver completion notifications reliably - #50

Open
zrr1999 wants to merge 3 commits into
mainfrom
fix/session-completion-notification-delivery
Open

🐛 fix(session): deliver completion notifications reliably#50
zrr1999 wants to merge 3 commits into
mainfrom
fix/session-completion-notification-delivery

Conversation

@zrr1999

@zrr1999 zrr1999 commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

User impact

Session request completions could be persisted without reliably notifying and waking the originating session, especially when channel ingress was disabled or the daemon restarted between completion and delivery.

Root cause

Completion notification was an in-memory follow-up after invocation completion. A process stop, unavailable sender session, or wake projection failure could lose that follow-up even though the source invocation had completed successfully.

Fix

  • Persist completion-delivery state atomically with invocation completion.
  • Reconcile durable delivery records independently of channel ingress, including after daemon restart.
  • Use an atomic claim lease so concurrent reconcilers cannot deliver the same record simultaneously and abandoned claims can be retried.
  • Preserve exactly-once mail persistence and sender wake projection across retries.
  • Keep the formatter-only session runner change in its own commit before the functional commit.

Validation

  • Spark daemon full suite: 64 files, 588 tests passed.
  • Spark session suite: 4 files, 44 tests passed.
  • Session tool focused suite: 17 tests passed; root focused session/repro total was 30 tests.
  • Root typecheck passed with no errors.
  • Dependency boundary check passed.
  • Full repository format check passed.
  • Git diff check passed.

@zrr1999 zrr1999 changed the title Fix reliable session completion notification delivery 🐛 fix(session): deliver completion notifications reliably Jul 29, 2026
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.

1 participant