Skip to content

Implement test file reset functionality for SweBench#51

Open
sarvanithin wants to merge 1 commit intowithmartian:mainfrom
sarvanithin:feat/implement-test-file-reset
Open

Implement test file reset functionality for SweBench#51
sarvanithin wants to merge 1 commit intowithmartian:mainfrom
sarvanithin:feat/implement-test-file-reset

Conversation

@sarvanithin
Copy link
Contributor

  • Implement _reset_test_files() to restore test files to original state
  • Uses git checkout to reset PASS_TO_PASS and FAIL_TO_PASS test files
  • Add DOCKER_WORKDIR import from swebench.harness.constants
  • Add proper error handling with logging and RuntimeError
  • Handle empty test file lists gracefully
  • Remove TODO comment - function now fully implemented

This ensures tests are run against the original test suite, preventing agents from accidentally modifying tests and affecting evaluation.

- Implement _reset_test_files() to restore test files to original state
- Uses git checkout to reset PASS_TO_PASS and FAIL_TO_PASS test files
- Add DOCKER_WORKDIR import from swebench.harness.constants
- Add proper error handling with logging and RuntimeError
- Handle empty test file lists gracefully
- Remove TODO comment - function now fully implemented

This ensures tests are run against the original test suite, preventing
agents from accidentally modifying tests and affecting evaluation.
@joshgreaves
Copy link
Contributor

Thanks @sarvanithin !
We're currently planning on removing this class in favor of the Harbor version of swebench. Let's hold this PR for now, since by EOD we should know whether we're keeping or removing this.

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.

2 participants