Skip to content

test(ai): cover one-call-per-cause path in AiFailureAnalyzer - #187

Merged
shossain786 merged 1 commit into
masterfrom
test/ai-failure-analyzer-same-cause
Oct 21, 2026
Merged

shossain786 merged 1 commit into
masterfrom
test/ai-failure-analyzer-same-cause

Conversation

@shossain786

Copy link
Copy Markdown
Contributor

What & why

The one-AI-call-per-failure-cause path had no automated test. Adds a small package-private analyze(cfg, ...) seam (the public analyze just delegates with config()) and 4 tests against a local fake provider:

  • same-cause failures share one call and each get the analysis
  • different causes get their own call
  • concurrent same-cause failures wait on the in-flight call
  • a failed call is not cached, so the next same-cause failure retries

Verification

  • New tests pass; full mvn test green.
  • Fail-before: disabling the sharing branch fails 2 tests; removing the failed-call eviction fails 1.

🤖 Generated with Claude Code

Adds an analyze(cfg, ...) test seam and tests against a local fake provider:
same-cause sharing, distinct causes, concurrent waiters, and failed calls not cached.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@shossain786
shossain786 merged commit 748d9b6 into master Oct 21, 2026
2 checks passed
@shossain786
shossain786 deleted the test/ai-failure-analyzer-same-cause branch October 21, 2026 04:58
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