Skip to content

emrg: add session._validate_tool_messages tests - #28

Merged
argszero merged 1 commit into
masterfrom
test/add-session-tests
Jul 18, 2026
Merged

emrg: add session._validate_tool_messages tests#28
argszero merged 1 commit into
masterfrom
test/add-session-tests

Conversation

@argszero

Copy link
Copy Markdown
Owner

Add 10 tests for _validate_tool_messages — the safety-net function that post-processes tool call messages for OpenAI API validity.

Tests cover:

  • Empty input
  • Plain messages pass through
  • Summary messages pass through
  • Valid assistant + tool blocks preserved
  • Orphaned tool_calls stripped (content preserved or set to "")
  • Orphaned tool messages removed
  • Partial match: only valid tool_calls kept
  • Multiple assistant+tool blocks
  • Mixed valid/orphaned blocks

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

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

✅ LGTM — cycle #29

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

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

✅ LGTM — cycle #30

@argszero
argszeroforce-pushed the test/add-session-tests branch from f76ccb1 to af816d2CompareJuly 18, 2026 07:36

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

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

✅ LGTM — cycle #31

Sign up for freeto 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

@argszero