Skip to content

ui-server: keep hosted compute runs out of scheduled-job Activity rollups #3350

Open

Description

@schlessera

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 the jobs group for every client, so scheduled-job totals count scheduled jobs only. The jobs entry 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

Acceptance criteria

  • jobs rollups exclude compute-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 existing ActivityRollups shape, 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

  1. added
    type: fixSomething is broken and must behave the way it is documented.
    area: ui-serverHono app factory: turn coordinator, auth, session catalog, routes, cron.
    priority: p2Wanted, not scheduled. Pulled in when a milestone has room.
    agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.
    on Nov 2, 2026
  2. schlessera commented on Nov 3, 2026

    @schlessera
    OwnerAuthor

    Triage 2026-11-03: the scope now excludes compute-origin runs from jobs for every client, which keeps the shape and corrects the values. Any separate compute group is gated by activityCompute. This matches how the run list already hides compute runs from clients that do not declare it. Attached to #3103.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.area: ui-serverHono app factory: turn coordinator, auth, session catalog, routes, cron.priority: p2Wanted, not scheduled. Pulled in when a milestone has room.type: fixSomething is broken and must behave the way it is documented.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions