Repository navigation
feat: add coalesce_id support for push and text services - #27
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for a coalesce_id parameter in the push and text services of the tronbytassistant integration, allowing deduplication of anonymous pushes. It adds validation logic to ensure the ID is alphanumeric (including underscores and dashes) and under 64 characters, and forwards it in the API request body. The review feedback highlights a potential TypeError if coalesce_id is passed as a non-string type (such as an integer) and suggests coercing it to a string before validation to prevent runtime exceptions.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Adds support for the Coalesce ID feature introduced in tronbyt/server#830.
What is Coalesce ID?
A
coalesceIDis an optional string identifier that clients can attach to push requests. When a new push arrives with a given coalesceID, the server deletes any existing ephemeral file with that same coalesceID before saving the new one — ensuring at most one pending push per coalesceID.Changes
const.py: AddedATTR_COALESCE_IDconstant__init__.py:validate_coalesce_id()function (validates max 64 chars, alphanumeric/underscore/dash only)handle_push_or_text()to extract optionalcoalesce_idfrom service call data and pass it ascoalesceIDin the push request bodyservices.yaml: Addedcoalesce_idtext field to the advanced sections of bothpushandtextservices