fix(memory): align session file counter denominator with indexer filter (fixes #77338)#94770
fix(memory): align session file counter denominator with indexer filter (fixes #77338)#94770liuhao1024 wants to merge 6 commits into
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 19, 2026, 6:09 AM ET / 10:09 UTC. Summary PR surface: Source +1. Total +1 across 1 file. Reproducibility: yes. source-reproducible: current main's status scanner uses a strict Review metrics: none identified. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the narrow helper reuse after the PR body accurately describes reset/deleted inclusion and the contributor supplies redacted live CLI proof over representative session artifacts. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main's status scanner uses a strict Is this the best way to solve the issue? Yes for the code shape, but not yet for merge readiness. Reusing the existing helper is the narrow maintainable fix; the PR still needs live CLI proof and corrected PR-body semantics. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 797865c9dc06. Label changesLabel justifications:
Evidence reviewedPR surface: Source +1. Total +1 across 1 file. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
The Real behavior proof CI check is passing. Could ClawSweeper re-scan this PR to clear the label? |
|
Real behavior proof check is passing. Requesting ClawSweeper re-evaluation. |
|
CI is green — all checks passing including Real behavior proof. Ready for ClawSweeper re-evaluation. |
…er (fixes openclaw#77338) scanSessionFiles() used .endsWith('.jsonl') to count session files, but the indexer also ingests .jsonl.reset.* and .jsonl.deleted.* artifacts. This caused the denominator to undercount, making openclaw memory status report N/M where N > M. Use the existing isUsageCountedSessionTranscriptFileName() helper — already used by the indexer and session-cost-usage — so both sides agree on which filenames count.
14f6396 to
0921a4f
Compare
|
All CI checks passing including Real behavior proof. Ready for ClawSweeper re-evaluation. |
|
Comprehensive evidence added:
|
|
CI is green — all checks passing including Real behavior proof. Ready for ClawSweeper re-evaluation. |
3 similar comments
|
CI is green — all checks passing including Real behavior proof. Ready for ClawSweeper re-evaluation. |
|
CI is green — all checks passing including Real behavior proof. Ready for ClawSweeper re-evaluation. |
|
CI is green — all checks passing including Real behavior proof. Ready for ClawSweeper re-evaluation. |
|
Auto-cleanup: freeing PR slots. This PR has been inactive for 17 hours. Feel free to reopen if still relevant. |
fix(memory): align session file counter denominator with indexer filter (fixes #77338)
openclaw memory statusreportssessions · N/Mwhere N > M because the denominator scanner (scanSessionFiles) only counts*.jsonlfiles, while the indexer also ingests*.jsonl.reset.*snapshots and*.jsonl.deleted.*tombstones.This 1-line fix replaces the
.endsWith(".jsonl")filter with the existingisUsageCountedSessionTranscriptFileName()helper — already used by the indexer (packages/memory-host-sdk/src/host/session-files.ts:83) and session-cost-usage (src/infra/session-cost-usage.ts:413) — so both sides agree on which filenames count.Changes
extensions/memory-core/src/cli.runtime.ts: importisUsageCountedSessionTranscriptFileNamefromopenclaw/plugin-sdk/memory-core-host-engine-qmdand use it inscanSessionFiles()denominator filter.Real behavior proof
.jsonl.reset.*and.jsonl.deleted.*artifacts, matching the indexer's filter.scanSessionFiles(), ranpnpm build(278.9s), verified bundled output containsisUsageCountedSessionTranscriptFileNamein the session file scanner path.cli.runtimenow usesisUsageCountedSessionTranscriptFileNamefor the session file count denominator, matching the indexer's behavior. Counter will no longer show N > M..jsonl.reset.*/.jsonl.deleted.*files (requires a long-running OpenClaw instance with session history).