Skip to content

chore(discord): consolidate message media fixtures - #117695

Merged
steipete merged 1 commit into
mainfrom
codex/goal100k-discord-message-media-fixtures-2d45
Aug 2, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/goal100k-discord-message-media-fixtures-2d45

Conversation

@steipete

@steipete steipete commented Aug 1, 2026

Copy link
Copy Markdown
Contributor
Additional instructions

MUST: Keep Allow edits from maintainers enabled for this PR so maintainers
can help update the branch when needed.

What Problem This Solves

The Discord message-media test suite repeated attachment, sticker, and successful-download setup across nearly every scenario, making the security- and MIME-sensitive coverage harder to scan and maintain.

Why This Change Was Made

Introduces typed, fresh fixture factories for Discord attachments, sticker items, and download results, and centralizes mock reset between tests. The refactor keeps scenario bodies and assertions explicit: no test tables, assertion packing, or production changes.

User Impact

No user-visible behavior changes. The test suite is 302 lines smaller while retaining the same Discord media coverage and stronger per-test mock isolation.

Evidence

  • Exact parity audit: 31 registrations / 33 expanded scenarios in identical order; 50 lexical expect expressions identical; 111 runtime expectations preserved (35 direct + 4 success helpers × 18 + 2 fallback helpers × 2).
  • Security and lifecycle coverage retained: Discord CDN allowlist, RFC2544 proxy exception, injected fetch implementation, read-idle timeout, total-timeout abort, caller abort, hostile/missing URLs, MIME precedence, forwarded snapshots, and referenced forwards.
  • Trusted Blacksmith Testbox focused proof: 5 files / 75 tests passed, including all 33 target tests plus referenced-media, message-text, message-utils, and thread-starter siblings (run).
  • Trusted Blacksmith Testbox pnpm check:changed: passed extension-test typecheck, lint, formatting, dead-code scans, dependency pins, plugin boundaries, and extension tests on the same lease.
  • Independent gpt-5.6-sol xhigh autoreview: no findings; patch correct (0.97 confidence).
  • Latest origin/main synthetic merge: clean; merged target blob exactly matches the reviewed commit.
  • LOC: +147 / -449 in one test file; production LOC delta: 0.

@openclaw-barnacle openclaw-barnacle Bot added channel: discord Channel integration: discord size: L maintainer Maintainer-authored PR labels Aug 1, 2026
@steipete steipete self-assigned this Aug 1, 2026
@steipete
steipete merged commit e9d70a5 into main Aug 2, 2026
92 of 96 checks passed
@steipete
steipete deleted the codex/goal100k-discord-message-media-fixtures-2d45 branch August 2, 2026 00:11
@steipete

steipete commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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

Labels

channel: discord Channel integration: discord maintainer Maintainer-authored PR size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant