fix(test): include cost_telemetry in event-order assertion#119
Merged
Conversation
The loop's PR #117 (SDK session_id wiring, closes #109) added a ``cost_telemetry`` event after ``final_result``. The exact-order assertion in test_sdk_happy_path_extracts_pr_and_merged broke because the new event wasn't in the expected list. Caught during the post-merge regression sweep. Behavioural change is correct (cost telemetry is the ticket's deliverable); the test was brittle on exact event ordering and missed the new entry. Also relaxed the seq-monotonicity assertion to handle events that don't carry a seq field (cost_telemetry is a session-end summary, not a streamed turn event).
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.
Caught post-merge: PR #117 added cost_telemetry as a final event but the brittle exact-order test in test_worker.py didn't include it. Updates the list + relaxes seq-monotonicity to handle events without a seq field.