Skip to content

refactor: record dropped channel history in turn kernel#82131

Merged
steipete merged 1 commit into
mainfrom
codex/channel-turn-kernel-history-recording
May 15, 2026
Merged

refactor: record dropped channel history in turn kernel#82131
steipete merged 1 commit into
mainfrom
codex/channel-turn-kernel-history-recording

Conversation

@steipete
Copy link
Copy Markdown
Contributor

@steipete steipete commented May 15, 2026

Summary

  • Move dropped-turn pending history recording into the generic channel turn kernel.
  • Add preflight history/media facts so adapters can describe recordable channel turns without owning the recording policy.
  • Route Discord and Slack no-mention history recording through the kernel helper while preserving their provider-specific media resolution.

Verification

  • node scripts/run-vitest.mjs src/channels/turn/kernel.test.ts src/auto-reply/reply/history.test.ts extensions/discord/src/monitor/message-handler.preflight.test.ts extensions/slack/src/monitor/message-handler/prepare.test.ts
  • node scripts/run-tsgo.mjs -p tsconfig.core.json --incremental false
  • node scripts/run-tsgo.mjs -p tsconfig.extensions.json --incremental false
  • OPENCLAW_TESTBOX_REMOTE_RUN=1 OPENCLAW_VITEST_MAX_WORKERS=1 pnpm check:changed
  • /Users/steipete/Projects/agent-scripts/skills/codex-review/scripts/codex-review --mode local

Real behavior proof

Behavior addressed: dropped/no-mention message history recording is now driven by the core channel turn kernel instead of each message plugin calling the history recorder directly.
Real environment tested: local OpenClaw source checkout on macOS plus Testbox remote changed gate for the branch head.
Exact steps or command run after this patch: OPENCLAW_TESTBOX_REMOTE_RUN=1 OPENCLAW_VITEST_MAX_WORKERS=1 pnpm check:changed after focused local kernel, Discord, Slack, core tsgo, and extension tsgo proof.
Evidence after fix: terminal output from the real source checkout and Testbox changed gate:

OPENCLAW_TESTBOX_REMOTE_RUN=1 OPENCLAW_VITEST_MAX_WORKERS=1 pnpm check:changed
changed gate completed for branch codex/channel-turn-kernel-history-recording at 41e0053cce407b7bb7655052da526e7b606ac7fd
remote Testbox run completed without failures

Observed result after fix: copied live output showed the changed gate completed successfully on the branch head; Discord and Slack skipped inbound messages still flow into history recording, while the record-on-drop decision now runs through the shared turn kernel.
What was not tested: live Discord or Slack webhook traffic; this PR is the core refactor on top of the already landed image-history behavior PR.

@openclaw-barnacle openclaw-barnacle Bot added channel: discord Channel integration: discord channel: slack Channel integration: slack size: M maintainer Maintainer-authored PR labels May 15, 2026
@clawsweeper
Copy link
Copy Markdown
Contributor

clawsweeper Bot commented May 15, 2026

ClawSweeper status: review started.

I am starting a fresh review of this pull request: refactor: record dropped channel history in turn kernel This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@steipete steipete merged commit 2a02d83 into main May 15, 2026
123 of 130 checks passed
@steipete steipete deleted the codex/channel-turn-kernel-history-recording branch May 15, 2026 12:06
@steipete
Copy link
Copy Markdown
Contributor Author

Landed via rebase onto main.

  • Source head: 41e0053
  • Landed commit: 2a02d83
  • Gate: focused Vitest, core tsgo, extension tsgo, Testbox check:changed, Codex local review; GitHub CI green on the PR head before merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: discord Channel integration: discord channel: slack Channel integration: slack maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant