Skip to content

ui-server: each observation of a checkout turn recomputes that turn's whole code-change set #4446

Open

Description

@schlessera

Part of #4426 (follow-ups from #4278). Deferred from the combined review of PR #4444; the code came from #4362, and partly undoes #4320's incremental counters.

Context

After advanceCounters, each observation of a checkout turn re-sums code.sizes, copies code.paths, and reads and parses every receipt path list for the turn (packages/ui-server/src/brain/turn-journal.ts:729-752). This runs on the main thread while workers are held. The 10,000-row counter test covers file rows only.

Scope

Keep running totals for checkout bytes, changed paths and workspace paths, and parse a receipt's paths only when that receipt changes. No change to reported values.

Acceptance criteria

  • The current cost at 10,000 changed checkout paths is measured first and recorded on this issue.
  • An observation that changes one unrelated note does work independent of the turn's earlier checkout changes.
  • Reported facts are identical before and after, shown by a test with a mutation receipt.

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: p3Someday. Needs a driving use case before it starts.
    agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.
    on Nov 21, 2026
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: p3Someday. Needs a driving use case before it starts.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