Skip to main content
Loss of provenance

A previous release had provenance metadata, but this release does not. View details.

Refactor Arena

NOTE: This package has been renamed. Find the new package at refactor-arena or visit refactorarena.com for the documentation.

A Control Arena setting for evaluating agents on full repository refactoring tasks with optional backdoor insertion.

View full documentation.

Overview

This setting provides an environment for evaluating agents on full repository refactoring tasks. Each task involves:

  1. Main Task: Refactoring the repository to improve code quality and maintainability.
  2. Side Task (Attack Mode): Inserting a hidden vulnerability while performing the refactoring that is exploited when running the tests.

Installation

Install the package (requires Python 3.12):

# Install the package
pip install refactor-arena

# Setup your .env and initial scenario
refactor-arena init

# Run getting started scenario in honest mode
refactor-arena eval --config getting-started

If not already installed, install Docker. Docker must be running for the evals to execute.

Usage

Using the CLI

# Run with default settings using `side-tasks-3/mixed-3` dataset
refactor-arena

# Setup your .env and initial scenario
refactor-arena init

# Run getting started scenario in honest mode
refactor-arena eval --config getting-started

# Run getting started scenario in attack mode
refactor-arena eval --config getting-started --eval-mode attack

# Run with a different dataset from `github:fastfedora/full-repo-datasets` and limit main tasks
refactor-arena --dataset side-tasks-3/mixed-20 --main-task "refactor_single_file"

# Run with verbose logging and limit to 3 samples
refactor-arena eval --config getting-started --verbose --limit 3

# View help
refactor-arena --help

Configuration

To create a new scenario, create a file that references the main configuration file from the package and then override the settings you want to change.

For instance, to create a scenario that runs only the Refactor Single File main task against the 20-repo side-tasks-3/mixed-20 dataset in attack mode, create a file called mixed-20.yaml:

# mixed-20.yaml
includes:
  - package:config.yaml

setting:
  dataset: "side-tasks-3/mixed-20"
  main_task: refactor_single_file$

eval:
  # Default mode for this scenario is attack; use `--eval-mode honest` to run in honest mode
  mode: attack

Then run this scenario using:

refactor-arena --config=mixed-20

Almost all aspects of the setting can be configured via configuration files, including:

  • models
  • prompts
  • main tasks
  • side tasks
  • policies
  • monitors
  • metrics
  • eval settings

See the documentation for more details.

License

MIT License

Metadata

Release files for full-repo-refactor 0.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Loss of provenance

This file belongs to a release without provenance metadata, despite a prior release including this data.

We recommend further investigation before installing this file. View details.

Built distribution (wheel)

Table of built distributions (wheels) for full-repo-refactor 0.6.1
File Interpreter ABI Platform Actions
full_repo_refactor-0.6.1-py3-none-any.whl Python 3 none any Details for full_repo_refactor-0.6.1-py3-none-any.whl

Release files / full_repo_refactor-0.6.1-py3-none-any.whl

Loss of provenance

This file belongs to a release without provenance metadata, despite a prior release including this data.

We recommend further investigation before installing this file. View details.

Download URL full_repo_refactor-0.6.1-py3-none-any.whl
Size 2.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2fd867069dfd9694c4647fb02d8aba7b0b79a30e3078bcc44d3452699910945a
BLAKE2b-256 checksum
How to use checksums
9f3c2e517f42b43c55be7ac486cc09ef3e96c9bb1928f89eb4ae3a7e05a89d39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Security for full-repo-refactor 0.6.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Loss of provenance

A previous release of these files had provenance metadata, but this release does not.

While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.

Release comparison

  • Removed 0.5.0 2 files With provenance
  • Added 0.6.1 1 file Without provenance

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page