Repository navigation
fix(sessions): archive and read sessions through state path aliases - #181554
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
steipete
marked this pull request as ready for review
October 23, 2026 10:05
Contributor
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
Author
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
This was referenced Oct 23, 2026
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 24, 2026
RomneyDa
pushed a commit
that referenced
this pull request
Oct 26, 2026
…181554) (cherry picked from commit 55477ab) Release adaptation: reproduced on stable (deleting an archived session through a symlinked state dir failed with "SQLite archive request changed its captured database owner"). Stable opens the archive session before reclamation and planning, so those now run first and the archive session and deletions use the admitted physical path; the metadata-only fast path does not exist on stable. The conformance test needs main-only mixed-engine fixtures; the archive case is ported as src/config/sessions/session-archive-alias.test.ts.
RomneyDa
added a commit
that referenced
this pull request
Oct 26, 2026
Release adaptation: compress the canRepairRuntime call (platform defaults to process.platform, which the stable Doctor already reads), drop the redundant identity-loss throw in session deletion (missing file identity keeps the prepared scope), and register the stale-operator-source recovery case from a test-support module so the line-cap ratchet stays flat.
tideclaw-bot
added a commit
that referenced
this pull request
Nov 4, 2026
Adapt 12 audited database fixes and eight large-conversation reader groups. Stream archive materialization with bounded buffers, preserving full history. Original sources: #187496 8b38db5 #181554 55477ab #179057 ff5b71a #180414 2f2dc1e #182444 a64daf7 #183410 fa9ca88 #175091 ca07b1b #179089 a6f4826 #182446 84806d0 #157151 5cc6f4a #174249 a09c26b #172028 70856fb #172970 dd9cdee #177937 1bb6763 #182091 38bf89c #190182 33e7baf #189284 3d4fc94 #188450 3c8bd4d #188483 b195f61 #190690 c51d733 Proof: 454 distinct tests in initial lane; 11 relevant repair tests. Final integrated lint/type/format pass pending. Co-authored-by: RomneyDa <[email protected]>
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.
What Problem This Solves
Fixes
cron.remove, session deletion/archive, and retained cron history failing when the state directory is reached through a symlink or another filesystem alias.User Impact
SQLite and PostgreSQL users can archive sessions and read retained history with an aliased state directory. No configuration changes or migration are required.
Why This Change Was Made
Like #181472, this fixes producer handoffs while preserving strict database-owner checks. Deletion planning already admits a canonical native owner, but the archive session was captured earlier with the logical alias. The lifecycle now creates that session after planning and passes its held native location. Retained-history selection separately captures the row owner's physical read source for comparison with publication facts; row lookup still uses its logical locator.
The sibling archive-read, archive-publication, context-worker, and pending-input guards remain strict. Their producers already use physical identities or consistently captured paths. No identity/receipt contract, schema, fallback, or freshness probe is added.
Evidence
pnpm openclaw gateway runon baseline78121db97708, using a symlinked state directory and actual model turns: cron execution and ordinary chat succeed, thencron.removeandsessions.deletefail withSQLite archive request changed its captured database owneron both SQLite and PostgreSQL 17. Traces show the logical alias captured by the archive session versus the canonical native location from planning.Final-head real Gateway verification passes on SQLite and PostgreSQL 17: exact-marker retained cron history, cron removal, session archival and archived history, and session deletion producing the transcript archive. An extra generic history request after deletion is rejected identically through alias and canonical paths because deletion removes its live session binding; archived-run readback is covered through the archive owner by the committed regression. All three final-head PostgreSQL conformance shards executed and passed (1,126 tests passed; 37 configured skips). Logs were inspected, including all four new alias cases in shard 2.
CI 39936588151 completed with one confirmed inherited root failure:
checks-node-compact-small-3, in the agents watch-discovery test. Baseline7a1d72c44102already registers the absentattempt-prompt-submit.steering.test.ts; baseline and candidate have identical 423-entry agents lists. The focused candidate test and baseline filesystem discovery both reproduce it. This PR’s addedsrc/infraregistration is excluded by the failing test’s agents filter. The CI aggregate is red only because of that inherited failure; landing uses the explicitly authorized native exception.Sibling owner audit
assertSessionStoreReadCandidate.captureSessionStoreReadTargetmaps canonical candidate paths to captured physical identities; reads and writes retain identity and birthtime checks.Planning remains protected by its existing admission and held execution. Warm/native-maintenance paths, final transaction guards, and receipt settlement keep their existing ownership and lifetime.