Skip to content

Fix #84: enforce 4/6-message conversation depth by fidelity#91

Merged
DeveshParagiri merged 1 commit intomainfrom
codex/issue-84-conversation-turns
Feb 17, 2026
Merged

Fix #84: enforce 4/6-message conversation depth by fidelity#91
DeveshParagiri merged 1 commit intomainfrom
codex/issue-84-conversation-turns

Conversation

@RandomOscillations
Copy link
Copy Markdown
Collaborator

Summary

  • fix conversation execution to use message budgets (medium=4, high=6) instead of truncating at 2/3 messages
  • mark only the final message as final, preserving proper back-and-forth structure
  • add execution tests with mocked LLM calls to assert message count, speaker alternation, and final-flag behavior

Validation

  • pytest -q tests/test_conversations.py

Closes #84

Copy link
Copy Markdown
Collaborator

@DeveshParagiri DeveshParagiri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

Verdict: ✅ Ready to merge

Summary

This PR correctly fixes the conversation depth bug by iterating over the correct number of messages (4 for medium, 6 for high fidelity) instead of the mislabeled turn count (2/3).

Verification Checklist

Requirement Status
Medium fidelity = 4 messages
High fidelity = 6 messages
Low fidelity = 2 messages ✅ (defensive fallback)
Only final message marked is_final=True
Proper speaker alternation
Tests validate behavior

Key Fixes

  1. Changed loop from range(turns) where turns=2/3 to range(total_messages) where total_messages=4/6/2
  2. Simplified is_final logic to only mark the true final message
  3. Clean helper function _message_count_for_fidelity()

Tests

Both new tests pass and validate message count, speaker alternation, and final flag behavior.

No changes required.

@DeveshParagiri DeveshParagiri merged commit de8ff9e into main Feb 17, 2026
5 of 6 checks passed
@DeveshParagiri DeveshParagiri deleted the codex/issue-84-conversation-turns branch February 17, 2026 18:56
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.

Conversations are 1 turn (2 messages) instead of 2 turns (4 messages) at medium fidelity

2 participants