Repository navigation
refactor(sessions): consolidate entry state - #115299
Merged
Merged
Conversation
steipete
marked this pull request as ready for review
July 28, 2026 16:51
Contributor
Author
|
@clawsweeper re-review |
Contributor
|
🦞👀 Command router queued. I will update this comment with the next step. |
Contributor
Author
|
Merged via squash.
|
vincentkoc
added a commit
to christian-lallo/openclaw
that referenced
this pull request
Jul 28, 2026
* origin/main: (61 commits) perf(ui): debounce event-driven session list refreshes and right-size child paging (openclaw#115374) feat(talk): support GPT-Live realtime voice over ChatGPT OAuth (openclaw#115226) feat(system-agent): guide gateway configuration in Ask OpenClaw (openclaw#115363) fix(agents): make overflow recovery append-only via branch-and-reappend (openclaw#115271) (openclaw#115310) fix(macos): bound websocket ping so a dropped pong cannot orphan its continuation (openclaw#115362) fix(codex): isolate native hook relay startup (openclaw#115078) fix(ci): stop reviving superseded pull request workflows (openclaw#115378) feat(openshell): add workspace selection (openclaw#114952) fix(skills): persist workshop apply reason; correct Skill Workshop docs (openclaw#114471) fix: agent stops replying when a session transcript has no header row (openclaw#115080) perf(usage): stale-while-revalidate caches for usage.status and sessions.usage (openclaw#115369) fix(discord): reject invalid UTF-8 probe responses (openclaw#111734) feat(gateway): add memory.search operator method (openclaw#115346) fix(android): keep welcome action reachable with large text (openclaw#111747) fix(gateway): validate doctor memory agent ids (openclaw#115365) refactor: harden shell completion and shard Control UI E2E (openclaw#115332) fix(ui): anchor the thread branches menu to its trigger button (openclaw#115352) perf(sessions): incremental snapshot revalidation and shallow list projections (openclaw#115359) refactor(sessions): consolidate entry state (openclaw#115299) feat(ui): swap three plain Lobsterdex palettes for balloon, ascii, and portal (openclaw#115308) ...
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 29, 2026
* refactor(sessions): consolidate entry state * refactor(gateway): unify session kind classification * refactor(sessions): keep entry state types private * test(sessions): drop retired pending delivery case * fix(sessions): clear stale transport-only delivery
steipete
added a commit
that referenced
this pull request
Aug 15, 2026
…he gateway The sessions.changed merge deleted null-tombstoned fields from a hand-kept eleven-field list while the gateway's tombstone policy (session-event-payload.ts) had grown past it: toolOverrides, observerDigest, controlOwnerSessionKey, restartRecoveryStatus, and goal leaked literal null into rows typed optional-not-null, and every new tombstoned field would silently repeat the drift. One loop over the event's null-valued keys now owns the rule; updatedAt/activeLeafEntryId (the schema's only nullable row fields) keep their explicit handling. Net −24 lines. Riders in the same owner neighborhood: - compareSessionRowsByUpdatedAt gains the gateway's ascending-key tie-break (session-list-order.ts: "Stable key ties keep offset paging deterministic") so tied rows — including all updatedAt:null rows — stop visibly swapping when the canonical refresh replaces an event-driven reconcile. - Deleted the unreachable kind === "cron" wire guards (gateway folds cron to direct before projection, #115299; both sites needed an `as string` cast because the protocol type has no such member). - The stale-active-snapshot path returns the original result identity when no defaults were passed, so the caller's result === state.result publish gate skips a spurious sidebar re-render on every stale event.
steipete
added a commit
that referenced
this pull request
Aug 15, 2026
…he gateway (#124104) * fix(ui): reconcile every null tombstone and align session sort with the gateway The sessions.changed merge deleted null-tombstoned fields from a hand-kept eleven-field list while the gateway's tombstone policy (session-event-payload.ts) had grown past it: toolOverrides, observerDigest, controlOwnerSessionKey, restartRecoveryStatus, and goal leaked literal null into rows typed optional-not-null, and every new tombstoned field would silently repeat the drift. One loop over the event's null-valued keys now owns the rule; updatedAt/activeLeafEntryId (the schema's only nullable row fields) keep their explicit handling. Net −24 lines. Riders in the same owner neighborhood: - compareSessionRowsByUpdatedAt gains the gateway's ascending-key tie-break (session-list-order.ts: "Stable key ties keep offset paging deterministic") so tied rows — including all updatedAt:null rows — stop visibly swapping when the canonical refresh replaces an event-driven reconcile. - Deleted the unreachable kind === "cron" wire guards (gateway folds cron to direct before projection, #115299; both sites needed an `as string` cast because the protocol type has no such member). - The stale-active-snapshot path returns the original result identity when no defaults were passed, so the caller's result === state.result publish gate skips a spurious sidebar re-render on every stale event. * test(ui): pin the ascending-key tie for equal-updatedAt sidebar rows * test(ui): tolerate CI renderer jitter in the typing-shift picker guard The 2px y-tolerance flaked at 2.41px on CI renderers; the #122809 regression this guards against shifts by a full indicator row (~20px).
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 16, 2026
…he gateway (openclaw#124104) * fix(ui): reconcile every null tombstone and align session sort with the gateway The sessions.changed merge deleted null-tombstoned fields from a hand-kept eleven-field list while the gateway's tombstone policy (session-event-payload.ts) had grown past it: toolOverrides, observerDigest, controlOwnerSessionKey, restartRecoveryStatus, and goal leaked literal null into rows typed optional-not-null, and every new tombstoned field would silently repeat the drift. One loop over the event's null-valued keys now owns the rule; updatedAt/activeLeafEntryId (the schema's only nullable row fields) keep their explicit handling. Net −24 lines. Riders in the same owner neighborhood: - compareSessionRowsByUpdatedAt gains the gateway's ascending-key tie-break (session-list-order.ts: "Stable key ties keep offset paging deterministic") so tied rows — including all updatedAt:null rows — stop visibly swapping when the canonical refresh replaces an event-driven reconcile. - Deleted the unreachable kind === "cron" wire guards (gateway folds cron to direct before projection, openclaw#115299; both sites needed an `as string` cast because the protocol type has no such member). - The stale-active-snapshot path returns the original result identity when no defaults were passed, so the caller's result === state.result publish gate skips a spurious sidebar re-render on every stale event. * test(ui): pin the ascending-key tie for equal-updatedAt sidebar rows * test(ui): tolerate CI renderer jitter in the typing-shift picker guard The 2px y-tolerance flaked at 2.41px on CI renderers; the openclaw#122809 regression this guards against shifts by a full indicator row (~20px).
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
Session entries carried several clusters of parallel nullable fields for pending final delivery, fallback notices, and memory flush state. Those fields allowed invalid combinations and forced recovery, reset, status, and delivery consumers to reconstruct state independently. Gateway session rows also retained a duplicate kind classifier.
Why This Change Was Made
This maintainer-requested cleanup replaces the three field clusters with closed nested states and normalizes legacy persisted fields once at the session-store read boundary. It also routes Gateway row classification through the shared session-kind owner while preserving the older four-value Gateway wire contract.
Two investigated goals were intentionally skipped:
usageFamilyKey/usageFamilySessionIdsremain because supported file-backed and legacy session stores cannot recover historical JSONL lineage cheaply from the SQLitesession_windowschain.ClawSweeper status: the latest existing comment is a stale review-started placeholder and contains no
Rank-up moves:. Dispatch30384857576succeeded, but exact-review runs30384823618,30385268156,30385738698,30386188180, and30386646553were cancelled before execution; per maintainer ruling, there are no moves to apply and landing proceeds with this publisher wedge recorded.No schema, config, protocol-version, or changelog changes are included. The parked
steipete/session-read-pushdownoverlap files were not touched.User Impact
There is no new user-facing capability. Session recovery and accounting retain their existing behavior with fewer invalid internal states, and legacy persisted session metadata is normalized before consumers observe it.
AI-assisted implementation; the complete diff was reviewed with the repository autoreview workflow.
Evidence
Goal outcomes:
replayable | transport-only; fallback notice is one active record; memory flush issucceeded | failed.directfor its established wire shape.LOC governor:
Validation:
tbx_01kymmwqpwg4qd77d4kf08e36y, run https://github.com/openclaw/openclaw/actions/runs/30372721442pnpm check:changed: passed, including core/core-test/extension/extension-test typechecks and core/extension lintpnpm build: passed; noINEFFECTIVE_DYNAMIC_IMPORTwarningGatewayClientCap, frame types, and protocol-version constants because they are publishedtbx_01kymtgkakdymsjqcgkxsrmn0n, run https://github.com/openclaw/openclaw/actions/runs/30380620625pnpm deadcode:dependencies: passedpnpm deadcode:exports: passed with zero unused exportssrc/agents/agent-command.live-model-switch.test.ts: 109 tests passedorigin/main: clean, no accepted/actionable findings