Skip to content

Limit PaperBench computer retries to startup - #166

Open
sylvesterkaczmarek wants to merge 1 commit into
openai:mainfrom
sylvesterkaczmarek:fix-paperbench-start-retry-scope
Open

Limit PaperBench computer retries to startup#166
sylvesterkaczmarek wants to merge 1 commit into
openai:mainfrom
sylvesterkaczmarek:fix-paperbench-start-retry-scope

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Summary

  • retry failures while entering the computer runtime context
  • keep the successfully started computer context open around the caller body
  • stop Tenacity from treating exceptions raised by the caller body as startup failures

start_computer_with_retry() currently yields the computer from inside Tenacity's with attempt: block. That means an exception raised by the caller's async with body is fed back into the retry attempt. If it matches exception_types, the helper can retry even though startup succeeded, causing the async context manager to try to yield again.

The fix uses an AsyncExitStack to retain the successfully entered runtime context, completes the retry loop first, and yields the computer only after startup has succeeded.

Regression coverage verifies that genuine startup failures are retried while a matching exception from the caller body propagates after exactly one computer start.

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