chore(test): consolidate conversations arg-plumbing pipeline tests#66381
Draft
gantoine wants to merge 1 commit into
Draft
chore(test): consolidate conversations arg-plumbing pipeline tests#66381gantoine wants to merge 1 commit into
gantoine wants to merge 1 commit into
Conversation
Three workflow tests each spun a full `WorkflowEnvironment` + Worker only to assert a single positional argument reached an activity: `test_always_on_context_plumbed_to_draft` (always_on_context → draft arg 5), `test_classify_runs_once_and_threads_ticket_type` (ticket_type/seed_queries threading + diagnostics gating True), and `test_diagnostics_gated_off_when_team_ not_opted_in` (gating False — identical to the previous test with one flag flipped). Fold all three into one `test_classify_threading_and_diagnostics_gating` parameterized over `diagnostics_allowed`. The merged test already drafts, so it asserts the always_on_context plumbing too. This drops one `WorkflowEnvironment` spin and ~150 lines while preserving every assertion. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
Reviews (1): Last reviewed commit: "chore(test): consolidate conversations a..." | Re-trigger Greptile |
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.
Problem
Three tests in
test_pipeline.pyeach booted a fullWorkflowEnvironment+ Worker (all 10 support activities) just to assert a single positional argument was threaded into an activity:test_always_on_context_plumbed_to_draft—always_on_contextreaches draft arg 5test_classify_runs_once_and_threads_ticket_type— classify is one-shot, ticket_type/seed_queries thread through, andneeds_diagnosticsis True when the team opted intest_diagnostics_gated_off_when_team_not_opted_in— same scenario as above withdiagnostics_allowedflipped, assertingneeds_diagnosticsis FalseThe last two are the same workflow run differing only by one input flag, and the first asserts a plumbing fact the others' draft call already exercises.
Changes
test_classify_threading_and_diagnostics_gatingparameterized over(diagnostics_allowed, expected_needs_diagnostics)=[(True, True), (False, False)].always_on_contextin the merged test's build output and assert it reaches draft arg 5, folding in the first test's only unique assertion.Net: 3 workflow spins → 2, ~150 lines removed, every original assertion preserved. The happy-path that the deleted always_on_context test also touched (
how_to, validate succeeds) stays covered bytest_workflow_persists_on_high_score.How did you test this code?
I'm an agent. Ran locally:
Result: 74 passed.
🤖 Agent context
Autonomy: Fully autonomous
Part of a monorepo test-suite cleanup targeting high CI-wall-time tests. Adversarial check: the merged parameterization keeps both
diagnostics_allowedbranches (the gating is the real regression surface), the classify-once / MAX_ATTEMPTS-loop assertions, and the always_on_context plumbing — so no unique regression coverage is dropped. The draft activity signature is fixed, so assertingalways_on_context(arg 5) in the diagnostic path is equivalent to asserting it in the original how_to path. Tool: Claude Code (Opus 4.8).Requesting review from: Conversations