Skip to content

fix(ag-ui): scope reasoning timing to its delivery run - #1160

Merged
blove merged 2 commits into
mainfrom
codex/ag-ui-reasoning-ownership
Sep 24, 2026
Merged

blove merged 2 commits into
mainfrom
codex/ag-ui-reasoning-ownership

Conversation

@blove

@blove blove commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Two AG-UI sessions using the same message ID overwrite each other's reasoning start time because the reducer stores clocks in a module-wide map. Repeated and late reasoning-end events can also change completed durations. Keep one pending start on the owning delivery run, consume it once, and clear it when assistant ownership changes or the run settles. Reasoning events with a conflicting run ID are ignored.

This preserves the current canonical snapshot policy and public API. It removes the global timing map and corrects the reducer's misleading purity comment; it does not add a shared timing service or migrate the AG-UI package root.

Validation:

  • 32 semantic regressions failed before the fix; all 425 AG-UI tests now pass, including seven actual adapter subscriber tests. Independent compliance and quality reviews and a separate parent test run passed.
  • Public type checks, production package build and dependencies, inventory, source boundaries, release-version checks and diff checks passed. Lint: zero errors, 290 warnings.
  • A temporary browser harness importing the actual adapter reproduced the old 100 ms result instead of 200 ms. Both corrected automated flows and Chrome MCP/in-app-browser walkthroughs verified independent 200/250 ms durations, duplicate-end stability, pending/completed disposal and inert late events with clean consoles. This is source-adapter verification with controlled events, not backend or installed-package E2E coverage. Required CI supplies broader example coverage.

No release, version, dependency or publishing changes.

@vercel

vercel Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
threadplane Ready Ready Preview Sep 24, 2026 8:03pm UTC

Request Review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated approval: this PR received an intelligent (AI) code review. See the review comments on this PR.

@blove
blove enabled auto-merge (squash) September 24, 2026 19:45
@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @blove's task in 0s —— View job


I'll analyze this and get back to you.

@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @blove's task in 0s —— View job


I'll analyze this and get back to you.

@blove
blove merged commit 92d3aac into main Sep 24, 2026
76 of 77 checks passed

This branch was successfully deployed

1 active deployment
Preview – threadplane — 733a5ef0 Deployed Sep 24, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant