Skip to content

revert: skills-used full-transcript scan on every chat history page (#196065) - #200159

Merged
steipete merged 1 commit into
mainfrom
revert/196065-skills-used-full-scan
Nov 16, 2026
Merged

steipete merged 1 commit into
mainfrom
revert/196065-skills-used-full-scan

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Production regression on the Team Gateway right after deploying ade42165 (2026-11-16 07:36 PST). #196065 made readChatHistoryPage (src/gateway/server-methods/chat-history-pages.ts:177) call readChatHistorySkillLoads on every first history page (offset 0, no messageId). That runs readSessionTranscriptSummaryAsync(scope, { kind: "skills-used" }), a single deferred read that visits and prepares visibility for every message in the session's transcript.

On Team, a session with 36,428 transcript events took 55.2 s (07:38:38) and 58.9 s (07:39:46) of SQL per scan. Clients re-request first pages after a restart and on every chat open, so the scan repeated about once a minute. Each time, the session actor was held and its live transcript appends queued 48–59 s. Restart-resume for agent:roboclaw:main timed out (140 s) during this window.

Why This Change Was Made

This is containment: a clean git revert of #196065 (no later commits touch its files). It restores the previous history-page cost on the default chat-open path. A bounded re-land is being worked on separately: an incremental skills-used inventory recorded at append time or as a session fact, or a bounded read only when the details pane opens. Reverting first keeps the large-session write freeze off production meanwhile.

User Impact

Opening chat history no longer triggers a full-transcript scan, and large sessions' writes stop freezing. The "skills used" section in conversation details goes away until the bounded version lands.

Evidence

  • Team Gateway journal on ade42165: sessions.history.read readerOperation sessions.history.skills-used, sqlMs 55,224 (07:38:38 PST) and 58,930 (07:39:46 PST); reservation queue waits up to 59,131 ms on session.actor.appendTranscriptEvent.
  • git revert 3038e2d37d79c applies cleanly on origin/main.
  • node scripts/check-changed.mjs on the revert: see the PR checks; local run below.

Original feature credit: @jacobtomlinson (#196065). The revert is not a judgment on the feature, only on the unbounded read it added to the default chat-open path.

@clawsweeper

clawsweeper Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime scripts Repository scripts labels Nov 16, 2026
@steipete
steipete marked this pull request as ready for review November 16, 2026 15:43
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T15:45:17.580873Z 0151bc7 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@steipete
steipete merged commit 4bce760 into main Nov 16, 2026
210 of 218 checks passed
@steipete
steipete deleted the revert/196065-skills-used-full-scan branch November 16, 2026 15:52
vincentkoc added a commit that referenced this pull request Nov 16, 2026
…tgres-compaction-watched-prompt-20261116

* commit '9e810f7101557b006d5ff223d955f14dc43329f0': (23 commits)
  chore(ui): refresh control ui locales (#200164)
  fix(update): stop reporting unset git config keys as failing checks (#200153)
  test: consolidate redundant coverage (198793, part 2) (#198936)
  revert: skills-used full-transcript scan on every chat history page (#200159)
  refactor(sessions): follow the chat by key for stored delivery references (#200099)
  fix(update): bridge 2026.11.5-beta.4 updaters (#200152)
  fix(gateway): avoid filesystem stalls during catalog refresh (#200136)
  fix(ci): match update refusal probe to selected candidate (#200043)
  fix(agents): keep read-only steering carriers when publishing suppressed user envelopes (#200156)
  test: consolidate suites while retaining recovery owners (#198933)
  test: consolidate redundant coverage (198789, part 2) (#198932)
  refactor(cli): consolidate camera command tests (#200144)
  fix(cli): avoid initializing provider runtime during cleanup (#200139)
  fix(ui): show mobile destinations without the drawer exit delay (#198879)
  chore(ui): refresh control ui locales (#200146)
  fix(knowledge): keep historical claims distinct and reject changed retries (#200140)
  fix(ui): align dropdown arrows on mobile New Session
  improve(sessions): archive inactive transcripts by default (#199899)
  refactor(agents): own background commands and yield waits by the chat (#200097)
  fix(models): guessed non-chat models leave the default picker instead of being refused (#200102)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 17, 2026
…penclaw#200159)

Reverts openclaw#196065: its first-page chat-history skills-used read scanned the full transcript on every chat open. On Team (5b26047) that held the session actor 55-60 s about once a minute on a 36k-event session, freezing transcript appends, pendingInputs mutations and subagent deliveries.

Production containment, merged at pinned head 0151bc7 after local typecheck (core, UI, scripts), lint/ratchet guards, Codex review clean and 65 green / 0 failed CI checks; remaining long CI continues post-merge. Original feature by @jacobtomlinson; a bounded re-land (per-run skillsUsed facts, no full scan) follows.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime scripts Repository scripts size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant