Add failing tests for #1714: agentic sync stall and opaque error handler#1716
Draft
prompt-driven-github[bot] wants to merge 1 commit into
Draft
Add failing tests for #1714: agentic sync stall and opaque error handler#1716prompt-driven-github[bot] wants to merge 1 commit into
prompt-driven-github[bot] wants to merge 1 commit into
Conversation
…r handler Tests verify two bugs in `pdd sync`: 1. `agentic_sync_identify_modules` (and siblings) call `run_agentic_task()` without an explicit `timeout=` kwarg, allowing a silent spinner stall to burn the full DEFAULT_TIMEOUT_SECONDS (600 s) before failing. 2. `sync_main.py:1297` broad `except Exception` handler omits `record_core_dump_error()`, causing pdd_cloud to surface an opaque "An unexpected error occurred during sync" with no diagnostics. 43 tests: 10 FAIL on current buggy code, 33 PASS on already-correct code. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
5 tasks
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 failing tests that detect the two bugs reported in #1714.
Test Files
tests/test_issue_1714_sync_stall.pyRoot Cause
Bug 1 — Missing
timeout=onrun_agentic_task()calls:agentic_sync_identify_modules(pdd/agentic_sync.py:2787) and its siblingagentic_sync_fix_dry_run(pdd/agentic_sync.py:2022) callrun_agentic_task()without an explicittimeout=kwarg. When the provider stalls (producing only TUI spinner escape codes), the call blocks for the fullDEFAULT_TIMEOUT_SECONDS = 600.0seconds before returningsuccess=False— confirmed by the session log showing exactly 600.06 s. Same omission exists inagentic_fix.py,agentic_crash.py,agentic_verify.py,agentic_update.py,agentic_test_generate.py, andupdate_main.py.Bug 2 — Opaque
except Exceptionhandler insync_main.py:1297:The per-language exception handler catches all Exceptions but does NOT call
record_core_dump_error(), causing pdd_cloud to surface an opaque "An unexpected error occurred during sync" with no exception type, stage name, or traceback. The correct pattern already exists atsync_main.py:821(budget-exhaustion handler).What This PR Contains
Next Steps
timeout=kwarg torun_agentic_task()calls inpdd/agentic_sync.py:2787,pdd/agentic_sync.py:2022, and siblings (agentic_fix.py,agentic_crash.py,agentic_verify.py,agentic_update.py,agentic_test_generate.py,update_main.py)record_core_dump_error()call with exception type, stage, and traceback topdd/sync_main.py:1297; surfacetype(e).__name__in defaultrprintoutputpytest -vv tests/test_issue_1714_sync_stall.pypytest -vv tests/Fixes #1714
Generated by PDD agentic bug workflow