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

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

✅ LGTM — cycle #29

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

✅ LGTM — cycle #30

@argszero
argszero force-pushed the test/add-session-tests branch from f76ccb1 to af816d2 Compare July 18, 2026 07:36

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

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 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