Skip to content

feat(mls/database): add ProcessPendingSelfRemove Task variant#335

Merged
insipx merged 1 commit into
mainfrom
insipx/task-process-pending-self-remove
Jun 8, 2026
Merged

feat(mls/database): add ProcessPendingSelfRemove Task variant#335
insipx merged 1 commit into
mainfrom
insipx/task-process-pending-self-remove

Conversation

@insipx

@insipx insipx commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Adds a third Task oneof variant, ProcessPendingSelfRemove { group_id } (tag 3), to proto/mls/database/task.proto.

Why

libxmtp is converting the poll-based PendingSelfRemoveWorker into a durable, event-driven task on the existing TaskRunner. When a LeaveRequest is received, libxmtp records a pending_remove row; a super-admin client must then build the MLS RemoveProposal/Commit to actually evict the member. Folding this into the TaskRunner gives it persistence-across-restart, retry, and exponential backoff for free — but requires a Task variant to represent the work.

This is the upstream-proto prerequisite for the libxmtp stacked PR (insipx/event-driven-self-remove). Once this merges, libxmtp regenerates via dev/gen_protos.sh and consumes tag 3.

Compatibility

Additive only — new oneof field with a fresh tag (3). No existing field changed; backward compatible.

🤖 Generated with Claude Code

Note

Add ProcessPendingSelfRemove task variant to MLS database proto

Adds a new ProcessPendingSelfRemove message and a corresponding process_pending_self_remove oneof variant (field 3) to the Task message in task.proto. The new message carries a single group_id bytes field to identify the group for which a pending self-remove should be processed.

Macroscope summarized cd67a68.

insipx added a commit to xmtp/libxmtp that referenced this pull request Jun 8, 2026
…mtp/proto#335)

Stacked on insipx/event-driven-disappearing.

Adds the proto-independent piece of folding PendingSelfRemoveWorker into the
TaskRunner: a shared MlsGroup::process_pending_self_removals() helper (remove +
cleanup) callable from both the inline fast-path and the durable task dispatch.

BLOCKED: the remaining work (ProcessPendingSelfRemove Task proto variant,
in-txn dedup enqueue at the LeaveRequest write site, TaskRunner dispatch arm,
deletion of the old worker) depends on the regenerated proto type from
xmtp/proto#335. Complete via dev/gen_protos.sh once that PR merges.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@insipx
insipx marked this pull request as ready for review June 8, 2026 21:38
@insipx
insipx requested a review from a team as a code owner June 8, 2026 21:38
@macroscopeapp

macroscopeapp Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved

Additive protobuf schema change that adds a new Task variant without modifying existing fields or behavior. The change is backwards-compatible and authored by the designated code owner of the modified file.

You can customize Macroscope's approvability policy. Learn more.

@insipx
insipx requested a review from tylerhawkes June 8, 2026 21:39
insipx added a commit to xmtp/libxmtp that referenced this pull request Jun 8, 2026
…mtp/proto#335)

Stacked on insipx/event-driven-disappearing.

Adds the proto-independent piece of folding PendingSelfRemoveWorker into the
TaskRunner: a shared MlsGroup::process_pending_self_removals() helper (remove +
cleanup) callable from both the inline fast-path and the durable task dispatch.

BLOCKED: the remaining work (ProcessPendingSelfRemove Task proto variant,
in-txn dedup enqueue at the LeaveRequest write site, TaskRunner dispatch arm,
deletion of the old worker) depends on the regenerated proto type from
xmtp/proto#335. Complete via dev/gen_protos.sh once that PR merges.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@insipx
insipx merged commit e6f640a into main Jun 8, 2026
7 checks passed
@insipx
insipx deleted the insipx/task-process-pending-self-remove branch June 8, 2026 21:45
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 3.93.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

insipx added a commit to xmtp/libxmtp that referenced this pull request Jun 8, 2026
Replace the 2s-poll PendingSelfRemoveWorker with a durable TaskRunner task.

