Skip to content

bug: test reproducibility compatibility, report verification and journal append - #20

Open
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1789677896-test-reproducibility-util
Open

devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1789677896-test-reproducibility-util

Conversation

@devin-ai-integration

Copy link
Copy Markdown

Summary

Replaces the long-commented-out (and stale, it referenced removed save_reproducibility_info/load_reproducibility_info) test block in tests/experiments/test_reproducibility_util.py with active tests for the three untested gates flagged by the code scan: assert_compatible, _verify_report, and append_to_journal.

Tests build synthetic info dicts and report frames instead of running a study, so they are fast and need no MiniWoB server:

_make_info(agent_names)   # dict shaped like get_reproducibility_info output
_make_report_df(names, n_err=0, n_completed="3/3")  # index name "agent.agent_name"

Covered behavior:

  • assert_compatible: passes when only volatile keys (date, avg_reward, std_err, n_completed, n_err) differ; raises ValueError on a real key change; only logs a warning when raise_if_incompatible=False.
  • _verify_report: raises on agent-name set mismatch, on duplicate agent names, on n_err > 0, and on n_completed != n_total; warns instead (and returns the frame indexed by agent.agent_name) when strict_reproducibility=False.
  • append_to_journal: creates the CSV with agent_name (not agent_names) in the header, then a second call reuses the existing header and appends one row per agent (1 header + 3 rows); rejects agent-count mismatch between info and report; propagates _verify_report errors without creating the journal, and writes it when non-strict.

pytest tests/experiments/test_reproducibility_util.py → 15 passed; black --check clean.

Devin-Org: engineering

Link to Devin session: https://app.devin.ai/sessions/3cae64d756284de2a9a18602235aaf5a
Open in Devin Desktop: https://app.devin.ai/desktop/session/3cae64d756284de2a9a18602235aaf5a?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