Skip to content

fix: validate trace item object shapes#104

Open
snoopuppy582 wants to merge 1 commit into
OWASP:mainfrom
snoopuppy582:fix/trace-item-shapes
Open

fix: validate trace item object shapes#104
snoopuppy582 wants to merge 1 commit into
OWASP:mainfrom
snoopuppy582:fix/trace-item-shapes

Conversation

@snoopuppy582
Copy link
Copy Markdown

Fixes #86

Summary

  • Added validation that messages, tool_calls, and events contain only object items.
  • Included field name and item index in each validation error.
  • Added unit coverage for invalid trace items and adapter error wrapping.

Tests

  • uv run --python 3.12 --extra dev pytest tests/test_trace.py tests/test_adapters.py -q
  • uv run --python 3.12 --extra dev pytest tests/test_cli.py tests/test_live_http.py -q
  • uv run --python 3.12 --extra dev pytest -q
  • git diff --check

AI-assisted contribution disclosure

  • Tool used: OpenAI Codex.
  • AI-assisted parts: small validation helper and focused unit tests.
  • Human review: I checked the issue requirements, reviewed the diff, verified the errors include field/index details, and ran targeted plus full pytest suites locally.

Notes

  • Existing trace fixture paths still pass through the full test suite.

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.

Tighten trace validation for message, tool call, and event item shapes

1 participant