Repository navigation
Conversation
jalehman
force-pushed
the
clawdbot-d02.1.9.1.36/31b-main-session-restart-recovery-seam
branch
2 times, most recently
from
June 18, 2026 03:14
c99f715 to
ceac137
Compare
jalehman
force-pushed
the
clawdbot-d02.1.9.1.36/31b-main-session-restart-recovery-seam
branch
from
June 18, 2026 03:20
ceac137 to
d58eb87
Compare
jalehman
marked this pull request as ready for review
June 18, 2026 03:25
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jun 19, 2026
11 of 23 tasks
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.
Summary
Linked context
Related #88838
Requested by maintainer Path 3 task
clawdbot-d02.1.9.1.36.Real behavior proof
Behavior addressed: Main-session restart recovery lifecycle writes go through the storage-neutral accessor seam while preserving file-backed stale-lock restart behavior.
Real environment tested: Local OpenClaw LaunchAgent Gateway on macOS from SHA d58eb87, OpenClaw 2026.6.8, gateway port 18789, LaunchAgent pid 79932 after restart.
Exact steps or command run after this patch:
Evidence after fix: Gateway restarted LaunchAgent pid 79932 from the rebuilt dist; /healthz returned ok=true in 65ms with 11 plugins loaded; gateway status RPC was ok and reported OpenClaw 2026.6.8 from SHA d58eb87. The seeded restart-recovery row changed from status=running with a stale .jsonl.lock to status=failed, abortedLastRun=true, endedAt and updatedAt persisted as numbers, and lockExists=false. Cleanup verification after proof returned rowExists=false, transcriptExists=false, and lockExists=false.
Observed result after fix: The real Gateway startup stale-lock sweep exercised the migrated restart-recovery accessor path and persisted the expected restart-recovery failure marker without leaving the proof fixture behind.
What was not tested: SQLite runtime flip, doctor migration, plugin SDK compatibility, and a real interrupted model turn with provider output; this PR remains a file-backed lifecycle seam slice.
Tests and validation
Commands run:
node scripts/run-vitest.mjs src/config/sessions/session-accessor.test.ts src/agents/main-session-restart-recovery.test.ts test/scripts/check-session-accessor-boundary.test.tsnode scripts/check-session-accessor-boundary.mjsnode scripts/run-oxlint.mjs src/config/sessions/session-accessor.ts src/config/sessions/session-accessor.test.ts src/agents/main-session-restart-recovery.ts test/scripts/check-session-accessor-boundary.test.tsnode scripts/run-tsgo.mjs -p tsconfig.core.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core.tsbuildinfonode scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.test.src.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/test-src.tsbuildinfogit diff --checkpnpm exec oxfmt --check --threads=1 src/config/sessions/session-accessor.ts src/config/sessions/session-accessor.test.ts src/agents/main-session-restart-recovery.ts scripts/check-session-accessor-boundary.mjs test/scripts/check-session-accessor-boundary.test.ts.agents/skills/autoreview/scripts/autoreview --mode branch --base upstream/mainRegression coverage added:
src/agents/main-session-restart-recovery.ts.Risk checklist
Did user-visible behavior change?
NoDid config, environment, or migration behavior change?
NoDid security, auth, secrets, network, or tool execution behavior change?
NoHighest-risk area: Restart recovery can affect interrupted main-session resume/failure state.
Risk mitigation: The existing restart recovery regression suite still passes, and the accessor preserves writer-lock, skip-maintenance, require-write-success, pending-final-delivery, stale/current-row, and exact-key replacement semantics.
Current review state
Next action: Draft review.
Still waiting on: Maintainer review and CI.
Bot/reviewer comments addressed: None yet.
SQLite follow-up: implement the same
applyRestartRecoveryLifecyclesemantics as transaction-sized row selection/replacement in the SQLite session accessor backend when the runtime flip slice reaches restart recovery.