fix(trace): restore Phoenix collector compatibility - #339
Conversation
Chang Liu (changliu2)
left a comment
There was a problem hiding this comment.
I found four issues tightly coupled to restoring the previously unreachable Phoenix adapter:
assert_ai/core/collector.py:273-288still discards Phoenix span events. A minimal event-onlygen_ai.choicespan produces no ASSERTtrace_events; preserving the event produces the expected assistant message. This breaks GenAI output and tool evidence after the adapter becomes operational.assert_ai/core/collector.py:250-288preserves Phoenix's default newest-first DataFrame ordering. ASSERT consumes spans sequentially, so a minimal two-span trace is emitted asfinal answerfollowed byinitial answer. Sort converted spans chronologically.assert_ai/core/collector.py:162-185appliestrace_idsonly after retrieving Phoenix's capped unfiltered DataFrame. Existing traces outside that page silently disappear. Phoenix 15.0 and 19.17 both provide server-sidetrace_idsfiltering with cursor pagination throughclient.spans.get_spans(...)..github/workflows/build.yml:103-160runs the installed-wheel compatibility tests only against the resolver-selected Phoenix 19.17.0. There is no required job pinning the supported 15.0.0 lower bound.
I am not retaining the concurrent-session finding: that behavior is broader pre-existing design, and this PR improves rather than worsens cross-run isolation by restoring effective time bounds.
|
Addressed all four findings on exact head |
Resolves CHANGELOG.md conflict by merging both Fixed lists: kept main's already-numbered entries (#334, #336, #330, #335, #337, #342) and added the Phoenix fix as (#339), removing the 4 duplicate un-numbered copies that existed on this branch before those PRs landed on main. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 313f00c0-362c-4152-bcde-17cadaf0ac3a
|
Merge conflict with Also independently re-verified all 4 issues from the 2026-09-01 review, since two follow-up commits (
Ran the full suite locally post-merge: No open items from my side — ready for re-review. |
Chang Liu (changliu2)
left a comment
There was a problem hiding this comment.
Re-reviewed after the CHANGELOG conflict resolution and merge with main (8cc5085). All 4 original comments verified fixed in commits 3d28d70/7505f3f1 (span-event loss, chronological ordering via _order_spans, trace_ids filtering, lower-bound CI) — confirmed by diff + full test suite run, not just the PR description. Approving.
Summary
PhoenixCollectoragainst the supported Phoenix 15.0–19.17 client API.span_kind, timezone-aware timestamps, and missing Pandas values.phoenixextra.Problem
PhoenixCollectorcould not be constructed with any supported Phoenix release because it called the removedphoenix.Client(endpoint=...)surface. After correcting construction, retrieval still used the removed top-levelget_spans_dataframemethod. The supported API isphoenix.client.Client(base_url=...)followed byclient.spans.get_spans_dataframe(...).The collector protocol supplies ISO timestamp strings, while Phoenix expects
datetimeobjects and silently normalizes strings toNone. That dropped the intended turn bounds. The old DataFrame conversion also calledint()on PhoenixTimestampvalues and missed span IDs stored in the DataFrame index.Verification
19 passed.1492 passed, 21 skipped, 840 subtests passed.assert-ai[phoenix]environment: all 5 compatibility tests passed against Phoenix 19.17.0, importing ASSERT from site-packages rather than the checkout.uv lock --check, diff hygiene, focused Ruff, Python compilation, wheel/sdist build, andtwine checkpassed.Scope
This is the focused follow-up identified while reviewing #336. It does not wire
PhoenixCollectorinto the CLI/config path or change theSpanCollectorprotocol; it repairs the existing public programmatic adapter and locks its real dependency contract in required CI.