add TaskRunner scheduling protos: PullInDeadline, KpRotation, KpDeletion#339
Merged
Conversation
Contributor
ApprovabilityVerdict: Approved Purely additive protobuf schema changes adding new message types (PullInDeadline, KpRotation, KpDeletion) and corresponding Task oneof variants. No existing fields modified. Author is the designated code owner of this proto file. You can customize Macroscope's approvability policy. Learn more. |
fbac
approved these changes
Jun 30, 2026
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.
macroscopeapp
Bot
dismissed
their stale review
July 2, 2026 14:20
Dismissing prior approval to re-evaluate f9f0a35
insipx
added a commit
to xmtp/libxmtp
that referenced
this pull request
Jul 6, 2026
… + regen xmtp_proto (#3805) Proto-only base of the TaskRunner-recurrence stack. Adds three variants to the `xmtp.mls.database.Task` oneof (vendored regen): - **`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)`, targeting the row by its unique `data_hash`. - **`KpRotation` (tag 5)** / **`KpDeletion` (tag 6)** — recurring singleton tasks for key-package maintenance; empty payloads give each a stable `data_hash` so pull-ins can target them. Minimal dispatch arms (warn + delete) keep `xmtp_mls` compiling standalone; real handlers land in the stacked PRs (#3806 generic layer, #3814 KP consumers). `gen/` is regenerated AHEAD of the upstream proto pin: xmtp/proto#339 carries all three messages; `proto_version` gets bumped to its merge SHA once it lands. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- Macroscope's pull request summary starts here --> <!-- Macroscope will only edit the content between these invisible markers, and the markers themselves will not be visible in the GitHub rendered markdown. --> <!-- If you delete either of the start / end markers from your PR's description, Macroscope will append its summary at the bottom of the description. --> > [!NOTE] > ### Add `PullInDeadline`, `KpRotation`, and `KpDeletion` task variants to the MLS database worker > - Adds three new `Task` oneof variants to the protobuf schema in [xmtp.mls.database.rs](https://github.com/xmtp/libxmtp/pull/3805/files#diff-1b48cc83eb618a15345516b946b4138dae9c2be24155cc8d9a950038f118096c): `PullInDeadline` (with `target_data_hash` and `not_later_than_ns`), `KpRotation`, and `KpDeletion`. > - Regenerates serde impls and the proto descriptor binary to include these new types. > - Adds placeholder match arms in [tasks.rs](https://github.com/xmtp/libxmtp/pull/3805/files#diff-b3d01dc512a077cf4b625f516f8c36ea61978f070bcce720ed8d522065a268b6) that log a warning and delete the task — no business logic is implemented yet. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized bd706d7.</sup> > <!-- Macroscope's review summary ends here --> > > <!-- macroscope-ui-refresh --> <!-- Macroscope's pull request summary ends here -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds three task variants to
xmtp.mls.database.Taskfor generic recurring-task support in libxmtp's TaskRunner:PullInDeadline(tag 4) — generic one-shot "run a task sooner" primitive: lowers a target task row'snext_attempt_at_nstoMIN(current, not_later_than_ns), targeting the row by its uniquedata_hash.KpRotation(tag 5) — recurring singleton: rotate + upload a fresh key package when the identity's rotation deadline is due.KpDeletion(tag 6) — recurring singleton: delete superseded local key-package material past itsdelete_at_ns.Empty payloads on the two singletons give each a stable
data_hashso pull-ins can target them.Replaces this PR's earlier single
KpMaintenancemessage: rotation and deletion are now independent tasks (different deadlines, cadences, and latency tolerances), and the nudge mechanism is generic rather than KP-specific.Consumed by xmtp/libxmtp#3805 + xmtp/libxmtp#3806 (generic layer, vendored regen ahead of pin) and a follow-up KP-consumer stack; libxmtp's
proto_versiongets bumped to this PR's merge SHA once landed.🤖 Generated with Claude Code
Note
Add
PullInDeadline,KpRotation, andKpDeletiontask variants to TaskRunner scheduling protosExtends the
Taskoneof in task.proto with three new variants (field numbers 4–6).PullInDeadlinecarries atarget_data_hashand anot_later_than_nstimestamp for deadline-based schedulingKpRotationandKpDeletionare empty messages representing recurring singleton key package operationsMacroscope summarized f9f0a35.