Add failing tests for #419: Unpushed commits in early exit#422
Merged
gltanaka merged 5 commits intopromptdriven:mainfrom Jan 29, 2026
Merged
Add failing tests for #419: Unpushed commits in early exit#422gltanaka merged 5 commits intopromptdriven:mainfrom
gltanaka merged 5 commits intopromptdriven:mainfrom
Conversation
…ly exit This commit adds comprehensive test coverage for the bug where commits created by LLM agents during Step 1 of the agentic E2E fix workflow are not pushed to the remote repository when the workflow exits early at Step 2. Test files: - tests/test_e2e_issue_419_unpushed_commits.py: Unit tests for _commit_and_push() - tests/test_e2e_issue_419_cli_unpushed_commits.py: E2E integration test The tests verify the expected behavior documented in CHANGELOG v0.0.121: "pdd fix now automatically commits and pushes changes after successful completion" These tests fail on the current buggy code and will pass once the fix is implemented in pdd/agentic_e2e_fix_orchestrator.py lines 237-238. Related to promptdriven#419
This file was a duplicate implementation of _commit_and_push that's already properly fixed in pdd/agentic_e2e_fix_orchestrator.py. The file was: - In the wrong location (pdd/ instead of tests/) - Missing proper imports - Using a different implementation approach The actual fix is at pdd/agentic_e2e_fix_orchestrator.py:237-262
- Shortened excessive docstrings and comments - Removed redundant bug explanations - Simplified pytest.fail messages - Reduced verbosity while maintaining clarity - Removed unnecessary inline comments
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive test coverage for issue #419, which identifies a bug where commits created by LLM agents during Step 1 of the agentic E2E fix workflow are not pushed to the remote repository when the workflow exits early at Step 2.
Changes:
- Adds unit tests that directly test the
_commit_and_push()function to verify it handles unpushed commits - Adds E2E tests that simulate the full CLI workflow to verify commits are pushed after early exit
- Includes a proposed fix to
_commit_and_push()that checks for and pushes unpushed commits even when the working tree is clean
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/test_e2e_issue_419_unpushed_commits.py | Unit tests for _commit_and_push() covering the bug scenario and edge cases |
| tests/test_e2e_issue_419_cli_unpushed_commits.py | E2E CLI tests simulating the full orchestrator workflow with mocked LLM calls |
| pdd/agentic_e2e_fix_orchestrator.py | Proposed fix that checks for unpushed commits before returning early |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ore pushing Addresses Copilot PR review comments on promptdriven#422. The previous implementation attempted to push first, then checked for unpushed commits, which made the check ineffective since commits would already be pushed. Changes: - Check for unpushed commits BEFORE attempting push using git log @{u}..HEAD - Return early if no unpushed commits exist (more efficient) - Only push if unpushed commits are found - Return proper error if push fails instead of silently succeeding This ensures the fix for promptdriven#419 works correctly while being more efficient by avoiding unnecessary push operations.
beknobloch
pushed a commit
to beknobloch/pdd
that referenced
this pull request
Feb 7, 2026
…ore pushing Addresses Copilot PR review comments on promptdriven#422. The previous implementation attempted to push first, then checked for unpushed commits, which made the check ineffective since commits would already be pushed. Changes: - Check for unpushed commits BEFORE attempting push using git log @{u}..HEAD - Return early if no unpushed commits exist (more efficient) - Only push if unpushed commits are found - Return proper error if push fails instead of silently succeeding This ensures the fix for promptdriven#419 works correctly while being more efficient by avoiding unnecessary push operations.
This was referenced Feb 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds comprehensive failing tests that detect the bug reported in #419 where commits created by LLM agents during Step 1 of the agentic E2E fix workflow are not pushed to the remote repository when the workflow exits early at Step 2.
Test Files
Unit test:
tests/test_e2e_issue_419_unpushed_commits.py_commit_and_push()function directlyE2E test:
tests/test_e2e_issue_419_cli_unpushed_commits.pypdd fixCLI workflow from user perspectiveWhat This PR Contains
_commit_and_push()Root Cause
The
_commit_and_push()function at lines 237-238 inpdd/agentic_e2e_fix_orchestrator.pyreturns early with "No changes to commit" without executinggit pushwhen the working tree is clean. The function uses_get_file_hashes()which only detects uncommitted files viagit diff --name-only HEAD, missing commits already created by LLM agents during Step 1 of the workflow.Why it fails:
initial_file_hashescaptured before workflow ={}(no uncommitted files)_commit_and_push()is called, butcurrent_hashes={}(working tree is clean)git pushNext Steps
pdd/agentic_e2e_fix_orchestrator.py:237-238Fixes #419
Generated by PDD agentic bug workflow - Step 10