Skip to content

refactor(slack): remove cache test reset seams - #125971

Merged
steipete merged 1 commit into
mainfrom
refactor/remove-slack-cache-test-seams
Aug 18, 2026
Merged

steipete merged 1 commit into
mainfrom
refactor/remove-slack-cache-test-seams

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Slack cache tests depended on production-only reset exports and a historical media-module resolver barrel. That made behavior tests clear internal module state instead of isolating through the cache identities production actually uses.

Why This Change Was Made

Tests now isolate conversation-info caching through distinct Slack-shaped channel IDs and thread-starter caching through distinct account/team/channel/thread identities. Cache reuse, credential rotation, fresh-name authorization, failed-DM retry, TTL refetch, account/team isolation, and the exact 1024-entry and 2000-entry capacity boundaries remain covered. Two impossible-clock thread-cache cases were removed because they replay the shared normalization-core timestamp contract.

Production behavior is unchanged. This removes the two test-only reset exports and the obsolete thread-resolver re-exports from media.ts; runtime callers already import from thread.ts.

User Impact

No user-visible behavior changes. No docs, changelog, schema, protocol, config, dependency, operator-state, release, or publish changes.

Evidence

  • node scripts/run-vitest.mjs extensions/slack/src/channel-type.test.ts — 18 passed
  • node scripts/run-vitest.mjs extensions/slack/src/monitor/monitor.media.test.ts extensions/slack/src/monitor/media.test.ts extensions/slack/src/monitor/message-handler/prepare.test.ts extensions/slack/src/monitor.tool-result.test.ts — 259 passed
  • node scripts/run-vitest.mjs extensions/slack — 135 files, 2,417 tests passed
  • node scripts/check-changed.mjs -- extensions/slack/src/channel-type.test.ts extensions/slack/src/channel-type.ts extensions/slack/src/monitor/media.test.ts extensions/slack/src/monitor/media.ts extensions/slack/src/monitor/message-handler/prepare.test.ts extensions/slack/src/monitor/monitor.media.test.ts extensions/slack/src/monitor/thread.ts — passed
  • git diff --check — passed
  • Codex-backed autoreview — clean, no accepted/actionable findings

Production LOC: +0/-13 (net -13). Tests: +93/-125 (net -32). Total: +93/-138 across seven files.

AI-assisted: implemented and validated with Codex; the final diff was reviewed by the repository autoreview workflow.

@clawsweeper

clawsweeper Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@steipete
steipete marked this pull request as ready for review August 18, 2026 19:32
@openclaw-barnacle openclaw-barnacle Bot added channel: slack Channel integration: slack size: M maintainer Maintainer-authored PR labels Aug 18, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready proof for exact head 4fba270cacbf67d355703370ee0e618596cacdc7:

  • exact-head required CI: green via node scripts/watch-pr-ci.mjs 125971 4fba270cacbf67d355703370ee0e618596cacdc7
  • focused tests: 18 channel-type tests and 259 monitor/media/prepare/tool-result tests passed
  • Slack-wide tests: 135 files, 2,417 tests passed
  • changed-file gate and git diff --check: passed
  • Codex-backed autoreview: clean, no accepted/actionable findings
  • native review artifacts: READY FOR /prepare-pr, behavioral sweep pass, issue validation valid, zero findings
  • native Testbox prepare: passed; prepared head is patch-identical to the PR head

ClawSweeper exact-head review started for this SHA at 2026-08-18T19:36:21Z but has only published its live start placeholder. Rank-up moves: has not been published, so there is no move to apply or explicitly skip. Proceeding under the repository rule that a queued or late review publisher does not block landing; any late rating remains a refresh rather than a merge gate.

Production LOC is +0/-13; tests are +93/-125. No user-visible behavior, docs, changelog, schema, protocol, config, dependency, release, publish, or operator-state change.

@steipete
steipete merged commit 6f8e5d9 into main Aug 18, 2026
153 of 160 checks passed
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@steipete
steipete deleted the refactor/remove-slack-cache-test-seams branch August 18, 2026 19:47
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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