Skip to content

fix(ag-ui): enforce owned patch paths and safe data writes - #1165

Merged
blove merged 1 commit into
mainfrom
codex/ag-ui-patch-members
Sep 24, 2026
Merged

blove merged 1 commit into
mainfrom
codex/ag-ui-patch-members

Conversation

@blove

@blove blove commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

AG-UI state/activity patches could silently accept nonexistent replacement or copy paths, read inherited JavaScript properties, or read beyond an array's existing elements. Adding __proto__ changed the returned object's prototype instead of creating an own data field.

Correct the existing pure path-copy helper: reads, replacements and removals require existing own members; final add keeps array insertion/object creation semantics. Computed own-property writes retain special keys as data. Failed batches leave the original document intact, and the current reducers retain their existing error policies and observations.

Validation:

  • 498 legacy AG-UI tests, including 42 new path and integrated state/activity regressions; 106 private runtime tests.
  • Before the fix, 20 retained assertions failed. Parent Chromium verification reproduced nine failures; all eleven browser checks now pass in automated Chromium, Chrome MCP and the in-app browser with clean consoles.
  • Runtime/public types, lint (zero errors and 317 existing warnings), build, inventory, source boundaries, version consistency and diff checks pass.
  • Fresh independent compliance and code-quality reviews; parent independently reran all 498 legacy tests.

This corrects path execution rather than adding argument-schema validation. Root removal and broader pointer grammar remain outside the helper's existing supported scope. No public API, dependency, reducer reporting policy or release changes. The optional full built-workspace boundary check was not satisfied because unrelated packages were not built; scoped source-boundary and AG-UI build checks passed.

@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 10:56pm 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 22:54
@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 77a4ff1 into main Sep 24, 2026
77 of 78 checks passed

This branch was successfully deployed

1 active deployment
Preview – threadplane — 88310c05 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