Skip to content

Conversation

@snood1205
Copy link
Owner

This is a breaking change and will require migrating over the current redis queue to be compatible.

@snood1205 snood1205 requested a review from Copilot March 27, 2025 18:06
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces breaking changes to how reply-related tasks are handled, requiring a migration of the current Redis queue. The key changes include:

  • Updating the Task structure to replace "post_cid" and "post_uri" with "cid", "parent_uri", and a new "root_uri".
  • Modifying functions in Scheduler, MentionListener, ErrorHandler, and AtClient to accommodate the new reply handling mechanism.
  • Adjusting type annotations and return values (e.g., in parse_create_op) to support the updated logic.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
scheduler.py Updated Task fields and post_reply call to include cid, parent_uri, and root_uri.
mention_listener.py Changed parse_create_op return types and enqueue_reminder parameters for reply handling.
error_handler.py Revised error handler signatures and post_reply usage to incorporate root_uri.
at_client.py Modified post_reply and build_mention_post to support the new reply handling parameters.
Comments suppressed due to low confidence (3)

scheduler.py:29

  • [nitpick] The parameter 'cid' is used without a clear indication if it represents the parent ID or the reply's ID. Consider renaming it to 'parent_cid' if that better reflects its role.
self.at_client.post_reply(post, cid, parent_uri, root_uri)

mention_listener.py:55

  • Ensure that test cases are updated or added to validate the new 'root_uri' parameter, verifying that reminder scheduling behaves as expected.
def enqueue_reminder(self, did: str, run_at: datetime, cid: str, parent_uri: str, root_uri: str) -> None:

error_handler.py:13

  • [nitpick] The warning message only references the 'parent_uri'. Consider incorporating 'root_uri' into the error log to provide complete context when no run time is parsed.
def handle_no_run_at(self, did: str, parent_cid: str, parent_uri: str, root_uri: str) -> None:

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