Skip to content

fix(status): label stored sessions accurately - #146979

Merged
steipete merged 1 commit into
mainfrom
codex/qa-status-stored-count-20260913
Sep 13, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/qa-status-stored-count-20260913

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

The status overview calls its stored-session inventory “active,” including when every counted conversation is archived.

User Impact

The Sessions row now says “stored.” Counts, JSON output, and the separate active-agent measure in status --all keep their existing meaning.

Why This Change Was Made

The canonical SQLite summary counts readable stored conversation rows in the selected physical stores. The formatter now labels that fact correctly, and the documentation explains archived-row inclusion. No schema, persistence, configuration, lifecycle, or count arithmetic changes are needed. Production is +2/−2 (net zero), with 60 net regression-test lines and two documentation lines.

Evidence

Four baseline assertions failed on the misleading unit; the final focused and sibling suite passes all 38 tests. Before and after normal builds, the actual built CLI ran status, status --json, and status --all in empty, ordinary, mixed-archive, and all-archived synthetic states: 24 native invocations in total. Counts of 0, 1, 4, and 4 changed only from “active” to “stored.” JSON inventory, shared-store/retired-namespace counts, and zero active-agent controls stayed unchanged.

Every command exited naturally with complete output; all eight fixture roots were removed. Full stdout comparisons match after only fixture paths, dynamic JSON ages, and the intended unit are normalized. The normal explicit-base gate passed all 30 checks, and fresh managed P0–P2 review found no actionable findings. Proof is bound to ce6718fd82a492b7c1f2b068e1c68477fd9a8b7f; builds/native runs precede a test-only import reorder subsequently covered by tests, checks, and review. No live Gateway, provider, or channel was used.

@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation commands Command implementations size: S maintainer Maintainer-authored PR labels Sep 13, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 7:37 AM ET / 11:37 UTC.

ClawSweeper review

What this changes

Changes the CLI Sessions inventory label from “active” to “stored,” documents archived-row inclusion, and adds regression coverage.

Merge readiness

✅ Ready for maintainer review

This remains a useful, focused correction: current main and v2026.9.4 still describe stored sessions as active. No actionable patch defect was found.

Priority: P3
Reviewed head: faa94890dd63f5cd2f1b7877e551dfc473dd25fc

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused correction with meaningful regression coverage and relevant author-reported CLI validation; no blocking defect was found.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The supplied member-author context exempts this PR from the external-contributor proof gate. Its body reports relevant built-CLI before/after runs through the changed formatter, including archived inventories and unchanged JSON; raw runtime transcripts were not supplied.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied member-author context exempts this PR from the external-contributor proof gate. Its body reports relevant built-CLI before/after runs through the changed formatter, including archived inventories and unchanged JSON; raw runtime transcripts were not supplied.
Evidence reviewed 7 items Current main still needs the correction: The fetched main revision still formats sessions.count as “active”; the PR changes only that label and its explanatory comment.
Latest supplied release retains the old label: The v2026.9.4 formatter also says “active”; the requested wording is not present in that release.
Inventory semantics support stored wording: The SQLite summary counts readable conversation rows without excluding archived entries. The status store collector deduplicates physical stores and retains retired agent namespaces in the aggregate.
Findings None None.
Security None None.

How this fits together

The status command reads conversation inventories from local SQLite stores and formats them for operators. Stored-session totals and recent agent activity are separate measurements.

flowchart LR
  A[Local conversation stores] --> B[Read-only inventory]
  B --> C[Session count and recent rows]
  C --> D[Status overview formatter]
  D --> E[Stored sessions label]
  C --> F[JSON status output]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source 0, Tests +60, Docs +2. Total +62 across 5 files.

View PR surface stats
Area Files Added Removed Net
Source 1 2 2 0
Tests 3 62 2 +60
Docs 1 2 0 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 66 4 +62

Review metrics

None.

Technical review

Best possible solution:

Keep the existing inventory calculation and label it accurately, preserving JSON counts and the separate recent-activity measure.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: archived conversation rows contribute to the inventory that current main labels “active.” The added SQLite-to-overview cases cover this mismatch; execution was not repeated during this read-only review.

Is this the best way to solve the issue?

Yes. Correcting the existing formatter is the narrowest repair because the inventory calculation is intentional and the active-agent measurement already has its own owner.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 4883e4699ee3.

Labels

Label changes:

  • add P3: Corrects misleading diagnostic wording without changing session counting, storage, or runtime behavior.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The supplied member-author context exempts this PR from the external-contributor proof gate. Its body reports relevant built-CLI before/after runs through the changed formatter, including archived inventories and unchanged JSON; raw runtime transcripts were not supplied.

Label justifications:

  • P3: Corrects misleading diagnostic wording without changing session counting, storage, or runtime behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The supplied member-author context exempts this PR from the external-contributor proof gate. Its body reports relevant built-CLI before/after runs through the changed formatter, including archived inventories and unchanged JSON; raw runtime transcripts were not supplied.

Evidence

What I checked:

  • Current main still needs the correction: The fetched main revision still formats sessions.count as “active”; the PR changes only that label and its explanatory comment. (src/commands/status-overview-values.ts:115, 4883e4699ee3)
  • Latest supplied release retains the old label: The v2026.9.4 formatter also says “active”; the requested wording is not present in that release. (src/commands/status-overview-values.ts:115, 3a9d69db306c)
  • Inventory semantics support stored wording: The SQLite summary counts readable conversation rows without excluding archived entries. The status store collector deduplicates physical stores and retains retired agent namespaces in the aggregate. (src/config/sessions/session-accessor.sqlite-summary.ts:36, faa94890dd63)
  • Regression coverage reaches the displayed row: The new mixed-archive and all-archived cases populate SQLite, verify aggregate and per-agent counts, and pass the real status summary into the overview row builder. Existing formatter and row assertions are updated without adding a production testing seam. (src/status/summary.read-only.test.ts:333, faa94890dd63)
  • Reported runtime validation: The supplied complete PR body reports 24 built-CLI invocations across status, status --json, and status --all in empty, ordinary, mixed-archive, and all-archived synthetic states. It reports unchanged counts and JSON, the intended wording change, 38 passing tests, and a subsequent test-only import reorder. These are author-reported observations; this read-only review did not execute the CLI or tests. (faa94890dd63)
  • Area-history routing: Current-main history lists Peter Steinberger on recent status snapshot, shared-store, and bounded-read work. Raw commit metadata confirms authorship of the snapshot commit. Exact historical line introduction could not be established because required older objects were unavailable; no introduction attribution is made. (src/status/session-stores.ts, d945743bb288)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit f43083e into main Sep 13, 2026
192 checks passed
@steipete
steipete deleted the codex/qa-status-stored-count-20260913 branch September 13, 2026 12:09
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 13, 2026
* commit '4aff70f27016f9acf62d0acc19c8bd3592993e4c': (1537 commits)
  test: align plugin fixtures with current runtime contracts (#147000)
  refactor(browser): separate session tab tracking from cleanup (#146973)
  fix(tests): make systemd clock fixtures private (#146990)
  fix(linux): retire sleep guards when logind disconnects (#146046)
  refactor(matrix): share draft fallback delivery (#144840)
  fix(sessions): preserve cross-agent replies after reload (#146799)
  test(models): cover quota recovery during catalog discovery (#146708)
  fix(macos): recover browser sign-in when no browser opens (#146787)
  fix(process): prevent one-shot agents exiting while polling (#144268)
  fix(status): label the session inventory as stored (#146979)
  fix: avoid repeated background reads while loading chat (#146953)
  refactor(ui): narrow Skill Workshop proposal context (#146977)
  perf(sessions): keep cleanup responsive and reuse workers (#140897)
  fix(sessions): prevent stranded writers after abort and restart (#146792)
  refactor: reuse deferred owners in Gateway and infra fixtures (#146809)
  fix: prevent queued conversation replies from switching storage (#146984)
  test(ui): preserve nested failure summaries in CI logs (#146864)
  fix(test): respect process memory limits in local scheduling (#146298)
  fix: validate large media data URLs without regexp stack exhaustion (#146972)
  fix(ui): label model usage contributions as messages (#146735)
  ...
vincentkoc added a commit that referenced this pull request Sep 13, 2026
* temp/pr-145950: (101 commits)
  refactor(memory-wiki): share freshness result construction (#146935)
  improve(gateway): use metadata projection for presence (#146817)
  test(agents): reuse complete Responses model fixtures (#147015)
  fix(sessions): align the reclamation-memory test with the archive session owner (#147028)
  refactor(terminal): simplify copy-sensitive token checks (#146934)
  refactor(media): remove duplicate spaced path fallback (#146933)
  refactor(cli): reuse command-group names (#146893)
  improve(plugins): reduce JavaScript generation capture work (#146993)
  test: align plugin fixtures with current runtime contracts (#147000)
  refactor(browser): separate session tab tracking from cleanup (#146973)
  fix(tests): make systemd clock fixtures private (#146990)
  fix(linux): retire sleep guards when logind disconnects (#146046)
  refactor(matrix): share draft fallback delivery (#144840)
  fix(sessions): preserve cross-agent replies after reload (#146799)
  test(models): cover quota recovery during catalog discovery (#146708)
  fix(macos): recover browser sign-in when no browser opens (#146787)
  fix(process): prevent one-shot agents exiting while polling (#144268)
  fix(status): label the session inventory as stored (#146979)
  fix: avoid repeated background reads while loading chat (#146953)
  refactor(ui): narrow Skill Workshop proposal context (#146977)
  ...
vincentkoc added a commit that referenced this pull request Sep 13, 2026
* commit '060e856e5f9df245d63c98990fcb47e18108c6b9': (97 commits)
  refactor(memory-wiki): share freshness result construction (#146935)
  improve(gateway): use metadata projection for presence (#146817)
  test(agents): reuse complete Responses model fixtures (#147015)
  fix(sessions): align the reclamation-memory test with the archive session owner (#147028)
  refactor(terminal): simplify copy-sensitive token checks (#146934)
  refactor(media): remove duplicate spaced path fallback (#146933)
  refactor(cli): reuse command-group names (#146893)
  improve(plugins): reduce JavaScript generation capture work (#146993)
  test: align plugin fixtures with current runtime contracts (#147000)
  refactor(browser): separate session tab tracking from cleanup (#146973)
  fix(tests): make systemd clock fixtures private (#146990)
  fix(linux): retire sleep guards when logind disconnects (#146046)
  refactor(matrix): share draft fallback delivery (#144840)
  fix(sessions): preserve cross-agent replies after reload (#146799)
  test(models): cover quota recovery during catalog discovery (#146708)
  fix(macos): recover browser sign-in when no browser opens (#146787)
  fix(process): prevent one-shot agents exiting while polling (#144268)
  fix(status): label the session inventory as stored (#146979)
  fix: avoid repeated background reads while loading chat (#146953)
  refactor(ui): narrow Skill Workshop proposal context (#146977)
  ...
vincentkoc added a commit that referenced this pull request Sep 13, 2026
* commit '4aff70f27016f9acf62d0acc19c8bd3592993e4c': (30 commits)
  test: align plugin fixtures with current runtime contracts (#147000)
  refactor(browser): separate session tab tracking from cleanup (#146973)
  fix(tests): make systemd clock fixtures private (#146990)
  fix(linux): retire sleep guards when logind disconnects (#146046)
  refactor(matrix): share draft fallback delivery (#144840)
  fix(sessions): preserve cross-agent replies after reload (#146799)
  test(models): cover quota recovery during catalog discovery (#146708)
  fix(macos): recover browser sign-in when no browser opens (#146787)
  fix(process): prevent one-shot agents exiting while polling (#144268)
  fix(status): label the session inventory as stored (#146979)
  fix: avoid repeated background reads while loading chat (#146953)
  refactor(ui): narrow Skill Workshop proposal context (#146977)
  perf(sessions): keep cleanup responsive and reuse workers (#140897)
  fix(sessions): prevent stranded writers after abort and restart (#146792)
  refactor: reuse deferred owners in Gateway and infra fixtures (#146809)
  fix: prevent queued conversation replies from switching storage (#146984)
  test(ui): preserve nested failure summaries in CI logs (#146864)
  fix(test): respect process memory limits in local scheduling (#146298)
  fix: validate large media data URLs without regexp stack exhaustion (#146972)
  fix(ui): label model usage contributions as messages (#146735)
  ...
steipete added a commit that referenced this pull request Sep 13, 2026
Gateway diagnostics count stored sessions, including archived rows. Correct both command aliases through their shared formatter and cover the real stored inventory. Completes the terminology correction from #146979; production net zero lines.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 14, 2026
steipete added a commit that referenced this pull request Sep 15, 2026
Gateway diagnostics count stored sessions, including archived rows. Correct both command aliases through their shared formatter and cover the real stored inventory. Completes the terminology correction from #146979; production net zero lines.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 16, 2026
Gateway diagnostics count stored sessions, including archived rows. Correct both command aliases through their shared formatter and cover the real stored inventory. Completes the terminology correction from openclaw#146979; production net zero lines.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations docs Improvements or additions to documentation maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant