Skip to content

fix(gateway): redact CLI-imported history before dedupe - #115597

Merged
steipete merged 2 commits into
mainfrom
steipete/cli-history-redaction-dedupe
Jul 29, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/cli-history-redaction-dedupe

Conversation

@steipete

@steipete steipete commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #112930

What Problem This Solves

Fixes an issue where users viewing Claude CLI-imported chat history in Control UI could see duplicate redacted/full copies and, more importantly, secrets that existed only in the imported CLI transcript.

Why This Change Was Made

Claude CLI messages now pass through the canonical transcript redaction path before history merge and deduplication. This keeps redaction ownership in the existing shared boundary and lets redacted and full copies resolve to the same canonical history entry.

User Impact

Control UI history no longer exposes secrets found only in imported Claude CLI transcripts, and equivalent redacted/full messages appear once instead of as duplicates. This is a security improvement for users who import CLI history.

Evidence

  • node scripts/run-vitest.mjs src/gateway/cli-session-history.test.ts: 44/44 gateway history tests passed after the CI repair, including 5 new regressions covering redacted/full deduplication and imported-only secret filtering.
  • .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main --parallel-tests "node scripts/run-vitest.mjs src/gateway/cli-session-history.test.ts": clean, with no accepted/actionable findings; the attached focused test also passed 44/44.
  • The initial rebase onto origin/main was conflict-free and patch-identical to the previously reviewed commit. The only subsequent production-code change is the compiler-required unknown bridge for the existing type assertion exposed by exact-head CI run 30424544337.

Apply transcript redaction to Claude CLI messages before history merge so locally redacted and imported copies dedupe consistently.

This also prevents secrets present only in the CLI transcript from reaching Control UI chat history.

Fixes #112930
@openclaw-barnacle openclaw-barnacle Bot added the gateway Gateway runtime label Jul 29, 2026
@steipete
steipete marked this pull request as ready for review July 29, 2026 05:15
@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Jul 29, 2026
@steipete
steipete merged commit 95f62ee into main Jul 29, 2026
191 of 197 checks passed
@steipete
steipete deleted the steipete/cli-history-redaction-dedupe branch July 29, 2026 06:02
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 29, 2026
)

* fix: redact imported CLI chat history

Apply transcript redaction to Claude CLI messages before history merge so locally redacted and imported copies dedupe consistently.

This also prevents secrets present only in the CLI transcript from reaching Control UI chat history.

Fixes openclaw#112930

* fix(gateway): type imported history redaction bridge
vincentkoc added a commit that referenced this pull request Jul 29, 2026
…ifecycle-hooks

* origin/main: (60 commits)
  fix(qa): verify paired Ollama nodes over the gateway (#115644)
  fix(active-memory): share one recall per run across retries (#115627)
  refactor: reuse doctor migration durability helpers (#115625)
  docs: fix unsupported pnpm approve-builds -g in global install (#106180)
  feat(openai): support GA realtime over ChatGPT OAuth (#115623)
  feat(agents): add code mode model acceptance matrix (#115305)
  fix(signal): reject malformed base64 attachment data (#114883)
  fix(onboard): reject remote flags in local mode (#115636)
  refactor: table-drive retired model migrations (#115618)
  fix(ui): fall back when profile hero avatar fails (#115600)
  feat: make self-learning automatic by default (#115576)
  fix(agents): report embedded deadlines as timeouts (#115319)
  fix(cli): keep JSON stdout valid through finalization (#115315)
  fix(agents): clarify code mode contract for small models (#115275)
  fix(linux): package media codecs for deb and AppImage (#115616)
  fix(gateway): redact CLI-imported history before dedupe (#115597)
  fix(gateway): bound stalled plugin shutdown (#115619)
  refactor(gateway): deduplicate message operation routing (#115615)
  fix(nodes): cancel paired local inference when callers disconnect (#115624)
  fix(googlechat): surface failed replies without duplicate sends (#115638)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime maintainer Maintainer-authored PR size: S

Projects

None yet

1 participant