Skip to content

feat: load persisted LangGraph history in shared sessions - #1117

Merged
blove merged 1 commit into
mainfrom
codex/langgraph-history-loading
Sep 22, 2026
Merged

blove merged 1 commit into
mainfrom
codex/langgraph-history-loading

Conversation

@blove

@blove blove commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

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 head cd56b9647a20367616f39b2dc0f53c82356a3dea. Copilot reported no findings. Merged as 192f94e9b57b77e1858e2e4337f0d34bcd6a9c64; its tree exactly matches the verified head.

  • langgraph:runtime-quality: 207 tests across 11 files; langgraph:runtime-type-tests passes. New coverage includes 19 pure projection cases, 31 loading/ownership cases and one real SDK history request case.
  • Focused CI/parity Node suites: 412 tests.
  • Core/content/Angular/React lint, tests, strict type checks and builds pass. Native observers each pass 7 tests, including explicit load, equal refresh and lifecycle ownership.
  • Both production-built installed consumers pass 10 browser scenarios each: 3 exact history reads, 6 run requests, 1 handler invocation, no page errors or unexpected requests. Strict installed declarations and package boundaries pass.
  • All six legacy production builds and source/emitted boundary checks pass. Inventory validates 1,453 rows, preserving all 1,451 prior assignments with no legacy public export drift.
  • LangGraph lint passes with 68 existing warnings and no errors; git diff --check passes.

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.

@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 2:21am 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 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.

@blove
blove enabled auto-merge September 22, 2026 02:31
@blove
blove merged commit 192f94e into main Sep 22, 2026
79 checks passed

This branch was successfully deployed

1 active deployment
Preview – threadplane cd56b964 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