Skip to content

test: cover StepInfo save/load round-trip in loop.py - #24

Open
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1789677955-step-info-round-trip-tests
Open

devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1789677955-step-info-round-trip-tests

Conversation

@devin-ai-integration

Copy link
Copy Markdown

Summary

Closes a code scan coverage gap: nothing in tests/ exercised StepInfo.save_step_info / ExpResult.get_step_info, so a regression in the screenshot/goal-object offload or in DataclassJSONEncoder would silently corrupt saved episodes.

New tests/experiments/test_loop.py uses tmp_path and no browser/env, asserting:

  • screenshots are written as PNGs, stripped from the pickle, and restored onto obs in memory after save
  • goal_object is offloaded to goal_object.pkl.gz, replaced by the None placeholder, and re-hydrated by get_step_info
  • the goal object is written only once (a later step's differing goal does not overwrite it — current documented behavior)
  • save_screenshot=False, save_som=False leaves no PNGs and load tolerates the missing files
  • save_json=True produces steps_info.json, with DataclassJSONEncoder converting numpy scalars/arrays and nested dataclasses

Devin-Org: engineering

Link to Devin session: https://app.devin.ai/sessions/2a00f008474244b191b08214cae95b30
Open in Devin Desktop: https://app.devin.ai/desktop/session/2a00f008474244b191b08214cae95b30?variant=devin

@devin-ai-integration

Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

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.

0 participants