Skip to content

fix: Enhance error handling in PgCheckpointer and update thread name …#43

Merged
Iamsdt merged 1 commit intomainfrom
fix/thread-name
Dec 11, 2025
Merged

fix: Enhance error handling in PgCheckpointer and update thread name …#43
Iamsdt merged 1 commit intomainfrom
fix/thread-name

Conversation

@Iamsdt
Copy link
Collaborator

@Iamsdt Iamsdt commented Dec 11, 2025

This pull request updates the PgCheckpointer's thread storage logic to provide clearer feedback on whether a thread was newly created or updated, and improves error handling. It also adds new tests to ensure the correct behavior of these changes.

Enhancements to thread storage and update logic:

  • The aput_thread method now returns a boolean indicating if a thread was newly created (True) or if an existing thread was updated (False). The logic first attempts to insert, and if the thread already exists, it updates only the necessary fields, defaulting to the existing thread name if none is provided. [1] [2] [3]

Improved error handling:

  • Exception handling in both aput_thread and _get_thread now consistently raises the original exception object for better traceability. [1] [2]

Testing and documentation:

  • New and updated tests verify the new return value of aput_thread and its behavior on both insert and update paths.
  • The changelog has been updated to document these improvements and clarify the new behavior.

@codecov
Copy link

codecov bot commented Dec 11, 2025

Codecov Report

❌ Patch coverage is 69.23077% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
agentflow/checkpointer/pg_checkpointer.py 69.23% 3 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@Iamsdt Iamsdt merged commit c50cb75 into main Dec 11, 2025
1 of 2 checks passed
@Iamsdt Iamsdt deleted the fix/thread-name branch December 11, 2025 08:16
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