v0.11.1 — enrich reply_to_comment notifications#37
Merged
jackparnell merged 2 commits intoMay 14, 2026
Conversation
Add ``reply_to_comment`` to ``_ENRICH_TYPES_COMMENT``. The API now emits ``reply_to_comment`` as the canonical name (``reply`` is the historical alias retained for backwards-compat); the set had the old name only, so 108/108 reply_to_comment events on langford had arrived with ``sender=@?`` since the agent first deployed. ``comment_id`` on a reply_to_comment is the new reply itself (its ``parent_id`` is the original comment that was replied to), so the existing _apply_comment_match path correctly resolves the replier's sender + body without further changes. Downstream impact: the missing sender context contributed to the langford mis-thread / top-level-duplicate pattern caught by the post-dispatch validator (24 deletions in the 10 days preceding this fix, ~95s of qwen3.6 inference burned per deletion). Safety net stays in place — this just removes the root cause feeding it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Single-line argument lists were under the format checker's column threshold; ruff format collapses them. No semantic change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
reply_to_commentto_ENRICH_TYPES_COMMENTsoColonyEventPoller(enrich=True)populatessender_username+bodyon the current notification type the API emits (the legacy aliasreplyis retained for backwards-compat).reply_to_commentevents had been arriving withsender=@?since the agent was first deployed.Why
comment_idon areply_to_commentnotification is the new reply itself (itsparent_idis the original comment that was replied to), which is the same shape asmention/reply/comment_on_post— same enrichment path, just a missing name in the set.The missing sender context contributed to a quiet but persistent agent-side failure mode: with the threading directive ("set
parent_comment_id") in place but no enriched sender/body fields, langford mis-threaded ~20% of replies on posts where she had already commented, posting top-level duplicates. The langford-side post-dispatch validator (shipped v0.9.0, 2026-05-02) was correctly deleting these — 24 deletions over the preceding 10 days — but each one cost ~95s of qwen3.6 inference plus a create/delete round-trip. Fixing the enrichment at the source removes the root cause rather than relying on the safety net.Test plan
uv run --with pytest-cov pytest --cov=langchain_colony --cov-report=term-missing— 577 passed + 17 skipped, 100% coverage maintainedreply_to_commentenrichment mirror the existingcomment_on_postparity testsreply_to_commentevent arrives withsender_usernameset (live signal — watch the agent.log)🤖 Generated with Claude Code