Skip to content

feat: expose LangGraph state through native snapshots - #1118

Merged
blove merged 1 commit into
mainfrom
codex/langgraph-state-values
Sep 22, 2026
Merged

blove merged 1 commit into
mainfrom
codex/langgraph-state-values

Conversation

@blove

@blove blove commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

The shared LangGraph runtime now exposes read-only backend values in the same immutable snapshot as messages and tools. Previously publication discarded backend fields and both native binding signatures erased concrete snapshot extensions. Angular and React now preserve those extensions without importing backend types into core or creating a second store.

Root full-state events, checkpoints, loaded history and conclusive correlated recovery replace values atomically with their related message projection. Missing keys disappear, equal data retains identity, and unchanged nested branches are shared. Message chunks, node updates, child events and live interrupt control envelopes preserve existing application values. Construction stays inert; this adds no network operations or state writes.

The private snapshot distinguishes unobserved values (undefined) from an observed empty object. Values are owned readonly plain data, not a schema-validated application DTO. The existing tool inference and borrowed lifecycle remain intact. Interrupt/resume, join/reconnect, state writes, SSR and public LangGraph package cutover remain outside this increment.

Verification

  • 270 runtime tests across 13 files; strict runtime types and selected legacy transport/client checks.
  • 413 focused CI/parity script tests; foundation lint, tests, types and builds for core, content, Angular and React (7 native tests per framework).
  • Six legacy production builds and source/emitted package boundary checks.
  • Installed Angular and React production consumers: 10 browser scenarios each, exactly 3 history reads, 6 run requests and one handler; no browser errors or unexpected requests. Inferred type probes compile against emitted factory declarations and installed tarballs.
  • Inventory: 1,455 rows, preserving all 1,453 previous assignments and existing legacy exports. LangGraph lint passes with 68 existing warnings, no errors.

Local verification includes red/green regression coverage and independent spec/quality reviews. One Angular verifier attempt overlapped a dependency rebuild and failed on a temporarily absent artifact; its ordered rerun passed. Exact commands, log hashes, source fingerprint and limitations: verification evidence.

Based directly on merged #1117. Required CI 35683101055 passed on 78df2f1de21825c760eb53d74728f7abafae3c30. Copilot reviewed the same head with no findings. Merged as db867f83be6cb6f9735de41f6aadddf64a0d9937 on 2026-09-22.

@vercel

vercel Bot commented Sep 22, 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 22, 2026 3:27am 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.

@github-actions

github-actions Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

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


I'll analyze this and get back to you.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

No unresolved blocking issues were identified.

Review effort: Lite
Findings: None

What changed in this PR

Adds immutable, read-only LangGraph application values to runtime snapshots while preserving concrete snapshot types in Angular and React bindings.

Changes:

  • Adds values projection, ownership, structural sharing, and atomic publication.
  • Updates native bindings, transport normalization, fixtures, and documentation.
  • Expands runtime, browser, type, and verification coverage.
File Summary
scripts/​react-parity/​verify-angular-package.mjs Orders declaration generation before type checks.
scripts/​react-parity/​runtime-consumer.spec.mjs Tests persisted and ignored values.
scripts/​react-parity/​runtime-consumer.mjs Adds values fixtures and assertions.
scripts/​react-parity/​dispositions.json Updates inventory metadata.
scripts/​react-parity/​baseline.json Updates verification baseline.
libs/​react/​src/​use-agent.type-test.ts Verifies concrete snapshot inference.
libs/​react/​src/​use-agent.ts Preserves snapshot extensions.
libs/​react/​src/​use-agent.spec.tsx Tests values observation and identity.
libs/​react/​README.md Documents extended snapshots.
libs/​langgraph/​src/​runtime/​values.type-test.ts Verifies values typing.
libs/​langgraph/​src/​runtime/​values.spec.ts Tests values lifecycle and atomicity.
libs/​langgraph/​src/​runtime/​values-projection.ts Projects authoritative application values.
libs/​langgraph/​src/​runtime/​values-projection.spec.ts Tests projection and ownership.
libs/​langgraph/​src/​runtime/​transport.integration.spec.ts Tests transport routing and collisions.
libs/​langgraph/​src/​runtime/​testing/​binding-fixture.ts Extends fixtures with values.
libs/​langgraph/​src/​runtime/​stream-projection.ts Restricts delta handling to message events.
libs/​langgraph/​src/​runtime/​publication.ts Publishes extended snapshots.
libs/​langgraph/​src/​runtime/​publication.spec.ts Tests immutable publication.
libs/​langgraph/​src/​runtime/​ownership.ts Adds immutable values ownership and sharing.
libs/​langgraph/​src/​runtime/​langgraph-snapshot.ts Defines the private snapshot extension.
libs/​langgraph/​src/​runtime/​create-session.ts Integrates values into session state.
libs/​langgraph/​src/​lib/​transport/​fetch-stream.transport.ts Protects protocol fields from collisions.
libs/​langgraph/​src/​lib/​transport/​fetch-stream.transport.spec.ts Tests event normalization.
libs/​angular/​src/​observe-agent.type-test.ts Verifies Angular snapshot inference.
libs/​angular/​src/​observe-agent.ts Preserves concrete snapshot types.
libs/​angular/​src/​observe-agent.spec.ts Tests values observation.
libs/​angular/​README.md Documents extended snapshots.
fixtures/​react-parity/​runtime/​scenarios.ts Adds fixture snapshot values.
fixtures/​react-parity/​runtime/​runtime-entry.ts Exposes concrete fixture snapshot types.
fixtures/​react-parity/​runtime/​README.md Documents values coverage.
fixtures/​react-parity/​runtime/​react-app.tsx Displays application values.
fixtures/​react-parity/​runtime/​installed-types.ts Adds installed type probes.
fixtures/​react-parity/​runtime/​evidence.json Records verification evidence.
fixtures/​react-parity/​runtime/​angular-app.ts Displays application values.
fixtures/​react-parity/​README.md Updates parity scope and inventory.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@blove
blove merged commit db867f8 into main Sep 22, 2026
79 checks passed

This branch was successfully deployed

1 active deployment
Preview – threadplane 78df2f1d Deployed Sep 22, 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.

2 participants