Skip to content

fix(chatgpt): handle truncated annotation responses - #1413

Open
H-TTTTT wants to merge 1 commit into
mirai-mamori:mainfrom
H-TTTTT:fix/annotation-response-validation
Open

fix(chatgpt): handle truncated annotation responses#1413
H-TTTTT wants to merge 1 commit into
mirai-mamori:mainfrom
H-TTTTT:fix/annotation-response-validation

Conversation

@H-TTTTT

@H-TTTTT H-TTTTT commented Jul 13, 2026

Copy link
Copy Markdown

Summary

  • Validate OpenAI-compatible annotation responses and log bounded diagnostics without provider payloads.
  • Retry token-truncated segments once after UTF-8-safe splitting and save only complete results.
  • Harden annotation admin/rendering data handling and inline JSON output.

Closes #1412

Testing

  • php inc/chatgpt/annotation-response.test.php (29 tests, 0 failures)
  • PHP syntax checks for all changed PHP files
  • git diff --check

Risks

  • No live provider or WordPress integration testing was performed; provider-specific response variants and admin UI behavior remain integration risks.

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