From f9f0a35cd55d190177589f02274e7b556759dce4 Mon Sep 17 00:00:00 2001 From: Andrew Plaza Date: Mon, 29 Jun 2026 12:18:51 -0400 Subject: [PATCH] add TaskRunner scheduling protos: PullInDeadline, KpRotation, KpDeletion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PullInDeadline (tag 4): generic one-shot 'run a task sooner' primitive — lowers a target task row's next_attempt_at_ns to MIN(current, not_later_than_ns). KpRotation (tag 5) / KpDeletion (tag 6): recurring singleton tasks for key package rotation and superseded-key-material deletion; empty payloads give each a stable data_hash so pull-ins can target them. Replaces the earlier single KpMaintenance message. --- proto/mls/database/task.proto | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/proto/mls/database/task.proto b/proto/mls/database/task.proto index 7fd46421..95d67860 100644 --- a/proto/mls/database/task.proto +++ b/proto/mls/database/task.proto @@ -14,9 +14,29 @@ message Task { xmtp.mls.message_contents.WelcomePointer process_welcome_pointer = 1; SendSyncArchive send_sync_archive = 2; ProcessPendingSelfRemove process_pending_self_remove = 3; + PullInDeadline pull_in_deadline = 4; + KpRotation kp_rotation = 5; + KpDeletion kp_deletion = 6; } } +// Lower a target task's next-attempt deadline so it runs sooner. One-shot: +// applied by the TaskWorker, then deleted. +message PullInDeadline { + // The UNIQUE data_hash identifying the target task row. + bytes target_data_hash = 1; + // Target's next_attempt_at_ns is set to MIN(current, this). + int64 not_later_than_ns = 2; +} + +// Recurring singleton: rotate + upload a fresh key package when the identity's +// rotation deadline is due. Empty payload => stable data_hash for pull-ins. +message KpRotation {} + +// Recurring singleton: delete superseded local key-package material whose +// delete_at_ns has passed. Empty payload => stable data_hash for pull-ins. +message KpDeletion {} + message SendSyncArchive { xmtp.device_sync.ArchiveOptions options = 1; bytes sync_group_id = 2;