divviup / divviup/divviup-api

Switch task disablement to the aggregator's new deactivate_at method

Open
#2,343 2 comments 0 reactions 1 assignee View on GitHub

@jcjones is already working on this.

Since Jul 1, 2026.

Dominant language
Rust
Stars
10
Forks
5
Avg merge
2h 41m
Merged PRs (30d)
66

Description

In https://github.com/divviup/janus/pull/4684/commits/aacea1292a8bad731428b28b86542b6f28001a44, part of https://github.com/divviup/janus/pull/4684, we're preparing the task's validity interval (task_start + task_duration) to become part of the HPKE-AAD TaskConfiguration. Once that lands, the interval must be immutable -- mutating it would change the AAD and break already-uploaded reports.

As a result, the aggregator's PATCH /tasks/{task_id} endpoint will change:

  • The old task_end field (which recomputed the validity interval's duration) goes away.
  • It's replaced by deactivate_at, an Janus-specific field that is not part of the TaskConfiguration/AAD, so it can be changed freely at any time.
  • Once the aggregator's clock reaches deactivate_at, the task stops accepting report uploads (and helper aggregation), which is the "disable/expire this task" behavior.
  • deactivate_at is an ISO 8601 timestamp (e.g. "2026-07-01T00:00:00Z").

We need to:

  • Update the aggregator client's task-patch request to send deactivate_at instead of task_end.
  • Map the control-plane "disable/expire task" action onto deactivate_at rather than task_expiration. Since both aggregators are provisioned from a single ProvisionableTask, send the same value to leader and helper.
  • Confirm nothing else relies on PATCHing the task's validity interval: that interval is now fixed at creation and no longer mutable!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.