Skip to content

fix/issues/09 legacy checkpoints - #266

Merged
xiduzo merged 2 commits into
fix/issues/08-legacy-run-readersfrom
fix/issues/09-legacy-checkpoints
Dec 2, 2026
Merged

xiduzo merged 2 commits into
fix/issues/08-legacy-run-readersfrom
fix/issues/09-legacy-checkpoints

Conversation

@xiduzo

@xiduzo xiduzo commented Dec 2, 2026

Copy link
Copy Markdown
Owner

Summary

Changes

Test plan

  • [ ]

Related

xiduzo and others added 2 commits December 2, 2026 01:23
RunStateValues.dueAt and .cascades are required. Their channels have a
default ("" and {}), so LangGraph fills them for every checkpoint it reads.
No stored checkpoint lacks them, and no checkpoint goes.

- dueAt: red TS2322 "Type 'string | undefined' is not assignable to type 'string'" in step-runner.test.ts once dueAt was required; green with the test state writing dueAt and the context reading state.dueAt without a fallback.
- cascades: red TS2741 "Property 'cascades' is missing" (10 cases in cascade.test.ts); green with the tests writing cascades and climbAt and route reading state.cascades without optional chaining.
- endReason on a park and on Parked stay optional: sleep.ts writes a stopped park without it when a person lets go of a wait (TS2741 at sleep.ts once required).

Refs #241

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: sander boer <mail@sanderboer.nl>
…n older park go

A person who lets go of a wait parks the step with endReason
stopped_by_person. endReason is required on the pending park and on Parked.
thread.ts endingOf and the Call body read it without the "_OTHER" fallback.

Migration 20261202070000_park_end_reason counts the runs whose checkpoint or
pending writes hold a park without endReason (a checkpoint's pending, a
"pending" write, an "__interrupt__" write), copies the database to backups/
beside it, removes their lg_checkpoint and lg_write rows, and logs the count.
The run, its steps and its log stay: a run with no checkpoint resumes from its
log, as a pruned run already does.

- sleep.ts: red "a person who lets go of a wait parks the step as stopped by a person" (the park had no endReason); green with endReason "stopped_by_person".
- items 6 and 9: red TS2741 at sleep.ts and TS2322 at route.ts once endReason was required; green with the field required, the conditional spread and both "_OTHER" fallbacks gone. The thread test of a park without a code goes; the other tests write endReason.
- migration: red "migration park_end_reason > removes the checkpoints of each run whose park has no end reason" (packages/db) without the migration; green with the migration, the count, the copy and the log. A database whose parks all name their reason gets no copy and no line.

Closes #241

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: sander boer <mail@sanderboer.nl>
@xiduzo
xiduzo added this pull request to stack #270 December 2, 2026 09:17
@xiduzo
xiduzo marked this pull request as ready for review December 2, 2026 10:21
@xiduzo
xiduzo merged commit 0aa20ba into main Dec 2, 2026
24 checks passed
@xiduzo
xiduzo deleted the fix/issues/09-legacy-checkpoints branch December 2, 2026 10:23
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