Skip to content

fix: deliver generated media as structured attachments#82084

Merged
steipete merged 8 commits into
mainfrom
fix/structured-generated-attachments
May 15, 2026
Merged

fix: deliver generated media as structured attachments#82084
steipete merged 8 commits into
mainfrom
fix/structured-generated-attachments

Conversation

@steipete
Copy link
Copy Markdown
Contributor

Summary

  • Deliver generated image/music/video outputs as structured attachments instead of legacy MEDIA: text.
  • Keep message available for message-tool-only Codex completions across allowlists, tool profiles, and replay/tool construction.
  • Add delivery evidence checks so generated-media completion handoff fails when expected media was not actually sent.
  • Teach the message tool/send path to accept structured attachments and align telemetry aliases with real delivery.

Verification

  • OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs src/agents/pi-embedded-runner/run/attempt-tool-construction-plan.test.ts extensions/codex/src/app-server/run-attempt.test.ts src/agents/pi-embedded-subscribe.tools.media.test.ts src/infra/outbound/message-action-runner.media.test.ts
  • OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs src/infra/outbound/message-action-runner.media.test.ts extensions/codex/src/app-server/dynamic-tools.test.ts src/agents/pi-embedded-subscribe.handlers.tools.test.ts src/agents/subagent-announce-delivery.test.ts
  • OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs src/agents/openclaw-tools.update-plan.test.ts src/agents/pi-tools.create-openclaw-coding-tools.test.ts src/agents/pi-embedded-runner/run/attempt-tool-construction-plan.test.ts
  • git diff --check
  • codex review --base origin/main (clean after fixups)

Behavior addressed: generated media completion handoffs now carry message-tool-compatible structured attachments and require actual media delivery.
Real environment tested: local focused Vitest suites plus Codex autoreview.
Exact steps or command run after this patch: focused commands listed above.
Evidence after fix: tests cover generated attachment extraction, message-tool alias telemetry, real send-path attachments, forced message through explicit allowlists including empty allowlists, and completion delivery failure on text-only media replies.
Observed result after fix: Codex autoreview reported no blocking correctness issues.
What was not tested: live Hetzner/Discord/ClawSweeper end-to-end media post.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling extensions: codex size: L 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: fix: deliver generated media as structured attachments 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 added the proof: override Maintainer override for the external PR real behavior proof gate. label May 15, 2026
@steipete steipete force-pushed the fix/structured-generated-attachments branch from 767ea92 to 04d253a Compare May 15, 2026 09:14
@steipete steipete merged commit df70ed2 into main May 15, 2026
107 of 108 checks passed
@steipete steipete deleted the fix/structured-generated-attachments branch May 15, 2026 09:16
@steipete
Copy link
Copy Markdown
Contributor Author

Landed via rebase onto main.

  • Local gate: OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs src/infra/outbound/message-action-runner.media.test.ts extensions/codex/src/app-server/dynamic-tools.test.ts src/agents/pi-embedded-subscribe.handlers.tools.test.ts src/agents/subagent-announce-delivery.test.ts
  • Local result: 6 files passed, 194 tests passed
  • Whitespace: git diff --check
  • Autoreview: codex review --base origin/main reported no discrete correctness issues
  • Source head: 04d253a
  • Merge commit: df70ed2

Merged with maintainer proof override because GitHub Actions stayed queued after local proof. Thanks!

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

Labels

agents Agent runtime and tooling extensions: codex maintainer Maintainer-authored PR proof: override Maintainer override for the external PR real behavior proof gate. size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant