Skip to content

Add missing opportunity scoring tier test coverage (supersedes #7) - #22

Merged
mdvnavy merged 1 commit into
mainfrom
claude/add-missing-opportunity-scoring-tier-test-coverage
Jul 3, 2026
Merged

Add missing opportunity scoring tier test coverage (supersedes #7)#22
mdvnavy merged 1 commit into
mainfrom
claude/add-missing-opportunity-scoring-tier-test-coverage

Conversation

@Claude

@Claude Claude AI commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Re-applies the test additions from PR #7 cleanly on top of current main. PR #7 was created against a much older base and is in a dirty merge state (a hard conflict on tests/test_core.py after main added the Jules/OBS test suite). This PR delivers the same intended coverage improvement — nothing more.

What changed

  • tests/test_core.py
    • Add from client_discovery.models import ClientIntake to allow constructing intake objects directly in tests.
    • Add test_score_opportunity_quick_win_tier — 1 pain point, no tools → Quick Win, $500-$2,500.
    • Add test_score_opportunity_full_integration_tier — 4 pain points, 4 goals, with tools → Full Integration, $10,000-$25,000.

Total diff: 1 file, +21 / -0. Same content that PR #7 proposed, transplanted verbatim on top of current main so it merges cleanly.

Why

Before this change, only the Custom AI Agent branch of score_opportunity was covered by tests. The Quick Win and Full Integration branches could regress silently. Together with the existing test_score_opportunity_returns_tier_and_transparent_reasons, all three tier logic paths are now covered.

Verification

  • python -m pytest tests/test_core.py -v17 passed
  • python -m pytest -q (full suite) → 131 passed, 14 skipped (identical to pre-change baseline; no regressions)
  • Secret scan on changed files: clean
  • Code review + CodeQL validation: no blocking issues

Relationship to PR #7

PR #7 (add-missing-opportunity-tier-tests-3777336829010347368) branched from b25ac393 (pre-Jules/OBS merge). Since then, main added ~9 tests to tests/test_core.py at the exact insertion point PR #7 was targeting, plus a sys.path bootstrap block and new imports at the file header. Rebasing/merging PR #7 requires manually stitching both sides — which is exactly what this PR does. Once merged here, PR #7 can be closed as superseded.

🤖 Generated with Claude Code

Adds Quick Win and Full Integration tier tests for score_opportunity,
originally proposed in PR #7 which was blocked by a merge conflict
against main. This branch re-applies the same two tests cleanly on
top of current main and imports ClientIntake to build fixtures
directly.

Verified: pytest -q -> 131 passed, 14 skipped (no regressions).

Agent-Logs-Url: https://github.com/mdvnavy/Dia/sessions/a37077d2-cec6-48ce-aea8-9fc121c06536

Co-authored-by: mdvnavy <218024324+mdvnavy@users.noreply.github.com>
@Claude Claude AI assigned Claude and mdvnavy Jul 3, 2026
@Claude
Claude AI requested a review from mdvnavy July 3, 2026 08:14
@mdvnavy
mdvnavy changed the base branch from test to main July 3, 2026 08:18
@mdvnavy
mdvnavy marked this pull request as ready for review July 3, 2026 08:19
Copilot AI review requested due to automatic review settings July 3, 2026 08:19
@mdvnavy
mdvnavy merged commit 48aed7e into main Jul 3, 2026
1 check passed
@mdvnavy
mdvnavy deleted the claude/add-missing-opportunity-scoring-tier-test-coverage branch July 3, 2026 08:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request improves regression protection for client_discovery.core.score_opportunity by adding explicit tests for the previously uncovered tier branches (Quick Win and Full Integration) on top of current main.

Changes:

  • Import ClientIntake into tests/test_core.py so tests can construct intake objects directly.
  • Add test_score_opportunity_quick_win_tier to cover the Quick Win tier and price range.
  • Add test_score_opportunity_full_integration_tier to cover the Full Integration tier and price range.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/test_core.py


def test_score_opportunity_quick_win_tier():
intake = ClientIntake(pain_points=["pain1"], tools="")
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.

4 participants