Repository navigation
fix(evaluators): use galileo-core Span alias for child spans - #303
Merged
Merged
Conversation
galileo-core 4.6.0 added HttpSpan to the Span union that ToolSpan, RetrieverSpan and Trace accept in `spans`. The local copy of the union lacked it, and list is invariant, so mypy rejected the child-span list. Use the SDK's own Span alias so the type follows the installed version. Co-Authored-By: Claude <noreply@anthropic.com>
4 tasks done
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
wrisa
approved these changes
Nov 5, 2026
namrataghadi-galileo
approved these changes
Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ciis red onmain(run 42083444705,39140e0) and on every open PR. mypy reports 3 errors inevaluators/contrib/galileo/src/agent_control_evaluator_galileo/records/factory.py:159,166,173.Cause:
galileo-core4.6.0 (2026-10-30) addedHttpSpanto itsSpanunion.ToolSpan,RetrieverSpanandTracetakespans: list[Span]. The evaluator kept its own copy of the union (GalileoCoreSpan) withoutHttpSpan.listis invariant, so mypy rejects the child-span list. The pingalileo-core>=4.4.0,<5.0.0floats, so CI picked up 4.6.1 with no change in this repo.Fix: import the SDK's own
Spanalias and drop the local copy. The type then follows whichevergalileo-coreis installed.Spanexists in every version the pin allows (checked 4.4.0 and 4.6.1). No runtime change: the module usesfrom __future__ import annotations.Test plan
evaluators/contrib/galileo/srcagainstgalileo-core4.6.1: no errors in this package. Unpatchedmainreproduces the 3 CI errors with the same setup.galileo-core4.4.0 (the floor): no errors in this package.ruff checkpasses.Note: the private package index returned 401 locally, so I could not run
make sync. I ran mypy with the extractedgalileo-corewheels onMYPYPATH, not throughuv run. The only other errors in that setup are insidegalileo_coreitself, which an installed package does not report.Related PRs
cionmaincifailure🤖 Generated with Claude Code