Repository navigation
fix(gateway): keep session lists responsive with retained subagent history - #116533
Conversation
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
837807d to
3938d04
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
3938d04 to
d197856
Compare
|
@clawsweeper re-review |
d197856 to
c5963dc
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
c5963dc to
d1003d7
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed July 30, 2026, 4:13 PM ET / 20:13 UTC. ClawSweeper reviewWhat this changesThe PR makes gateway session lists load a smaller SQLite projection of retained subagent records, avoiding full payload hydration for topology and display metadata. Merge readinessKeep this PR open for maintainer review. The current head is the same head assessed in the prior ClawSweeper cycle, which found no actionable defect and specifically noted cache-coherence coverage; the author is a repository member and the PR carries the protected Priority: P2 Review scores
Verification
How this fits togetherThe gateway’s flowchart LR
A[Session-list request] --> B[Gateway session projection]
B --> C[Subagent session-list index]
C --> D[SQLite reduced record projection]
D --> E[Short-lived registry cache]
E --> F[Session rows with subagent status]
G[In-memory authoritative runs] --> C
Decision needed
Why: The patch deliberately introduces a second cached view of persisted subagent state; choosing the accepted freshness and maintenance tradeoff is a maintainer judgment, and the protected label plus member authorship prevent automated cleanup. Before merge
Agent review detailsSecurityNone. PR surfaceSource +317, Tests +111. Total +428 across 11 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the dedicated projection only after maintainer review confirms its regression tests cover every list-visible status field and both persisted-write and in-memory-overlay cache refresh paths at the merge head. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: the linked issue supplies a concrete retained-row benchmark and the PR changes the session-list index from full registry hydration to a projected SQLite read. I could not independently execute that benchmark because the read-only command environment rejected inspection commands. Is this the best way to solve the issue? Yes, with a maintainer cache-contract check: a list-specific projection preserves the full-record owner boundary for lifecycle and delivery paths while removing unnecessary payload hydration from session-list reads. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against 78fd4f99fe96. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Maintainer decision: accept the dedicated session-list projection and two-cache design. Exact head
The Rank-up move is satisfied; proceeding with the squash merge. |
…iter-timeout-v20 * origin/main: fix(gateway): project subagent topology for session lists (#116533)
|
Exact merge-result verification for
This satisfies the existing ClawSweeper rank-up move for persisted writes and in-memory authoritative updates. |
Fixes #116506
What Problem This Solves
Fixes an issue where operators listing sessions with retained subagent history would repeatedly hydrate every full retained-run payload from SQLite, even when the requested page was tiny. Large histories could make
sessions.listincreasingly slow.Why This Change Was Made
Session-list reads now use a canonical SQLite projection containing only the topology and display fields required by the existing read index. Lifecycle, recovery, control, and delivery paths continue using full records. The projection has its own short-lived cache, preserves process-local authoritative updates, and does not change the SQLite schema version.
User Impact
Session lists remain responsive as retained subagent history and payload size grow, without changing session metadata or subagent status behavior.
Evidence
main.tbx_01kyt7h229ys5x1q5ya0wfp61n: https://github.com/openclaw/openclaw/actions/runs/30574398883git diff --checkpassed.