Skip to content

fix: reuse event loop across Harbor attempts - #16

Merged
nmogil merged 1 commit into
mainfrom
fix-daytona-parity-event-loop
Jul 12, 2026
Merged

fix: reuse event loop across Harbor attempts#16
nmogil merged 1 commit into
mainfrom
fix-daytona-parity-event-loop

Conversation

@nmogil

@nmogil nmogil commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix the real multi-attempt Daytona activation failure found by the approved 18-attempt provider-parity matrix.

The first attempt completed successfully, but the runner created and closed a fresh event loop around every HarborBackend.run_attempt. Daytona SDK 0.196.0 shares an aiohttp client session tied to the first loop, so attempts 2–18 failed before sandbox creation with Event loop is closed.

This change:

  • Executes every prepared Harbor attempt sequentially within one owned asyncio.run(...) lifecycle.
  • Preserves attempt ordering and existing single-attempt behavior.
  • Adds a regression test proving multiple attempts observe the same live loop and that the owned loop closes after the run.
  • Adds no concurrency, retries, provider bypasses, or evidence/cleanup weakening.

Live failure boundary

  • Attempt 1: quality eligible.
  • Attempts 2–18: failed before sandbox creation/model execution.
  • Aggregate output correctly failed closed at 1/18 evidence.
  • Nothing was uploaded to BlindBench.
  • Provider check after failure: zero remaining Daytona sandboxes.

Verification

Supervisor-run from the final diff:

  • Focused event-loop/matrix tests: 2 passed
  • Full non-live suite including real Docker smoke: 115 passed, 1 paid-live deselected
  • Ruff: passed
  • mypy: passed (15 source files)
  • git diff --check: passed

No paid calls were made while implementing this fix.

@nmogil
nmogil merged commit d90d57a into main Jul 12, 2026
2 checks passed
@nmogil
nmogil deleted the fix-daytona-parity-event-loop branch July 12, 2026 18:59
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