Repository navigation
Description
Context
Found while delivering #3108 (epic #3103). GET /api/activity/rollups (packages/ui-server/src/routes/activity.ts:299-340) groups runs into jobs totals by job_name through groupedAggregates (packages/ui-server/src/routes/activity.ts:331 and :377). Compute runs (origin compute, job name = instance id) are counted there too, which mixes external compute jobs into the scheduled-job figures. The run list and run detail already hide compute-origin runs from a request that does not declare ?activityCompute=1 (declaresCompute, packages/ui-server/src/routes/activity.ts:41-47; the filter at :201; ADR "Activity over HTTP", docs/decisions/external-compute.md:722-724). The rollups route does not.
Source pointers are on epic/3103-external-compute at 18d859421; the hosted compute code reaches main with #3404.
Scope
- Exclude
compute-origin runs from thejobsgroup for every client, so scheduled-job totals count scheduled jobs only. Thejobsentry shape is unchanged. - Optionally, for a request that declares
activityCompute, report compute runs as a separate additive group; a client without the capability never sees it.
Out of scope
- The
daysandsessionstotals, which count all spend including compute. - The run list, run detail and live stream gating, which already exist.
- Budget coverage text (ui-server: decide whether budget coverage names external compute #3349).
Acceptance criteria
-
jobsrollups excludecompute-origin runs, proven by a test that seeds a scheduled run and a compute run with the same window and fails first on the current route. - If a separate compute group is added, it appears only for requests that declare
activityCompute; a request without it receives the existingActivityRollupsshape, proven by a test. - Existing clients' rollup shapes are unchanged.
Verification
Keyless route tests through bun run test packages/ui-server, with a mutation that removes the exclusion failing the named test.
Contract impact
Excluding compute from jobs changes values, not shape. A separate capability-gated group is an additive contract change (CONTRACT: commit, contract docs, changeset).
Triage 2026-11-03: added source pointers, made the exclusion apply to every client with the optional separate group gated by activityCompute (reading the original "only for clients that declare" as applying to the new group), added exclusions, verification and contract impact. Set priority: p2; attached to epic #3103. Brief complete; labelled agent-ready.
Activity
schlessera commentedon Nov 3, 2026
Triage 2026-11-03: the scope now excludes
compute-origin runs fromjobsfor every client, which keeps the shape and corrects the values. Any separate compute group is gated byactivityCompute. This matches how the run list already hides compute runs from clients that do not declare it. Attached to #3103.