Repository navigation
fix(sessions): avoid saved-prompt decoding in metadata listings - #191677
Merged
Merged
Conversation
Reuse the existing list projection for catalog fallback, memory target discovery, and trajectory identity matching. Remove two redundant keyed trajectory reads while retaining full runtime listings by default. Co-authored-by: DakshK-02 <[email protected]>
Resolve short and padded session keys with the existing storage identity resolver before looking them up in the projected rows. Cover accepted key forms while preserving zero saved-prompt decodes. Co-authored-by: DakshK-02 <[email protected]>
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. |
roboclaw-bot
marked this pull request as ready for review
November 3, 2026 04:45
Collaborator
Author
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 4, 2026
…claw#191677) Avoid saved-prompt decoding in metadata-only trajectory, memory-target, and catalog listings using the existing list projection. Reuse listed trajectory rows instead of two additional keyed reads, preserving canonical keys and the full runtime listing default. Supersedes openclaw#149358, thanks @DakshK-02. Evidence: saved-prompt decode regressions red on main and green after the fix; 87 distinct focused tests pass; touched-file lint and format pass; final committed-range Codex autoreview P0-P2 has no actionable findings. Production LOC net zero. Exact-head PR CI retains the inherited 443-line test-ceiling failure, reproduced on clean main in Crabbox; the change's 70 new test lines have matching allocation credit. Native attributed-failure admission preserves that failed result and enforces the other gates. Co-authored-by: DakshK-02 <[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.
Supersedes #149358, thanks @DakshK-02.
What Problem This Solves
Fixes unnecessary saved-prompt decoding when trajectory export, memory target discovery, or a session catalog fallback only needs session metadata from a large store.
User Impact
These metadata scans avoid loading saved session snapshots. Existing full runtime listings keep their default behavior; no configuration or migration is required.
Why This Change Was Made
Use the existing list projection at the remaining reads, forward its optional selector through the existing synchronous runtime listing, and reuse projected trajectory rows instead of performing two additional keyed reads. The catalog fallback now matches the Gateway's metadata snapshot; callers needing a complete entry should use an exact getter before replacing it.
Current main already moved the other named agent and ownership scans to worker-backed summaries or removed their old scans. The file-transfer plugin has no remaining session-list read. This replacement retains the useful remaining work without restoring those retired paths or adding storage APIs.
Production delta: net zero lines, including removal of the duplicate trajectory entry reads. The 70 added regression-test lines cover saved-prompt decoding, accepted session-key forms, and the retained full-list default; their separate test-line allocation leaves the shared baseline unchanged.
Evidence
b655b248d0a5af7f044c4e756269da88bdaa18c3, focused regressions fail on saved-prompt decode counts: trajectory marker export 3; memory target discovery 1 in each of default, custom, and shared stores; runtime metadata listing 1. Catalog spies also show the missing projection. After the fix, all counts are 0 and 85 focused tests pass. The final trajectory pass is 43/43 green, including two additional accepted key forms through the existing key resolver, for 87 distinct passing tests across the four files.src/trajectory/export.test.ts,src/plugin-sdk/memory-core-host-engine-sessions.test.ts,src/plugins/runtime/runtime-agent.test.ts, andsrc/plugins/session-catalog.test.ts. Combined green command: 61.13 seconds including worker preparation; CI timing will be available in the PR checks.2d8321e9cff54d779afa35c37cf59b4bf02be75bagainst that main baseline: Codex, P0–P2, scoped clean; no actionable findings remain. An earlier index-only key-lookup finding was fixed with the existing resolver and covered by the final trajectory run. Type-aware lint and format checks pass on all touched files.fc8afdae15b979e51b4a5ac1560f861f979ad07f, the CI merge's first parent, reproduces the same 443-line overage in Crabbox run 41581070824: 6,420,146 lines / 6,419,703 ceiling, exit 1. The PR merge has 6,420,216 / 6,419,773: its 70 added lines have exactly 70 allocation lines of credit, leaving the overage unchanged. The checker and shared baseline are byte-identical between main and the CI merge. Every other selected job passed, including all three PostgreSQL shards, types, lint, build, and security. Landing uses the native attributed-failure route; the failed ratchet and its CI aggregate remain recorded as failed.gh pr view/gh pr diff; it was never checked out or executed. Only main plus this independent replacement ran in Crabbox. No tests, worker compilation, or broad checks ran on the production Team host. Native landing dependencies were installed under the IO gate and idle priority, with lifecycle scripts disabled for the task checkout; the native wrapper owns its separate managed dependency cache.