Skip to content

Add tests for #1485#1496

Open
prompt-driven-github[bot] wants to merge 2 commits into
mainfrom
test/issue-1485
Open

Add tests for #1485#1496
prompt-driven-github[bot] wants to merge 2 commits into
mainfrom
test/issue-1485

Conversation

@prompt-driven-github

Copy link
Copy Markdown
Contributor

Summary

Adds tests based on the requirements in #1485.

Test Files

  • tests/test_checkup_interactive_session.py

Test Coverage

  • Total Tests: 20 (6 existing + 14 new)
  • Framework: pytest
  • Status: All passing
  • Test Plan Coverage: 14/14 planned cases implemented (100%)

What These Tests Verify

Covers all 4 public types in pdd/checkup_interactive_session.py:

ApprovedPatch coercions:

  • str target is coerced to Path in __post_init__
  • anchor dict is copied on construction (mutation independence)

seed() behaviour:

  • Non-mapping report stores without raising
  • Findings using finding_id key are imported correctly
  • Pre-existing options are not overwritten (setdefault semantics)

present_finding() behaviour:

  • Returns a new independent list each call (mutations do not affect subsequent calls)
  • Returns empty list for unknown finding_id

ask() queue exhaustion:

  • Returns "" when answers deque is empty

approved_patches() edge cases:

  • Returns empty list when no choices recorded
  • Two findings produce two ordered approved patches
  • Re-presenting a finding allows a new valid record_choice() call
  • no_patch kind is excluded from approved patches
  • Returned patches are deep copies independent of internal state

Protocol conformance:

  • FakeInteractiveSession satisfies the InteractiveRepairSession structural protocol

Contract Test Summary

N/A - no OpenAPI spec found (stdlib-only module)

Accessibility Audit Summary

N/A - not a web test

Manual Testing Summary

N/A - manual testing not applicable

Test Execution

pytest -vv tests/test_checkup_interactive_session.py

Next Steps

  1. Review the generated tests
  2. Run tests locally to verify
  3. Adjust tests if needed
  4. Mark PR as ready for review

Closes #1485


Generated by PDD agentic test workflow (18-step)

pdd-bot and others added 2 commits June 8, 2026 17:41
Expand test_checkup_interactive_session.py with 14 additional cases
covering ApprovedPatch coercions, seed() behaviour, present_finding()
list independence, ask() queue exhaustion, approved_patches() edge
cases, and InteractiveRepairSession protocol conformance.

All 20 tests (6 existing + 14 new) pass with pytest.

Closes #1485

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@DianaTao

DianaTao commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

/heal

@DianaTao DianaTao marked this pull request as ready for review June 8, 2026 23:22
@DianaTao DianaTao self-assigned this Jun 8, 2026
DianaTao added a commit that referenced this pull request Jun 9, 2026
Rebases Block 1 onto main with review cleanup: finding_id on
ApprovedPatch, duplicate record_choice rejection, merged contract
tests from #1496, Hybrid #1434 cross-link, and a single
architecture.json entry without unicode churn.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

2 participants