Skip to content

Skip already-answered messages in Phase 2 using messages table - #76

Merged
IceRhymers merged 1 commit into
masterfrom
issue-73-echo-prevention
Mar 31, 2026
Merged

Skip already-answered messages in Phase 2 using messages table#76
IceRhymers merged 1 commit into
masterfrom
issue-73-echo-prevention

Conversation

@IceRhymers

Copy link
Copy Markdown
Owner

Closes #73

Changes

  • alembic/versions/005_add_message_ts.py — migration adding nullable message_ts column to messages table
  • claw/models.py — added message_ts: str | None field to Message model
  • claw/core/sessions.pysave_message() accepts optional message_ts; new is_message_handled() function
  • claw/core/slack_poller.py — Phase 2 calls is_message_handled before _handle_message; _run_response_loop passes slack_ts to save_message
  • tests/test_sessions.py — 4 new tests for save_message with message_ts and is_message_handled
  • tests/test_slack_poller.py — 2 new tests: test_phase2_skips_already_handled_message, test_phase2_processes_unhandled_message

Test plan

  • All tests pass: uv run pytest tests/ -q (290 passed)
  • OpenSpec tasks complete: openspec/changes/echo-prevention/tasks.md

…loses #73)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@IceRhymers
IceRhymers force-pushed the issue-73-echo-prevention branch from 15f41f1 to fb0d084 Compare March 31, 2026 14:19
@IceRhymers
IceRhymers merged commit 6ae09ac into master Mar 31, 2026
1 check passed
@IceRhymers
IceRhymers deleted the issue-73-echo-prevention branch April 3, 2026 14:37
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.

fix: skip already-answered messages in Phase 2 using messages table (echo prevention)

1 participant