fix(sessions): updateLastRoute must not bump updatedAt (#49515)#49588
Merged
BradGroux merged 1 commit intoopenclaw:mainfrom Apr 23, 2026
Merged
fix(sessions): updateLastRoute must not bump updatedAt (#49515)#49588BradGroux merged 1 commit intoopenclaw:mainfrom
BradGroux merged 1 commit intoopenclaw:mainfrom
Conversation
updateLastRoute() used mergeSessionEntry which bumps updatedAt to Date.now() on every inbound message. This prevented session idle and daily reset from ever firing, since evaluateSessionFreshness() always saw a fresh updatedAt. The fix from openclaw#32379 patched recordSessionMetaFromInbound to use mergeSessionEntryPreserveActivity, but missed updateLastRoute() in the same inbound pipeline. Changes: - Remove explicit updatedAt from updateLastRoute basePatch - Switch from mergeSessionEntry to mergeSessionEntryPreserveActivity - Add regression test verifying updatedAt is preserved - Update existing test assertion to match corrected behavior Fixes openclaw#49515
Contributor
Greptile SummaryThis PR completes a bug fix started in #32379, ensuring that Key changes:
Confidence Score: 5/5
Last reviewed commit: "fix(sessions): updat..." |
steipete
pushed a commit
that referenced
this pull request
Apr 23, 2026
updateLastRoute() used mergeSessionEntry which bumps updatedAt to Date.now() on every inbound message. This prevented session idle and daily reset from ever firing, since evaluateSessionFreshness() always saw a fresh updatedAt. The fix from #32379 patched recordSessionMetaFromInbound to use mergeSessionEntryPreserveActivity, but missed updateLastRoute() in the same inbound pipeline. Changes: - Remove explicit updatedAt from updateLastRoute basePatch - Switch from mergeSessionEntry to mergeSessionEntryPreserveActivity - Add regression test verifying updatedAt is preserved - Update existing test assertion to match corrected behavior Fixes #49515 (cherry picked from commit 94f703a)
medikoo
pushed a commit
to medikoo/openclaw
that referenced
this pull request
Apr 24, 2026
… (openclaw#49588) updateLastRoute() used mergeSessionEntry which bumps updatedAt to Date.now() on every inbound message. This prevented session idle and daily reset from ever firing, since evaluateSessionFreshness() always saw a fresh updatedAt. The fix from openclaw#32379 patched recordSessionMetaFromInbound to use mergeSessionEntryPreserveActivity, but missed updateLastRoute() in the same inbound pipeline. Changes: - Remove explicit updatedAt from updateLastRoute basePatch - Switch from mergeSessionEntry to mergeSessionEntryPreserveActivity - Add regression test verifying updatedAt is preserved - Update existing test assertion to match corrected behavior Fixes openclaw#49515 (cherry picked from commit 94f703a)
ogt-redknie
pushed a commit
to ogt-redknie/OPENX
that referenced
this pull request
May 2, 2026
… (openclaw#49588) updateLastRoute() used mergeSessionEntry which bumps updatedAt to Date.now() on every inbound message. This prevented session idle and daily reset from ever firing, since evaluateSessionFreshness() always saw a fresh updatedAt. The fix from openclaw#32379 patched recordSessionMetaFromInbound to use mergeSessionEntryPreserveActivity, but missed updateLastRoute() in the same inbound pipeline. Changes: - Remove explicit updatedAt from updateLastRoute basePatch - Switch from mergeSessionEntry to mergeSessionEntryPreserveActivity - Add regression test verifying updatedAt is preserved - Update existing test assertion to match corrected behavior Fixes openclaw#49515
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
May 9, 2026
… (openclaw#49588) updateLastRoute() used mergeSessionEntry which bumps updatedAt to Date.now() on every inbound message. This prevented session idle and daily reset from ever firing, since evaluateSessionFreshness() always saw a fresh updatedAt. The fix from openclaw#32379 patched recordSessionMetaFromInbound to use mergeSessionEntryPreserveActivity, but missed updateLastRoute() in the same inbound pipeline. Changes: - Remove explicit updatedAt from updateLastRoute basePatch - Switch from mergeSessionEntry to mergeSessionEntryPreserveActivity - Add regression test verifying updatedAt is preserved - Update existing test assertion to match corrected behavior Fixes openclaw#49515
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.
Fixes #49515
Problem
updateLastRoute()usedmergeSessionEntrywhich bumpsupdatedAttoDate.now()on every inbound message. This prevented session idle and daily reset from ever firing, sinceevaluateSessionFreshness()always saw a freshupdatedAt.The fix from #32379 patched
recordSessionMetaFromInboundto usemergeSessionEntryPreserveActivity, but missedupdateLastRoute()in the same inbound pipeline.Fix
updatedAtfromupdateLastRoutebasePatch (routing should not write activity timestamps)mergeSessionEntrytomergeSessionEntryPreserveActivity(belt-and-suspenders:resolveMergedUpdatedAthas aDate.now()fallback that would still bump activity without the preserve-activity policy)updatedAtis preserved across route updatesContext
The comment at line 860 of
store.tsalready documents the principle:This PR applies the same principle to
updateLastRoute(), completing the fix started in #32379.Testing
updateLastRoute does not bump updatedAt on existing sessions (#49515)updateLastRoute persists channel and target— assertion changed fromtoBeGreaterThanOrEqual(123)totoBe(123)