GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||
GeezerVison is showing github.com — fix(harness): assert cross-channel (yield vs auto-send) conformance equivalence [AGX1-373] by declan-scale · Pull Request #414 · scaleapi/scale-agentex-python Conversation
|
| Filename | Overview |
|---|---|
| tests/lib/core/harness/conformance/runner.py | Major rewrite: adds LogicalDelivery normalisation, _RecordingTracer for real span capture, fake streaming backend, and run_cross_channel_conformance() that drives both channels and returns their actual deliveries and span signals for comparison. |
| tests/lib/core/harness/conformance/test_conformance.py | Adds 5 parametrized fixtures (builtin-single-tool, streaming-text, reasoning-block, streamed-tool-request, parallel-tools-with-error) and a new async test_cross_channel_equivalence that asserts both logical deliveries and recorded span signals are identical across channels. |
| .github/workflows/agentex-tutorials-test.yml | Adds a conditional step that installs @anthropic-ai/claude-code (pinned to 2.1.142) and @openai/codex (unpinned, per matching sandbox Dockerfile policy) for the relevant tutorial matrix entries, and threads ANTHROPIC_API_KEY / CLAUDE_LIVE_TESTS / CODEX_LIVE_TESTS through to the tutorial test run step. |
Reviews (14): Last reviewed commit: "test(harness): exercise ToolResponseCont..." | Re-trigger Greptile
Sorry, something went wrong.
There was an error while loading. Please reload this page.
d21c54a to
ebc468d
Compare
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
b4c53ca to
cae14d4
Compare
|
@greptile review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
8cd851c to
2e820c7
Compare
|
@greptile review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
b4b8b33 to
da780a1
Compare
2e820c7 to
37421b6
Compare
…ation Replace the old determinism-only test (derive_all) with the full cross-channel assertion pattern: register fixtures with per-module _OPENAI_FIXTURES, call run_cross_channel_conformance, and assert logical-delivery and span-signal equivalence across yield_events and auto_send — matching the pattern in test_conformance.py. Swap ReasoningSummaryDelta for ReasoningContentDelta so the runner's payload accumulator recognises the delta type and the payload comparison exercises the reasoning seeding path. Remove derive_all import. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…-373) Rewrites test_langgraph_conformance.py to use the cross-channel runner from PR #414 (run_cross_channel_conformance, LogicalDelivery) instead of the simpler derive_all-only API it was written against. The four fixtures (text-only, single-tool, reasoning, multi-step) are retained as canonical StreamTaskMessage* sequences. Each is now exercised by test_cross_channel_equivalence (yield_events vs auto_send logical deliveries and span signals) plus the backward-compat test_span_derivation_is_deterministic guard. LangGraph tool requests arrive as Full events from the "updates" stream; auto_send handles them via open+close, yielding the same LogicalDelivery on both channels. No coalesce_tool_requests option is needed. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
37421b6 to
df3461c
Compare
…ation Replace the old determinism-only test (derive_all) with the full cross-channel assertion pattern: register fixtures with per-module _OPENAI_FIXTURES, call run_cross_channel_conformance, and assert logical-delivery and span-signal equivalence across yield_events and auto_send — matching the pattern in test_conformance.py. Swap ReasoningSummaryDelta for ReasoningContentDelta so the runner's payload accumulator recognises the delta type and the payload comparison exercises the reasoning seeding path. Remove derive_all import. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…-373) Rewrites test_langgraph_conformance.py to use the cross-channel runner from PR #414 (run_cross_channel_conformance, LogicalDelivery) instead of the simpler derive_all-only API it was written against. The four fixtures (text-only, single-tool, reasoning, multi-step) are retained as canonical StreamTaskMessage* sequences. Each is now exercised by test_cross_channel_equivalence (yield_events vs auto_send logical deliveries and span signals) plus the backward-compat test_span_derivation_is_deterministic guard. LangGraph tool requests arrive as Full events from the "updates" stream; auto_send handles them via open+close, yielding the same LogicalDelivery on both channels. No coalesce_tool_requests option is needed. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…ation Replace the old determinism-only test (derive_all) with the full cross-channel assertion pattern: register fixtures with per-module _OPENAI_FIXTURES, call run_cross_channel_conformance, and assert logical-delivery and span-signal equivalence across yield_events and auto_send — matching the pattern in test_conformance.py. Swap ReasoningSummaryDelta for ReasoningContentDelta so the runner's payload accumulator recognises the delta type and the payload comparison exercises the reasoning seeding path. Remove derive_all import. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…-373) Rewrites test_langgraph_conformance.py to use the cross-channel runner from PR #414 (run_cross_channel_conformance, LogicalDelivery) instead of the simpler derive_all-only API it was written against. The four fixtures (text-only, single-tool, reasoning, multi-step) are retained as canonical StreamTaskMessage* sequences. Each is now exercised by test_cross_channel_equivalence (yield_events vs auto_send logical deliveries and span signals) plus the backward-compat test_span_derivation_is_deterministic guard. LangGraph tool requests arrive as Full events from the "updates" stream; auto_send handles them via open+close, yielding the same LogicalDelivery on both channels. No coalesce_tool_requests option is needed. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
ccbd5cf to
e3fa1cc
Compare
…ation Replace the old determinism-only test (derive_all) with the full cross-channel assertion pattern: register fixtures with per-module _OPENAI_FIXTURES, call run_cross_channel_conformance, and assert logical-delivery and span-signal equivalence across yield_events and auto_send — matching the pattern in test_conformance.py. Swap ReasoningSummaryDelta for ReasoningContentDelta so the runner's payload accumulator recognises the delta type and the payload comparison exercises the reasoning seeding path. Remove derive_all import. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…-373) Rewrites test_langgraph_conformance.py to use the cross-channel runner from PR #414 (run_cross_channel_conformance, LogicalDelivery) instead of the simpler derive_all-only API it was written against. The four fixtures (text-only, single-tool, reasoning, multi-step) are retained as canonical StreamTaskMessage* sequences. Each is now exercised by test_cross_channel_equivalence (yield_events vs auto_send logical deliveries and span signals) plus the backward-compat test_span_derivation_is_deterministic guard. LangGraph tool requests arrive as Full events from the "updates" stream; auto_send handles them via open+close, yielding the same LogicalDelivery on both channels. No coalesce_tool_requests option is needed. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…ation Replace the old determinism-only test (derive_all) with the full cross-channel assertion pattern: register fixtures with per-module _OPENAI_FIXTURES, call run_cross_channel_conformance, and assert logical-delivery and span-signal equivalence across yield_events and auto_send — matching the pattern in test_conformance.py. Swap ReasoningSummaryDelta for ReasoningContentDelta so the runner's payload accumulator recognises the delta type and the payload comparison exercises the reasoning seeding path. Remove derive_all import. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…-373) Rewrites test_langgraph_conformance.py to use the cross-channel runner from PR #414 (run_cross_channel_conformance, LogicalDelivery) instead of the simpler derive_all-only API it was written against. The four fixtures (text-only, single-tool, reasoning, multi-step) are retained as canonical StreamTaskMessage* sequences. Each is now exercised by test_cross_channel_equivalence (yield_events vs auto_send logical deliveries and span signals) plus the backward-compat test_span_derivation_is_deterministic guard. LangGraph tool requests arrive as Full events from the "updates" stream; auto_send handles them via open+close, yielding the same LogicalDelivery on both channels. No coalesce_tool_requests option is needed. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
|
Nice work on the equivalence fix — recording what each channel actually emits is the right move. One thing I want to make sure we've got covered before relying on this: conformance proves yield ≡ auto-send, but only over the 3 fixtures (single-tool / streaming-text / reasoning-block). That tells us the two delivery paths agree — it doesn't tell us each harness's tap produces the correct canonical stream on the harder cases (parallel tool calls, interleaved reasoning+text, a tool that errors). My worry is the two channels agreeing with each other while both being wrong on an edge case. Could we add a gnarlier fixture (parallel tools + a tool error) so the equivalence is over something representative? Happy to help write it. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
c8c63d1 to
05120f3
Compare
…ation Replace the old determinism-only test (derive_all) with the full cross-channel assertion pattern: register fixtures with per-module _OPENAI_FIXTURES, call run_cross_channel_conformance, and assert logical-delivery and span-signal equivalence across yield_events and auto_send — matching the pattern in test_conformance.py. Swap ReasoningSummaryDelta for ReasoningContentDelta so the runner's payload accumulator recognises the delta type and the payload comparison exercises the reasoning seeding path. Remove derive_all import. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…-373) Rewrites test_langgraph_conformance.py to use the cross-channel runner from PR #414 (run_cross_channel_conformance, LogicalDelivery) instead of the simpler derive_all-only API it was written against. The four fixtures (text-only, single-tool, reasoning, multi-step) are retained as canonical StreamTaskMessage* sequences. Each is now exercised by test_cross_channel_equivalence (yield_events vs auto_send logical deliveries and span signals) plus the backward-compat test_span_derivation_is_deterministic guard. LangGraph tool requests arrive as Full events from the "updates" stream; auto_send handles them via open+close, yielding the same LogicalDelivery on both channels. No coalesce_tool_requests option is needed. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
3384505 to
41b1a32
Compare
05120f3 to
c9a907c
Compare
…ation Replace the old determinism-only test (derive_all) with the full cross-channel assertion pattern: register fixtures with per-module _OPENAI_FIXTURES, call run_cross_channel_conformance, and assert logical-delivery and span-signal equivalence across yield_events and auto_send — matching the pattern in test_conformance.py. Swap ReasoningSummaryDelta for ReasoningContentDelta so the runner's payload accumulator recognises the delta type and the payload comparison exercises the reasoning seeding path. Remove derive_all import. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…-373) Rewrites test_langgraph_conformance.py to use the cross-channel runner from PR #414 (run_cross_channel_conformance, LogicalDelivery) instead of the simpler derive_all-only API it was written against. The four fixtures (text-only, single-tool, reasoning, multi-step) are retained as canonical StreamTaskMessage* sequences. Each is now exercised by test_cross_channel_equivalence (yield_events vs auto_send logical deliveries and span signals) plus the backward-compat test_span_derivation_is_deterministic guard. LangGraph tool requests arrive as Full events from the "updates" stream; auto_send handles them via open+close, yielding the same LogicalDelivery on both channels. No coalesce_tool_requests option is needed. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…quivalence [AGX1-373] Rebased on the pyright-clean foundation. Includes @OverRide on _RecordingTracer.handle and relative conformance imports so the whole-repo pyright (scripts/lint) passes. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…arison
- Add `payload: str` field to LogicalDelivery (NamedTuple, default "").
- _yield_logical_deliveries: track TextDelta / ReasoningContentDelta
accumulation per-index; include "".join(deltas) as payload for text/
reasoning deliveries. Include json.dumps(arguments, sort_keys=True) as
payload for tool_request; str(content) for tool_response.
- _auto_send_logical_deliveries: collect ("update", delta) entries from
the _FakeCtx sink between open and close; extract TextDelta /
ReasoningContentDelta text and accumulate. Carry same tool payload
fields.
- _yield_text_reasoning_seq: forward payload through when re-keying
index → seq.
- All 35 harness tests pass; ruff + pyright clean.
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…ess streamed tool-request delivery, include initial_content in payload
- Remove the Start(tool_request)+Done suppression in _yield_logical_deliveries:
auto_send now delivers streamed tool-request messages (AGX1-377 fix), so both
channels emit a LogicalDelivery for a streamed tool_request. The cross-channel
assertion verifies delivery on both sides.
- Include StreamTaskMessageStart.content in payload comparison for text and
reasoning types: TextContent.content is prepended to accumulated deltas;
ReasoningContent.summary items are prepended. This catches a channel that
drops initial_content or reasoning summary (Greptile id 3438655533, P1).
_auto_send_logical_deliveries mirrors the same seeding from ctx initial_content.
- Add "streamed-tool-request" fixture (Start + Done, no Full) to confirm
delivery on both channels under the new auto_send behaviour.
- Update "streaming-text" fixture to use non-empty initial_content ("Init") so
the initial_content seeding is actually exercised by the test.
- Update module/docstring comments that referenced the AGX1-377 suppression.
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…heir gated live tests Only for *claude_code* / *codex* tutorials (no-op for others). Installs the CLI via npm (mirrors the golden-agent sandbox image) and sets CLAUDE_LIVE_TESTS/CODEX_LIVE_TESTS so the gated live agent tests run. Requires the TUTORIAL_ANTHROPIC_API_KEY secret. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…n [greptile] Install @anthropic-ai/[email protected] (CLAUDE_CODE_VERSION env) to mirror the golden agent's sandbox image (teams/sgp/agents/golden_agent/sandbox/Dockerfile) for reproducible CI. Codex is left unpinned to match the sandbox, which also installs @openai/codex unpinned; documented inline so both stay in lockstep. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Per review (AGX1-373): the existing fixtures only exercise one tool at a time, so cross-channel equivalence was proven over trivially-orderable streams — it could not catch the two channels agreeing with each other while both mishandling parallel/interleaved spans or a failing tool. Adds a fixture where two tool spans are open simultaneously (one opened via the streamed Start+Done path, one via Full), close in a different order than they opened, and one returns an error. The tool error uses today's "Error: ..." content convention; once ToolResponseContent.is_error lands (AGX1-371) the fixture should also assert error status on the span. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…s fixture The field landed (AGX1-371), so the failing tool in the parallel-tools fixture now sets is_error=True instead of relying on the "Error: ..." string convention. The deriver threads it onto CloseSpan.is_error and the cross-channel span-signal equivalence covers the error status. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
c9a907c to
a04bf5e
Compare
There was an error while loading. Please reload this page.
…ation Replace the old determinism-only test (derive_all) with the full cross-channel assertion pattern: register fixtures with per-module _OPENAI_FIXTURES, call run_cross_channel_conformance, and assert logical-delivery and span-signal equivalence across yield_events and auto_send — matching the pattern in test_conformance.py. Swap ReasoningSummaryDelta for ReasoningContentDelta so the runner's payload accumulator recognises the delta type and the payload comparison exercises the reasoning seeding path. Remove derive_all import. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…-373) Rewrites test_langgraph_conformance.py to use the cross-channel runner from PR #414 (run_cross_channel_conformance, LogicalDelivery) instead of the simpler derive_all-only API it was written against. The four fixtures (text-only, single-tool, reasoning, multi-step) are retained as canonical StreamTaskMessage* sequences. Each is now exercised by test_cross_channel_equivalence (yield_events vs auto_send logical deliveries and span signals) plus the backward-compat test_span_derivation_is_deterministic guard. LangGraph tool requests arrive as Full events from the "updates" stream; auto_send handles them via open+close, yielding the same LogicalDelivery on both channels. No coalesce_tool_requests option is needed. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…-373) Rewrites test_langgraph_conformance.py to use the cross-channel runner from PR #414 (run_cross_channel_conformance, LogicalDelivery) instead of the simpler derive_all-only API it was written against. The four fixtures (text-only, single-tool, reasoning, multi-step) are retained as canonical StreamTaskMessage* sequences. Each is now exercised by test_cross_channel_equivalence (yield_events vs auto_send logical deliveries and span signals) plus the backward-compat test_span_derivation_is_deterministic guard. LangGraph tool requests arrive as Full events from the "updates" stream; auto_send handles them via open+close, yielding the same LogicalDelivery on both channels. No coalesce_tool_requests option is needed. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.