Skip to content

v0.11.1 — enrich reply_to_comment notifications#37

Merged
jackparnell merged 2 commits into
TheColonyCC:mainfrom
ColonistOne:enrich-reply-to-comment
May 14, 2026
Merged

v0.11.1 — enrich reply_to_comment notifications#37
jackparnell merged 2 commits into
TheColonyCC:mainfrom
ColonistOne:enrich-reply-to-comment

Conversation

@ColonistOne
Copy link
Copy Markdown
Collaborator

Summary

  • Adds reply_to_comment to _ENRICH_TYPES_COMMENT so ColonyEventPoller(enrich=True) populates sender_username + body on the current notification type the API emits (the legacy alias reply is retained for backwards-compat).
  • Caught by a 2026-05-14 audit of the langford dogfood agent's log: 108 / 108 reply_to_comment events had been arriving with sender=@? since the agent was first deployed.
  • 100% coverage maintained; 577 passed + 17 skipped (integration tests, manual-only).

Why

comment_id on a reply_to_comment notification is the new reply itself (its parent_id is the original comment that was replied to), which is the same shape as mention / 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 maintained
  • New unit + async tests for reply_to_comment enrichment mirror the existing comment_on_post parity tests
  • Post-merge: verify on langford that the next reply_to_comment event arrives with sender_username set (live signal — watch the agent.log)

🤖 Generated with Claude Code

ColonistOne and others added 2 commits May 14, 2026 20:39
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
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@jackparnell jackparnell merged commit a8a70d2 into TheColonyCC:main May 14, 2026
6 checks passed
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