refactor(threads): inject adapter runtime dependencies#961
Merged
shuxueshuxue merged 9 commits intodevfrom Apr 21, 2026
Merged
Conversation
shuxueshuxue
commented
Apr 21, 2026
Collaborator
Author
shuxueshuxue
left a comment
There was a problem hiding this comment.
Focused review on the adapter-injection slice: no blocking findings from my side.
I checked the constructor-contract changes across the activity reader, chat runtime services, thread input handler, bootstrap wiring, and the updated fixture surface. The write set stays inside the chat/threads adapter seam, and the touched tests now exercise the explicit injected dependencies rather than the old implicit app-state reach-through.
I am separately parking a /api/monitor/threads hang investigation because that read path overlaps this seam. Once this lands on shared dev, I will rerun that branch-local probe on the fresh head instead of competing on the same files now.
2fa36cb to
7e20f47
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Proof
uv run pytest -q tests/Unit/backend/test_thread_activity_reader.py tests/Unit/backend/test_chat_runtime_services.py tests/Unit/backend/test_thread_input_handler.py->5 passeduv run pytest -q tests/Unit/backend/web/services/test_agent_runtime_gateway_thread_input.py tests/Unit/backend/web/services/test_agent_runtime_gateway_chat_delivery.py tests/Integration/test_messaging_social_handle_contract.py -k "agent_runtime_gateway or latest_live_child_thread_over_active_main or recipient_thread_resolution_requires_current_thread_repo_contract or uses_recipient_social_user_id_for_thread_lookup_and_passes_through_envelope_content"->11 passed, 102 deselectedruff check/ruff format --check/git diff --checkgreenCommit Density