On receiving a LeaveRequest, enqueue a ProcessPendingSelfRemove task in the
SAME db transaction as the pending_remove insert (atomic, restart-safe),
deduped per group via a pre-insert existence check. The inline admin fast-path
is kept; the task is the retry/backstop (TaskRunner gives backoff + persistence
across restart). Dispatch loads the group and runs the shared
MlsGroup::process_pending_self_removals() helper (remove + cleanup), called from
both the inline path and the task.

Deletes PendingSelfRemoveWorker, its WorkerKind, and registration; updates the
wasm/mobile/node bindings that mirrored the WorkerKind enum.

Adds the ProcessPendingSelfRemove Task proto variant (xmtp/proto#335) via
regenerated protos. The proto regen also pulls accumulated upstream drift in
unrelated message_api/message_contents/xmtpv4 gen files (the committed gen
lagged its pin); the only intentional proto change is ProcessPendingSelfRemove.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
insipx added a commit to xmtp/libxmtp that referenced this pull request Jun 8, 2026
Replace the 2s-poll PendingSelfRemoveWorker with a durable TaskRunner task.

On receiving a LeaveRequest, enqueue a ProcessPendingSelfRemove task in the
SAME db transaction as the pending_remove insert (atomic, restart-safe),
deduped per group via a pre-insert existence check. The inline admin fast-path
is kept; the task is the retry/backstop (TaskRunner gives backoff + persistence
across restart). Dispatch loads the group and runs the shared
MlsGroup::process_pending_self_removals() helper (remove + cleanup), called from
both the inline path and the task.

Deletes PendingSelfRemoveWorker, its WorkerKind, and registration; updates the
wasm/mobile/node bindings that mirrored the WorkerKind enum.

Adds the ProcessPendingSelfRemove Task proto variant (xmtp/proto#335) via
regenerated protos. The proto regen also pulls accumulated upstream drift in
unrelated message_api/message_contents/xmtpv4 gen files (the committed gen
lagged its pin); the only intentional proto change is ProcessPendingSelfRemove.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
insipx added a commit to xmtp/libxmtp that referenced this pull request Jun 8, 2026
Replace the 2s-poll PendingSelfRemoveWorker with a durable TaskRunner task.

On receiving a LeaveRequest, enqueue a ProcessPendingSelfRemove task in the
SAME db transaction as the pending_remove insert (atomic, restart-safe),
deduped per group via a pre-insert existence check. The inline admin fast-path
is kept; the task is the retry/backstop (TaskRunner gives backoff + persistence
across restart). Dispatch loads the group and runs the shared
MlsGroup::process_pending_self_removals() helper (remove + cleanup), called from
both the inline path and the task.

Deletes PendingSelfRemoveWorker, its WorkerKind, and registration; updates the
wasm/mobile/node bindings that mirrored the WorkerKind enum.

Adds the ProcessPendingSelfRemove Task proto variant (xmtp/proto#335) via
regenerated protos. The proto regen also pulls accumulated upstream drift in
unrelated message_api/message_contents/xmtpv4 gen files (the committed gen
lagged its pin); the only intentional proto change is ProcessPendingSelfRemove.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
insipx added a commit to xmtp/libxmtp that referenced this pull request Jun 8, 2026
Replace the 2s-poll PendingSelfRemoveWorker with a durable TaskRunner task.

On receiving a LeaveRequest, enqueue a ProcessPendingSelfRemove task in the
SAME db transaction as the pending_remove insert (atomic, restart-safe),
deduped per group via a pre-insert existence check. The inline admin fast-path
is kept; the task is the retry/backstop (TaskRunner gives backoff + persistence
across restart). Dispatch loads the group and runs the shared
MlsGroup::process_pending_self_removals() helper (remove + cleanup), called from
both the inline path and the task.

Deletes PendingSelfRemoveWorker, its WorkerKind, and registration; updates the
wasm/mobile/node bindings that mirrored the WorkerKind enum.

Adds the ProcessPendingSelfRemove Task proto variant (xmtp/proto#335) via
regenerated protos. The proto regen also pulls accumulated upstream drift in
unrelated message_api/message_contents/xmtpv4 gen files (the committed gen
lagged its pin); the only intentional proto change is ProcessPendingSelfRemove.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
insipx added a commit to xmtp/libxmtp that referenced this pull request Jun 8, 2026
Replace the 2s-poll PendingSelfRemoveWorker with a durable TaskRunner task.

On receiving a LeaveRequest, enqueue a ProcessPendingSelfRemove task in the
SAME db transaction as the pending_remove insert (atomic, restart-safe),
deduped per group via a pre-insert existence check. The inline admin fast-path
is kept; the task is the retry/backstop (TaskRunner gives backoff + persistence
across restart). Dispatch loads the group and runs the shared
MlsGroup::process_pending_self_removals() helper (remove + cleanup), called from
both the inline path and the task.

Deletes PendingSelfRemoveWorker, its WorkerKind, and registration; updates the
wasm/mobile/node bindings that mirrored the WorkerKind enum.

Adds the ProcessPendingSelfRemove Task proto variant (xmtp/proto#335) via
regenerated protos. The proto regen also pulls accumulated upstream drift in
unrelated message_api/message_contents/xmtpv4 gen files (the committed gen
lagged its pin); the only intentional proto change is ProcessPendingSelfRemove.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
insipx added a commit to xmtp/libxmtp that referenced this pull request Jun 8, 2026
Replace the 2s-poll PendingSelfRemoveWorker with a durable TaskRunner task.

On receiving a LeaveRequest, enqueue a ProcessPendingSelfRemove task in the
SAME db transaction as the pending_remove insert (atomic, restart-safe),
deduped per group via a pre-insert existence check. The inline admin fast-path
is kept; the task is the retry/backstop (TaskRunner gives backoff + persistence
across restart). Dispatch loads the group and runs the shared
MlsGroup::process_pending_self_removals() helper (remove + cleanup), called from
both the inline path and the task.

Deletes PendingSelfRemoveWorker, its WorkerKind, and registration; updates the
wasm/mobile/node bindings that mirrored the WorkerKind enum.

Adds the ProcessPendingSelfRemove Task proto variant (xmtp/proto#335) via
regenerated protos. The proto regen also pulls accumulated upstream drift in
unrelated message_api/message_contents/xmtpv4 gen files (the committed gen
lagged its pin); the only intentional proto change is ProcessPendingSelfRemove.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
insipx added a commit to xmtp/libxmtp that referenced this pull request Jun 9, 2026
Replace the 2s-poll PendingSelfRemoveWorker with a durable TaskRunner task.

On receiving a LeaveRequest, enqueue a ProcessPendingSelfRemove task in the
SAME db transaction as the pending_remove insert (atomic, restart-safe),
deduped per group via a pre-insert existence check. The inline admin fast-path
is kept; the task is the retry/backstop (TaskRunner gives backoff + persistence
across restart). Dispatch loads the group and runs the shared
MlsGroup::process_pending_self_removals() helper (remove + cleanup), called from
both the inline path and the task.

Deletes PendingSelfRemoveWorker, its WorkerKind, and registration; updates the
wasm/mobile/node bindings that mirrored the WorkerKind enum.

Adds the ProcessPendingSelfRemove Task proto variant (xmtp/proto#335) via
regenerated protos. The proto regen also pulls accumulated upstream drift in
unrelated message_api/message_contents/xmtpv4 gen files (the committed gen
lagged its pin); the only intentional proto change is ProcessPendingSelfRemove.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
insipx added a commit to xmtp/libxmtp that referenced this pull request Jun 9, 2026
Replace the 2s-poll PendingSelfRemoveWorker with a durable TaskRunner task.

On receiving a LeaveRequest, enqueue a ProcessPendingSelfRemove task in the
SAME db transaction as the pending_remove insert (atomic, restart-safe),
deduped per group via a pre-insert existence check. The inline admin fast-path
is kept; the task is the retry/backstop (TaskRunner gives backoff + persistence
across restart). Dispatch loads the group and runs the shared
MlsGroup::process_pending_self_removals() helper (remove + cleanup), called from
both the inline path and the task.

Deletes PendingSelfRemoveWorker, its WorkerKind, and registration; updates the
wasm/mobile/node bindings that mirrored the WorkerKind enum.

Adds the ProcessPendingSelfRemove Task proto variant (xmtp/proto#335) via
regenerated protos. The proto regen also pulls accumulated upstream drift in
unrelated message_api/message_contents/xmtpv4 gen files (the committed gen
lagged its pin); the only intentional proto change is ProcessPendingSelfRemove.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
insipx added a commit to xmtp/libxmtp that referenced this pull request Jun 9, 2026
Replace the 2s-poll PendingSelfRemoveWorker with a durable TaskRunner task.

On receiving a LeaveRequest, enqueue a ProcessPendingSelfRemove task in the
SAME db transaction as the pending_remove insert (atomic, restart-safe),
deduped per group via a pre-insert existence check. The inline admin fast-path
is kept; the task is the retry/backstop (TaskRunner gives backoff + persistence
across restart). Dispatch loads the group and runs the shared
MlsGroup::process_pending_self_removals() helper (remove + cleanup), called from
both the inline path and the task.

Deletes PendingSelfRemoveWorker, its WorkerKind, and registration; updates the
wasm/mobile/node bindings that mirrored the WorkerKind enum.

Adds the ProcessPendingSelfRemove Task proto variant (xmtp/proto#335) via
regenerated protos. The proto regen also pulls accumulated upstream drift in
unrelated message_api/message_contents/xmtpv4 gen files (the committed gen
lagged its pin); the only intentional proto change is ProcessPendingSelfRemove.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
insipx added a commit to xmtp/libxmtp that referenced this pull request Jun 9, 2026
Replace the 2s-poll PendingSelfRemoveWorker with a durable TaskRunner task.

On receiving a LeaveRequest, enqueue a ProcessPendingSelfRemove task in the
SAME db transaction as the pending_remove insert (atomic, restart-safe),
deduped per group via a pre-insert existence check. The inline admin fast-path
is kept; the task is the retry/backstop (TaskRunner gives backoff + persistence
across restart). Dispatch loads the group and runs the shared
MlsGroup::process_pending_self_removals() helper (remove + cleanup), called from
both the inline path and the task.

Deletes PendingSelfRemoveWorker, its WorkerKind, and registration; updates the
wasm/mobile/node bindings that mirrored the WorkerKind enum.

Adds the ProcessPendingSelfRemove Task proto variant (xmtp/proto#335) via
regenerated protos. The proto regen also pulls accumulated upstream drift in
unrelated message_api/message_contents/xmtpv4 gen files (the committed gen
lagged its pin); the only intentional proto change is ProcessPendingSelfRemove.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
insipx added a commit to xmtp/libxmtp that referenced this pull request Jun 9, 2026
Replace the 2s-poll PendingSelfRemoveWorker with a durable TaskRunner task.

On receiving a LeaveRequest, enqueue a ProcessPendingSelfRemove task in the
SAME db transaction as the pending_remove insert (atomic, restart-safe),
deduped per group via a pre-insert existence check. The inline admin fast-path
is kept; the task is the retry/backstop (TaskRunner gives backoff + persistence
across restart). Dispatch loads the group and runs the shared
MlsGroup::process_pending_self_removals() helper (remove + cleanup), called from
both the inline path and the task.

Deletes PendingSelfRemoveWorker, its WorkerKind, and registration; updates the
wasm/mobile/node bindings that mirrored the WorkerKind enum.

Adds the ProcessPendingSelfRemove Task proto variant (xmtp/proto#335) via
regenerated protos. The proto regen also pulls accumulated upstream drift in
unrelated message_api/message_contents/xmtpv4 gen files (the committed gen
lagged its pin); the only intentional proto change is ProcessPendingSelfRemove.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
insipx added a commit to xmtp/libxmtp that referenced this pull request Jun 9, 2026
Replace the 2s-poll PendingSelfRemoveWorker with a durable TaskRunner task.

On receiving a LeaveRequest, enqueue a ProcessPendingSelfRemove task in the
SAME db transaction as the pending_remove insert (atomic, restart-safe),
deduped per group via a pre-insert existence check. The inline admin fast-path
is kept; the task is the retry/backstop (TaskRunner gives backoff + persistence
across restart). Dispatch loads the group and runs the shared
MlsGroup::process_pending_self_removals() helper (remove + cleanup), called from
both the inline path and the task.

Deletes PendingSelfRemoveWorker, its WorkerKind, and registration; updates the
wasm/mobile/node bindings that mirrored the WorkerKind enum.

Adds the ProcessPendingSelfRemove Task proto variant (xmtp/proto#335) via
regenerated protos. The proto regen also pulls accumulated upstream drift in
unrelated message_api/message_contents/xmtpv4 gen files (the committed gen
lagged its pin); the only intentional proto change is ProcessPendingSelfRemove.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
insipx added a commit to xmtp/libxmtp that referenced this pull request Jun 9, 2026
Replace the 2s-poll PendingSelfRemoveWorker with a durable TaskRunner task.

On receiving a LeaveRequest, enqueue a ProcessPendingSelfRemove task in the
SAME db transaction as the pending_remove insert (atomic, restart-safe),
deduped per group via a pre-insert existence check. The inline admin fast-path
is kept; the task is the retry/backstop (TaskRunner gives backoff + persistence
across restart). Dispatch loads the group and runs the shared
MlsGroup::process_pending_self_removals() helper (remove + cleanup), called from
both the inline path and the task.

Deletes PendingSelfRemoveWorker, its WorkerKind, and registration; updates the
wasm/mobile/node bindings that mirrored the WorkerKind enum.

Adds the ProcessPendingSelfRemove Task proto variant (xmtp/proto#335) via
regenerated protos. The proto regen also pulls accumulated upstream drift in
unrelated message_api/message_contents/xmtpv4 gen files (the committed gen
lagged its pin); the only intentional proto change is ProcessPendingSelfRemove.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
insipx added a commit to xmtp/libxmtp that referenced this pull request Jun 9, 2026
Replace the 2s-poll PendingSelfRemoveWorker with a durable TaskRunner task.

On receiving a LeaveRequest, enqueue a ProcessPendingSelfRemove task in the
SAME db transaction as the pending_remove insert (atomic, restart-safe),
deduped per group via a pre-insert existence check. The inline admin fast-path
is kept; the task is the retry/backstop (TaskRunner gives backoff + persistence
across restart). Dispatch loads the group and runs the shared
MlsGroup::process_pending_self_removals() helper (remove + cleanup), called from
both the inline path and the task.

Deletes PendingSelfRemoveWorker, its WorkerKind, and registration; updates the
wasm/mobile/node bindings that mirrored the WorkerKind enum.

Adds the ProcessPendingSelfRemove Task proto variant (xmtp/proto#335) via
regenerated protos. The proto regen also pulls accumulated upstream drift in
unrelated message_api/message_contents/xmtpv4 gen files (the committed gen
lagged its pin); the only intentional proto change is ProcessPendingSelfRemove.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
insipx added a commit to xmtp/libxmtp that referenced this pull request Jun 9, 2026
Replace the 2s-poll PendingSelfRemoveWorker with a durable TaskRunner task.

On receiving a LeaveRequest, enqueue a ProcessPendingSelfRemove task in the
SAME db transaction as the pending_remove insert (atomic, restart-safe),
deduped per group via a pre-insert existence check. The inline admin fast-path
is kept; the task is the retry/backstop (TaskRunner gives backoff + persistence
across restart). Dispatch loads the group and runs the shared
MlsGroup::process_pending_self_removals() helper (remove + cleanup), called from
both the inline path and the task.

Deletes PendingSelfRemoveWorker, its WorkerKind, and registration; updates the
wasm/mobile/node bindings that mirrored the WorkerKind enum.

Adds the ProcessPendingSelfRemove Task proto variant (xmtp/proto#335) via
regenerated protos. The proto regen also pulls accumulated upstream drift in
unrelated message_api/message_contents/xmtpv4 gen files (the committed gen
lagged its pin); the only intentional proto change is ProcessPendingSelfRemove.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
insipx added a commit to xmtp/libxmtp that referenced this pull request Jun 9, 2026
Replace the 2s-poll PendingSelfRemoveWorker with a durable TaskRunner task.

On receiving a LeaveRequest, enqueue a ProcessPendingSelfRemove task in the
SAME db transaction as the pending_remove insert (atomic, restart-safe),
deduped per group via a pre-insert existence check. The inline admin fast-path
is kept; the task is the retry/backstop (TaskRunner gives backoff + persistence
across restart). Dispatch loads the group and runs the shared
MlsGroup::process_pending_self_removals() helper (remove + cleanup), called from
both the inline path and the task.

Deletes PendingSelfRemoveWorker, its WorkerKind, and registration; updates the
wasm/mobile/node bindings that mirrored the WorkerKind enum.

Adds the ProcessPendingSelfRemove Task proto variant (xmtp/proto#335) via
regenerated protos. The proto regen also pulls accumulated upstream drift in
unrelated message_api/message_contents/xmtpv4 gen files (the committed gen
lagged its pin); the only intentional proto change is ProcessPendingSelfRemove.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
insipx added a commit to xmtp/libxmtp that referenced this pull request Jun 9, 2026
Replace the 2s-poll PendingSelfRemoveWorker with a durable TaskRunner task.

On receiving a LeaveRequest, enqueue a ProcessPendingSelfRemove task in the
SAME db transaction as the pending_remove insert (atomic, restart-safe),
deduped per group via a pre-insert existence check. The inline admin fast-path
is kept; the task is the retry/backstop (TaskRunner gives backoff + persistence
across restart). Dispatch loads the group and runs the shared
MlsGroup::process_pending_self_removals() helper (remove + cleanup), called from
both the inline path and the task.

Deletes PendingSelfRemoveWorker, its WorkerKind, and registration; updates the
wasm/mobile/node bindings that mirrored the WorkerKind enum.

Adds the ProcessPendingSelfRemove Task proto variant (xmtp/proto#335) via
regenerated protos. The proto regen also pulls accumulated upstream drift in
unrelated message_api/message_contents/xmtpv4 gen files (the committed gen
lagged its pin); the only intentional proto change is ProcessPendingSelfRemove.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
insipx added a commit to xmtp/libxmtp that referenced this pull request Jun 9, 2026
Replace the 2s-poll PendingSelfRemoveWorker with a durable TaskRunner task.

On receiving a LeaveRequest, enqueue a ProcessPendingSelfRemove task in the
SAME db transaction as the pending_remove insert (atomic, restart-safe),
deduped per group via a pre-insert existence check. The inline admin fast-path
is kept; the task is the retry/backstop (TaskRunner gives backoff + persistence
across restart). Dispatch loads the group and runs the shared
MlsGroup::process_pending_self_removals() helper (remove + cleanup), called from
both the inline path and the task.

Deletes PendingSelfRemoveWorker, its WorkerKind, and registration; updates the
wasm/mobile/node bindings that mirrored the WorkerKind enum.

Adds the ProcessPendingSelfRemove Task proto variant (xmtp/proto#335) via
regenerated protos. The proto regen also pulls accumulated upstream drift in
unrelated message_api/message_contents/xmtpv4 gen files (the committed gen
lagged its pin); the only intentional proto change is ProcessPendingSelfRemove.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
insipx added a commit to xmtp/libxmtp that referenced this pull request Jun 9, 2026
Replace the 2s-poll PendingSelfRemoveWorker with a durable TaskRunner task.

On receiving a LeaveRequest, enqueue a ProcessPendingSelfRemove task in the
SAME db transaction as the pending_remove insert (atomic, restart-safe),
deduped per group via a pre-insert existence check. The inline admin fast-path
is kept; the task is the retry/backstop (TaskRunner gives backoff + persistence
across restart). Dispatch loads the group and runs the shared
MlsGroup::process_pending_self_removals() helper (remove + cleanup), called from
both the inline path and the task.

Deletes PendingSelfRemoveWorker, its WorkerKind, and registration; updates the
wasm/mobile/node bindings that mirrored the WorkerKind enum.

Adds the ProcessPendingSelfRemove Task proto variant (xmtp/proto#335) via
regenerated protos. The proto regen also pulls accumulated upstream drift in
unrelated message_api/message_contents/xmtpv4 gen files (the committed gen
lagged its pin); the only intentional proto change is ProcessPendingSelfRemove.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
insipx added a commit to xmtp/libxmtp that referenced this pull request Jun 9, 2026
Replace the 2s-poll PendingSelfRemoveWorker with a durable TaskRunner task.

On receiving a LeaveRequest, enqueue a ProcessPendingSelfRemove task in the
SAME db transaction as the pending_remove insert (atomic, restart-safe),
deduped per group via a pre-insert existence check. The inline admin fast-path
is kept; the task is the retry/backstop (TaskRunner gives backoff + persistence
across restart). Dispatch loads the group and runs the shared
MlsGroup::process_pending_self_removals() helper (remove + cleanup), called from
both the inline path and the task.

Deletes PendingSelfRemoveWorker, its WorkerKind, and registration; updates the
wasm/mobile/node bindings that mirrored the WorkerKind enum.

Adds the ProcessPendingSelfRemove Task proto variant (xmtp/proto#335) via
regenerated protos. The proto regen also pulls accumulated upstream drift in
unrelated message_api/message_contents/xmtpv4 gen files (the committed gen
lagged its pin); the only intentional proto change is ProcessPendingSelfRemove.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
insipx added a commit to xmtp/libxmtp that referenced this pull request Jun 9, 2026
Replace the 2s-poll PendingSelfRemoveWorker with a durable TaskRunner task.

On receiving a LeaveRequest, enqueue a ProcessPendingSelfRemove task in the
SAME db transaction as the pending_remove insert (atomic, restart-safe),
deduped per group via a pre-insert existence check. The inline admin fast-path
is kept; the task is the retry/backstop (TaskRunner gives backoff + persistence
across restart). Dispatch loads the group and runs the shared
MlsGroup::process_pending_self_removals() helper (remove + cleanup), called from
both the inline path and the task.

Deletes PendingSelfRemoveWorker, its WorkerKind, and registration; updates the
wasm/mobile/node bindings that mirrored the WorkerKind enum.

Adds the ProcessPendingSelfRemove Task proto variant (xmtp/proto#335) via
regenerated protos. The proto regen also pulls accumulated upstream drift in
unrelated message_api/message_contents/xmtpv4 gen files (the committed gen
lagged its pin); the only intentional proto change is ProcessPendingSelfRemove.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
insipx added a commit to xmtp/libxmtp that referenced this pull request Jun 9, 2026
Replace the 2s-poll PendingSelfRemoveWorker with a durable TaskRunner task.

On receiving a LeaveRequest, enqueue a ProcessPendingSelfRemove task in the
SAME db transaction as the pending_remove insert (atomic, restart-safe),
deduped per group via a pre-insert existence check. The inline admin fast-path
is kept; the task is the retry/backstop (TaskRunner gives backoff + persistence
across restart). Dispatch loads the group and runs the shared
MlsGroup::process_pending_self_removals() helper (remove + cleanup), called from
both the inline path and the task.

Deletes PendingSelfRemoveWorker, its WorkerKind, and registration; updates the
wasm/mobile/node bindings that mirrored the WorkerKind enum.

Adds the ProcessPendingSelfRemove Task proto variant (xmtp/proto#335) via
regenerated protos. The proto regen also pulls accumulated upstream drift in
unrelated message_api/message_contents/xmtpv4 gen files (the committed gen
lagged its pin); the only intentional proto change is ProcessPendingSelfRemove.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant