Skip to content

fix(sessions): stop false indexing notices in complete searches - #167174

Merged
steipete merged 2 commits into
mainfrom
ci-speed-spd7-gateway-ui-wave
Oct 8, 2026
Merged

steipete merged 2 commits into
mainfrom
ci-speed-spd7-gateway-ui-wave

Conversation

@steipete

@steipete steipete commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Related: #167029

What Problem This Solves

Complete searches across agents can incorrectly report that conversations are still indexing.

User Impact

The command palette can present complete results without a false indexing notice. Pending indexing and changed search snapshots retain their existing warnings.

Why This Change Was Made

The search revision contains a connection-specific identity and SQLite data version. After foreground history reads became parallel, the later revision check could run on another worker and fail to certify an unchanged result. Run the paired reads on the existing single-reader projection lane. Ordinary foreground history remains parallel; no schema, storage, permission, or migration changes are needed.

Evidence

  • Unchanged real-Gateway palette test: parent 2095264a9271 passes; 6aa926265782 (perf(sessions): parallelize foreground transcript reads #167029) and current main fail at the indexing assertion; this fix passes the full case.
  • Search worker contracts: 2/2 pass, including foreign-write and reader-retirement checks.
  • Full check:architecture passes, with zero runtime and Madge cycles; formatting, changed-file lint, boundary lint, and P2 review pass.
  • No assertions, retries, or timeouts changed. The passing palette case took 14.69 seconds (54.71 seconds for the complete single-file Vitest invocation).

Linux owning-config and original-shard replay remain unrun: AWS refused the shared fleet cap and Testbox timed out after 15 minutes without a runner. Full typecheck and check-changed also remain unrun. The focused proof above ran through the repository harness as individual files on macOS; no workflow was dispatched or rerun.

Keep search hits and their connection-local revision check on the existing
single-reader projection lane. The parallel history pool introduced by
#167029 could validate a token on another connection and report complete
results as still indexing.

Ordinary foreground history stays parallel. Preserve maintenance readiness,
foreign-commit checks, authorization, and database cleanup. The unchanged
real-Gateway palette test fails at #167029 and passes at its parent and with
this fix; no schema or data migration is required.
@clawsweeper

clawsweeper Bot commented Oct 8, 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.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 Oct 8, 2026
@clawsweeper

clawsweeper Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 8, 2026, 7:18 AM ET / 11:18 UTC (Revision 2).

ClawSweeper review

What this changes

The PR runs conversation searches and their freshness checks on the existing single-reader worker lane to prevent false indexing notices.

Example: Search conversations for copperfinch in the command palette.

  • Before: Complete results can display “Indexing older messages — search again shortly.”
  • After: Complete results appear without the false indexing notice.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused root-cause repair with reported production-entry regression proof, preserved freshness safeguards, and no actionable findings.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: This area-owner PR is outside the ordinary external-contributor proof gate. Its complete body reports macOS before/after verification through the real Gateway and production command palette; inspected assertions cover complete five-agent searches without false indexing notices. Execution artifacts were not independently inspected. The delta changes no stored representation, schema, or migration contract.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: The command palette tells users that fully indexed conversations are still indexing.
Reason: Accurate search status is an established contract, and this small repair restores it. Prior merged area history establishes owner direction without introducing configuration or changing the public contract.

Regression provenance

Possible regression — probable (reviewed change; known regression link). No predecessor PR is attributed.

Merge readiness

✅ Ready for maintainer review

This PR remains necessary: current main can validate a connection-bound search revision on a different worker and falsely report indexing. The focused repair preserves freshness safeguards, and no actionable patch defect was found.

Priority: P2
Reviewed head: 7613f45d09e1bb14534f5be3e8c9c2c92f0198a9

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Gateway searches conversation messages stored in per-agent SQLite databases and returns matching messages plus indexing status to the command palette. Database workers perform those reads outside the Gateway request thread.

flowchart TD
  A[Command palette query] --> B[Gateway conversation search]
  B --> C[Single-reader worker lane]
  C --> D[Message hits and connection revision]
  D --> E[Index readiness check]
  E --> F[Freshness check on same reader]
  F --> G[Results and indexing status]
Loading

Technical review

Best possible solution:

Keep connection-bound search certification on the existing single-reader lane while ordinary history reads retain parallel workers.

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

Yes: current source dispatches separate requests through parallel workers while requiring connection identity equality, and the unchanged real-Gateway case reportedly fails at the indexing assertion. This read-only review did not execute the reproduction.

Is this the best way to solve the issue?

Yes: selecting the existing single-reader lane repairs the connection mismatch without weakening freshness validation or creating another worker owner.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: shipped entry point. Added test files: 0.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 359eb9c adds src/config/sessions/session-transcript-search.ts:58 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 359eb9c88f67; files: src/config/sessions/session-transcript-search.ts)

PR surface

Source +5. Total +5 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 1 12 7 +5
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 12 7 +5

Labels

Label changes:

No label changes.

Label justifications:

  • P2: The regression presents misleading indexing status while matching conversation results remain available.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only; repair and merge need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-08T10:58:53.479Z sha c502cec :: needs maintainer review before merge. :: none

@steipete
steipete enabled auto-merge (squash) October 8, 2026 11:02
@steipete
steipete merged commit 888bd0d into main Oct 8, 2026
107 checks passed
@steipete
steipete deleted the ci-speed-spd7-gateway-ui-wave branch October 8, 2026 11:23
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 9, 2026
…law#167174)

Keep search hits and their connection-local revision check on the existing
single-reader projection lane. The parallel history pool introduced by
openclaw#167029 could validate a token on another connection and report complete
results as still indexing.

Ordinary foreground history stays parallel. Preserve maintenance readiness,
foreign-commit checks, authorization, and database cleanup. The unchanged
real-Gateway palette test fails at openclaw#167029 and passes at its parent and with
this fix; no schema or data migration is required.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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