Skip to content

fix: enforce image masks and fail over short-input policy errors - #6313

Open
superman2003 wants to merge 3 commits into
Wei-Shaw:mainfrom
superman2003:codex/fix-issue-6273-mask
Open

fix: enforce image masks and fail over short-input policy errors#6313
superman2003 wants to merge 3 commits into
Wei-Shaw:mainfrom
superman2003:codex/fix-issue-6273-mask

Conversation

@superman2003

Copy link
Copy Markdown
Contributor

Summary

  • Enforce PNG mask boundaries for OAuth multipart image edits by compositing generated pixels only where the mask permits them.
  • Normalize edited image dimensions and output format, and correctly accept standard padded OpenAI base64 image payloads.
  • Treat structured upstream HTTP 400 short_input_rejected responses as account failover signals across HTTP, SSE, and WebSocket paths while preserving ordinary client-facing 400 errors.

Testing

  • go test ./internal/service -run OpenAI|Images -count=1
  • go test ./internal/handler -count=1
  • Focused mask, base64, and short-input tests with -count=3
  • Focused HTTP, SSE, and WebSocket failover tests
  • git diff --check

The full internal/service suite still has five unrelated Windows/environment failures: one asynchronous moderation refresh timeout and four plugin installer rename failures caused by temporary files remaining locked.

Fixes #6273

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.

/v1/images/editsmask 未按透明度和位置约束局部重绘,蒙版外区域被大范围改写

1 participant