Skip to content

reply targets: polymorphic reply_to, single-line contract, legacy poller parity - #72

Merged
ThinkOffApp merged 2 commits into
mainfrom
fix/reply-targets-followups
Aug 27, 2026
Merged

ThinkOffApp merged 2 commits into
mainfrom
fix/reply-targets-followups

Conversation

@ThinkOffApp

Copy link
Copy Markdown
Owner

Follow-up to #70, which merged before its review findings were addressed. Fixes all three:

  1. reply_to polymorphism (@claudemm's finding): the field is a string id OR a rich {id, from, body} object (server stores what clients POST, antfarm route.ts:412). Both shapes handled; the object form self-carries its target, so a reply to a message older than the poll window still renders who/what it answered instead of [object Object].

  2. Notification-file contract (@codexmb's finding, reproduced): readers split on newlines and room_ack counts lines, so the two-line annotation was delivered as detached entries and overcounted. The annotation is now inline on the SAME physical line.

  3. Legacy rooms watch path (@codexmb's finding): src/team-relay/room-poller.mjs now resolves and renders reply context via the same shared module (src/common/reply-context.mjs), so the two paths cannot drift apart.

Tests: object-form, single-line contract, and shared-module units. Suite 263/263.

🤖 Generated with Claude Code

- shared src/common/reply-context.mjs consumed by BOTH pollers so the two
  paths cannot drift (codexmb gap 1): the legacy team-relay room-poller now
  resolves and renders reply context identically
- reply_to polymorphism (claudemm's find): string id OR rich {id,from,body}
  object are both handled; the object form self-carries its target, so an
  out-of-window reply still renders who/what it answered
- annotation is now INLINE SINGLE-LINE (codexmb gap 2, reproduced): the
  notification-file contract is one entry per physical line; the two-line
  form was delivered as detached entries and overcounted by room_ack
- tests: object form, single-line contract, shared-module unit tests
  (suite 263/263)
@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create an environment for this repo.

@ThinkOffApp
ThinkOffApp merged commit 68c39c6 into main Aug 27, 2026
3 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.

1 participant