Skip to content

chore(test): consolidate conversations arg-plumbing pipeline tests#66381

Draft
gantoine wants to merge 1 commit into
masterfrom
claude/test-cleanup-conversations-arg-plumbing
Draft

chore(test): consolidate conversations arg-plumbing pipeline tests#66381
gantoine wants to merge 1 commit into
masterfrom
claude/test-cleanup-conversations-arg-plumbing

Conversation

@gantoine

Copy link
Copy Markdown
Member

Problem

Three tests in test_pipeline.py each booted a full WorkflowEnvironment + Worker (all 10 support activities) just to assert a single positional argument was threaded into an activity:

  • test_always_on_context_plumbed_to_draftalways_on_context reaches draft arg 5
  • test_classify_runs_once_and_threads_ticket_type — classify is one-shot, ticket_type/seed_queries thread through, and needs_diagnostics is True when the team opted in
  • test_diagnostics_gated_off_when_team_not_opted_in — same scenario as above with diagnostics_allowed flipped, asserting needs_diagnostics is False

The 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

  • Merge all three into one test_classify_threading_and_diagnostics_gating parameterized over (diagnostics_allowed, expected_needs_diagnostics) = [(True, True), (False, False)].
  • Set always_on_context in 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 by test_workflow_persists_on_high_score.

How did you test this code?

I'm an agent. Ran locally:

hogli test products/conversations/backend/temporal/tests/test_pipeline.py

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_allowed branches (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 asserting always_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

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>
@greptile-apps

greptile-apps Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "chore(test): consolidate conversations a..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant