Skip to content

[AISOS-2119] Josh-test - ignore#176

Closed
JoshSalomon wants to merge 1 commit into
forge-sdlc:mainfrom
JoshSalomon:forge/aisos-2119
Closed

[AISOS-2119] Josh-test - ignore#176
JoshSalomon wants to merge 1 commit into
forge-sdlc:mainfrom
JoshSalomon:forge/aisos-2119

Conversation

@JoshSalomon

@JoshSalomon JoshSalomon commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR adds comprehensive unit tests for auto-review exhaustion reporting in the PR creation workflow. When AI auto-review cycles are exhausted without approval, the system now properly appends a diagnostic section to the PR body highlighting areas that need human reviewer attention.

Changes

Test Coverage for Review Exhaustion Reporting

  • Added tests for _format_review_exhaustion_section in tests/unit/workflow/utils/test_review_report.py to verify correct markdown formatting of exhaustion data
  • Added tests for collect_review_exhaustion utility to validate proper extraction of review cycle data from container results
  • Added tests for the ContainerResult.review_exhausted property to verify correct detection of exhausted vs. approved review cycles

Review Report Collection Tests

  • Tests verify that exhaustion data is correctly structured with task_key, step_name, skill, max_retries, and final_feedback fields
  • Tests confirm empty reports return empty strings and don't pollute PR bodies
  • Tests validate multiline feedback is properly quoted in markdown blockquotes
  • Tests confirm multiple exhaustion entries are all included in the output section

Implementation Notes

The tests follow existing patterns in the codebase, using:

  • pytest.mark.asyncio for async test functions
  • MagicMock and AsyncMock for mocking dependencies
  • Direct function imports to test formatting utilities in isolation
  • ReviewCycleData dataclass for constructing test data

The _format_review_exhaustion_section function appends an "Auto-Review Notes" section to PR bodies when review cycles exhaust, alerting human reviewers to areas the AI could not resolve. This enables transparent handoff to human reviewers when automated quality gates reach their retry limits.

Testing

  • All tests pass with uv run pytest tests/unit/workflow/utils/test_review_report.py -v
  • Tests verify correct behavior for edge cases including empty reports, single entries, multiple entries, and multiline feedback

Related Tickets


Generated by Forge SDLC Orchestrator

Auto-Review Notes

The following review criteria could not be resolved after all retry attempts.
Human reviewers should pay particular attention to these areas.

implement_task — AISOS-2204

Skill: implement-task | Retries: 2/2 exhausted

**

Deliberate rejection for testing — task ID is divisible by 4.

@JoshSalomon
JoshSalomon deleted the forge/aisos-2119 branch July 16, 2026 16:43
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