Skip to content

fix(sourcehunt): synthesize before stall termination - #240

Open
ropoctl wants to merge 1 commit into
fix/sourcehunt-final-synthesis-stallfrom
fix/sourcehunt-stall-final-synthesis
Open

ropoctl wants to merge 1 commit into
fix/sourcehunt-final-synthesis-stallfrom
fix/sourcehunt-stall-final-synthesis

Conversation

@ropoctl

@ropoctl ropoctl commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • detect the no-progress boundary before returning stalled
  • deliver one explicit final synthesis/recovery turn at that boundary
  • preserve the existing bounded stall terminal if the recovery turn remains unproductive

Rationale

The final-synthesis guard already covered budget and maximum-step boundaries, but a hunter could reach max_steps_without_progress earlier and terminate without ever receiving the intended synthesis instruction. This keeps the existing bounded behavior while ensuring the model gets one chance to report a source-backed lead or conclude cleanly.

Test plan

  • uv run --extra dev pytest tests/test_deep_agent_loop.py -q (29 passed)
  • uv run --extra dev ruff check clearwing/sourcehunt/hunter.py tests/test_deep_agent_loop.py
  • uv run --extra dev ruff format --check clearwing/sourcehunt/hunter.py tests/test_deep_agent_loop.py
  • git diff --check

@ropoctl
ropoctl requested a review from ehartford as a code owner September 18, 2026 02:04
@ropoctl
ropoctl force-pushed the fix/sourcehunt-stall-final-synthesis branch from cb076eb to 6eb675a Compare September 18, 2026 03:42
@ropoctl
ropoctl force-pushed the fix/sourcehunt-stall-final-synthesis branch from 6eb675a to b621463 Compare September 18, 2026 05:02
@ropoctl
ropoctl changed the base branch from main to fix/sourcehunt-transient-gateway-retry September 18, 2026 05:02
@ropoctl
ropoctl added this pull request to stack #241 September 18, 2026 17:51
@ropoctl
ropoctl removed this pull request from stack #241 September 18, 2026 20:24
@ropoctl
ropoctl changed the base branch from fix/sourcehunt-transient-gateway-retry to fix/sourcehunt-final-synthesis-stall September 18, 2026 20:24
@ropoctl
ropoctl added this pull request to stack #242 September 18, 2026 20:25
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