feat: load persisted LangGraph history in shared sessions - #1117
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No unresolved review comments remain, and the reviewed changes are supported by comprehensive verification.
Review effort: Lite
Findings: None
What changed in this PR
Adds private, explicit persisted-history loading for shared LangGraph sessions, with authoritative projection, cancellation safety, and Angular/React fixture coverage.
Changes:
- Added history transport, projection, lifecycle, and tool-safety handling.
- Added runtime, integration, type, and binding tests.
- Updated fixtures, documentation, verification evidence, and inventory metadata.
| File | Description |
|---|---|
scripts/react-parity/runtime-consumer.spec.mjs |
Tests history request validation. |
scripts/react-parity/runtime-consumer.mjs |
Serves and verifies history routes. |
scripts/react-parity/dispositions.json |
Records inventory treatment. |
scripts/react-parity/baseline.json |
Updates source baseline hashes. |
libs/react/src/use-agent.spec.tsx |
Tests React observation of loaded history. |
libs/langgraph/src/runtime/wire-message.ts |
Shares wire-message decoding helpers. |
libs/langgraph/src/runtime/transport.integration.spec.ts |
Tests SDK history loading. |
libs/langgraph/src/runtime/testing/binding-fixture.ts |
Adds history-capable fixtures. |
libs/langgraph/src/runtime/stream-projection.ts |
Reuses shared wire decoding. |
libs/langgraph/src/runtime/history.type-test.ts |
Verifies private load typing. |
libs/langgraph/src/runtime/history.spec.ts |
Tests loading, cancellation, races, and tool safety. |
libs/langgraph/src/runtime/history-projection.ts |
Projects authoritative checkpoints. |
libs/langgraph/src/runtime/history-projection.spec.ts |
Tests projection semantics. |
libs/langgraph/src/runtime/create-session.ts |
Adds session history loading and lifecycle coordination. |
libs/angular/src/observe-agent.spec.ts |
Tests Angular observation of loaded history. |
fixtures/react-parity/runtime/scenarios.ts |
Displays full transcript text. |
fixtures/react-parity/runtime/runtime-entry.ts |
Exposes fixture load capability. |
fixtures/react-parity/runtime/README.md |
Documents history behavior and verification. |
fixtures/react-parity/runtime/react-app.tsx |
Adds React load controls and output. |
fixtures/react-parity/runtime/evidence.json |
Records verification evidence. |
fixtures/react-parity/runtime/angular-app.ts |
Adds Angular load controls and output. |
fixtures/react-parity/README.md |
Documents runtime scope. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The shared LangGraph session can now open and refresh an existing conversation through an explicit
load()command. Previously it always started empty, and its history access only reconciled locally uncertain submissions. Both installed Angular and React fixtures now display persisted messages through their existing borrowed bindings.Loading projects the latest checkpoint as an authoritative replacement, including removed messages and shorter or empty corrections. Equivalent reads preserve snapshot identity. Construction and observation remain inert; historical tool calls do not execute. Reads settle promptly on cancellation or supersession, and late responses cannot overwrite newer work. Failed reads preserve the visible snapshot and reject with a protected error.
Loads are blocked while execution, uncertain recovery, or tool settlement/persistence is outstanding. Execution deduplication survives refresh, while authored result provenance is kept separate so persisted wire strings cannot masquerade as typed tool results during later stream replay.
This is the next bounded adapter-migration milestone after #1116. The factory and load capability remain private development seams; the existing public LangGraph root remains Angular. Thread switching, checkpoint navigation, interrupt resume, full state projection, SSR and public package cutover remain outside this change. No schema validation, new dependencies or shared state framework is introduced.
Verification
Local verification passed against the recorded 770-file source fingerprint in
fixtures/react-parity/runtime/evidence.json. This records commands, log hashes, environment, counts and limitations. Required CI subsequently passed for headcd56b9647a20367616f39b2dc0f53c82356a3dea. Copilot reported no findings. Merged as192f94e9b57b77e1858e2e4337f0d34bcd6a9c64; its tree exactly matches the verified head.langgraph:runtime-quality: 207 tests across 11 files;langgraph:runtime-type-testspasses. New coverage includes 19 pure projection cases, 31 loading/ownership cases and one real SDK history request case.git diff --checkpasses.Supplemental fault probes verified that a failed equal refresh fails the browser assertion and that executing the historical pending handler increments the observed counter. These probes are local supplemental evidence, not additional checked-in CI tests.
PR #1116 merged after its required CI passed. This increment remains private and partial T10 coverage; no SSR, full backend parity, calibrated performance or public neutral LangGraph package claim is made.