Skip to content

feat: support website webhooks for Wan and Seedance video tasks - #50

Merged
lingozhi merged 1 commit into
mainfrom
codex/video-webhooks
Sep 8, 2026
Merged

lingozhi merged 1 commit into
mainfrom
codex/video-webhooks

Conversation

@lingozhi

@lingozhi lingozhi commented Sep 8, 2026

Copy link
Copy Markdown
Owner

⚠️ 提交说明 / PR Notice

Important

  • 请提供人工撰写的简洁摘要,避免直接粘贴未经整理的 AI 输出。

📝 变更描述 / Description

Wan unified and Lxmone Seedance requests can now register an optional website webhook. The gateway stores callback settings in its existing durable outbox, strips them from upstream requests, and sends a public terminal payload after generation finishes. Authenticated polling remains available.

The API panels and AI copy guides document every callback field, signing format, retry rule, and fallback. Legacy channel behavior and billing are unchanged.

This change and description were AI-assisted.

🚀 变更类型 / Type of change

  • 🐛 Bug 修复 (Bug fix) - 请关联对应 Issue,避免将设计取舍、理解偏差或预期不一致直接归类为 bug
  • ✨ 新功能 (New feature) - 重大特性建议先通过 Issue 沟通
  • ⚡ 性能优化 / 重构 (Refactor)
  • 📝 文档更新 (Documentation)

🔗 关联任务 / Related Issue

  • User-requested webhook compatibility; no linked issue.

✅ 提交前检查项 / Checklist

  • 人工确认: 我已亲自整理并撰写此描述,没有直接粘贴未经处理的 AI 输出。
  • 非重复提交: 我已搜索现有的 Issues 与 PRs,确认不是重复提交。
  • Bug fix 说明: 若此 PR 标记为 Bug fix,我已提交或关联对应 Issue,且不会将设计取舍、预期不一致或理解偏差直接归类为 bug。
  • 变更理解: 我已理解这些更改的工作原理及可能影响。
  • 范围聚焦: 本 PR 未包含任何与当前任务无关的代码改动。
  • 本地验证: 已在本地运行并通过测试或手动验证,维护者可以据此复核结果。
  • 安全合规: 代码中无敏感凭据,且符合项目代码规范。

📸 运行证明 / Proof of Work

  • Passed: go test ./relay/channel/task/sora ./controller ./model ./service ./relay/channel/openai/image_stream
  • Passed: go vet ./relay/channel/task/sora ./controller ./relay/channel/openai/image_stream
  • Passed: frontend typecheck, scoped lint/format checks and production build.
  • Regression coverage verifies validation and upstream stripping, persisted acceptance/terminal gating, and actual outbox delivery with a stub sender.
  • UI audit reports 168 existing findings outside pricing; no findings in touched pricing files.
  • No paid generation or real external callback was submitted for this validation.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-08T01:17:23.797532Z 18d284b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@lingozhi
lingozhi merged commit 14ef102 into main Sep 8, 2026
1 check passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 18d284b473

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +56 to +58
request.WebhookURL = webhookURL
if options.Secret != nil {
request.WebhookSecret = *options.Secret

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Require encrypted storage before accepting webhook secrets

On deployments using the default ASYNC_IMAGE_ENCRYPTED_WRITES_ENABLED=false, copying the secret here causes TaskWebhook.BeforeCreate to persist both the callback URL and signing secret as plaintext; callback URLs can also contain sensitive query tokens. Other durable callback paths reject registration unless StableCryptoSecretConfigured() and encrypted writes are enabled, so this validator should apply the same prerequisite before accepting these fields.

Useful? React with 👍 / 👎.

const { t } = useTranslation()
return (
<section className='space-y-3'>
<h3 className='text-sm font-semibold'>Webhook</h3>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Route the webhook heading through i18n

When a non-English locale is active, this newly added user-facing heading remains hard-coded in English, and no Webhook translation key was added to any locale. Render it through t(...) and add the locale entries so it follows language changes with the rest of the documentation panel.

AGENTS.md reference: web/default/AGENTS.md:L59-L63

Useful? React with 👍 / 👎.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant