Skip to content

Claude/project analysis improvements or2 b9#7

Merged
rekurt merged 2 commits into
masterfrom
claude/project-analysis-improvements-Or2B9
Apr 7, 2026
Merged

Claude/project analysis improvements or2 b9#7
rekurt merged 2 commits into
masterfrom
claude/project-analysis-improvements-Or2B9

Conversation

@rekurt
Copy link
Copy Markdown
Owner

@rekurt rekurt commented Apr 7, 2026

No description provided.

claude added 2 commits April 7, 2026 23:06
…ry logic, and fix thread safety

- Add ErrorKind: KindNotFound (404), KindConflict (409), KindPayloadTooLarge (413)
- Add sentinel errors: ErrBadRequest, ErrNotFound, ErrConflict, ErrPayloadTooLarge
- Fix Unwrap() for KindBadRequest and KindNetwork to enable errors.Is() checks
- Add parseRetryAfter support for RFC 1123 HTTP-date format
- Add SuggestButtons, InlineSuggestButton, Directive, BotRequest, ServerAction types
- Add BotRequest field to Update for interactive button callbacks
- Add missing API parameters: PayloadID, DisableNotification, DisableWebPagePreview,
  ThreadID, SuggestButtons to sendText; Text and SuggestButtons to sendGallery;
  SuggestButtons to sendFile, sendImage, createPoll
- Consolidate retry logic into Client.DoMultipartRequest, removing duplicate
  implementations from files and messages services (fixes zero-sleep bug)
- Make FakeDoer thread-safe with sync.Mutex
- Add jitter to PollLoop to prevent thundering herd
- Add filename sanitization for Content-Disposition headers
- Add gallery image count upper bound validation
- Add comprehensive tests for SendImage, SendGallery, GetFile, GetVotersPage,
  DoMultipartRequest, HTTPLogger, and FakeDoer concurrency
- Update Image type to match API spec (file_id, size, name fields)
- Add godoc for config fields, HttpDoer thread-safety, DoRequest body closing

https://claude.ai/code/session_012wWqCdE6SPWAXSxdf9ic78
@rekurt rekurt merged commit 2f51cd7 into master Apr 7, 2026
5 checks passed
Copy link
Copy Markdown

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

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: d8247c9bd2

ℹ️ 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".

}

return parsed.Message, nil
return &ym.Message{ID: parsed.MessageID}, nil
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 Validate message_id before returning sendText success

This returns success even when message_id is absent/zero, so a payload like {"ok":true} (or a legacy message envelope without top-level message_id) yields &ym.Message{ID:0}. That silently propagates an invalid identifier into follow-up flows (reply/delete) instead of surfacing a protocol error, whereas the previous implementation rejected missing message data.

Useful? React with 👍 / 👎.

Comment on lines +309 to 312
var parsed struct {
OK bool `json:"ok"`
MessageID ym.MessageID `json:"message_id"`
}
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 Parse message envelope in multipart success responses

The multipart success parser now accepts only top-level message_id, so responses shaped as {ok:true, message:{...}} are treated as failures (message_id missing). That is a regression for endpoints that still return a message object (the same /bot/v1/messages/sendFile response shape is still expected in client/ym/files/service.go), causing successful SendFile/SendImage/SendGallery calls to fail.

Useful? React with 👍 / 👎.

@rekurt rekurt deleted the claude/project-analysis-improvements-Or2B9 branch April 7, 2026 23:40
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.

2 participants