featurebench 0.2.2__tar.gz → 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- featurebench-0.3.0/.env.example +8 -0
- {featurebench-0.2.2 → featurebench-0.3.0}/.gitignore +1 -5
- featurebench-0.3.0/PKG-INFO +206 -0
- featurebench-0.2.2/PKG-INFO → featurebench-0.3.0/README.md +66 -53
- featurebench-0.3.0/codeworld/__init__.py +31 -0
- featurebench-0.3.0/codeworld/adapters/__init__.py +31 -0
- featurebench-0.3.0/codeworld/adapters/base.py +144 -0
- featurebench-0.3.0/codeworld/adapters/catalog.py +132 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/__init__.py +48 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/assets/issue/protocol.md +43 -0
- featurebench-0.2.2/featurebench/resources/templates/level_1.j2 → featurebench-0.3.0/codeworld/adapters/featurebench/assets/level_1.md.j2 +5 -5
- featurebench-0.3.0/codeworld/adapters/featurebench/assets/prompts/issue.instructions.md +13 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/assets/prompts/issue.user.md +8 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/assets/prompts/repair.instructions.md +18 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/assets/prompts/repair.user.md +7 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/assets/prompts/top.batch.md +3 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/assets/prompts/top.instructions.md +16 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/assets/repair/feedback.md.j2 +37 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/assets/repair/protocol.md +19 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/assets/tracing/featurebench_trace_codec.py.txt +41 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/assets/tracing/featurebench_trace_context.py.txt +22 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/assets/tracing/featurebench_trace_plugin.py.txt +99 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/assets/tracing/featurebench_trace_runtime.py.txt +415 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/assets/tracing/featurebench_trace_selection.py.txt +33 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/assets/tracing/runner.py.txt +202 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/assets/tracing/sitecustomize.py.txt +32 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/config.py +157 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/definition.py +53 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/diagnostics.py +800 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/finalization.py +68 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/generator.py +2626 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/indexing.py +629 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/issue/__init__.py +1 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/issue/agent.py +111 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/issue/capability.py +44 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/issue/models.py +21 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/issue/service.py +94 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/issue/validation.py +88 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/issue/workspace.py +148 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/masking.py +1686 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/models.py +381 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/optimization.py +444 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/p2p.py +590 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/prompting.py +142 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/quality.py +230 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/quality_gate.py +101 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/repair/__init__.py +1 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/repair/agent.py +95 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/repair/capability.py +44 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/repair/models.py +91 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/repair/rollback.py +905 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/repair/service.py +221 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/repair/workspace.py +401 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/resources.py +25 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/runtime.py +53 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/testing.py +409 -0
- featurebench-0.3.0/codeworld/adapters/featurebench/top_agent.py +321 -0
- featurebench-0.3.0/codeworld/agents/__init__.py +5 -0
- featurebench-0.3.0/codeworld/agents/compaction.py +123 -0
- featurebench-0.3.0/codeworld/agents/factory.py +749 -0
- featurebench-0.3.0/codeworld/agents/feedback.py +157 -0
- featurebench-0.3.0/codeworld/agents/step_store.py +338 -0
- featurebench-0.3.0/codeworld/agents/telemetry.py +147 -0
- featurebench-0.3.0/codeworld/agents/workspace.py +307 -0
- featurebench-0.3.0/codeworld/application/__init__.py +19 -0
- featurebench-0.3.0/codeworld/application/build.py +251 -0
- featurebench-0.3.0/codeworld/application/discover.py +78 -0
- featurebench-0.3.0/codeworld/application/generate.py +168 -0
- featurebench-0.3.0/codeworld/application/resources.py +38 -0
- featurebench-0.3.0/codeworld/cli.py +645 -0
- featurebench-0.3.0/codeworld/config.py +645 -0
- featurebench-0.3.0/codeworld/console/__init__.py +1 -0
- featurebench-0.3.0/codeworld/console/config_tui.py +564 -0
- featurebench-0.3.0/codeworld/console/configuration.py +493 -0
- featurebench-0.3.0/codeworld/console/models.py +274 -0
- featurebench-0.3.0/codeworld/discovery/__init__.py +11 -0
- featurebench-0.3.0/codeworld/discovery/github.py +741 -0
- featurebench-0.3.0/codeworld/discovery/models.py +93 -0
- featurebench-0.3.0/codeworld/discovery/run.py +470 -0
- featurebench-0.3.0/codeworld/display.py +1179 -0
- featurebench-0.3.0/codeworld/environment/__init__.py +1 -0
- featurebench-0.3.0/codeworld/environment/artifact_validation.py +134 -0
- featurebench-0.3.0/codeworld/environment/artifact_validation_rules/__init__.py +1 -0
- featurebench-0.3.0/codeworld/environment/artifact_validation_rules/_runtime.py +43 -0
- featurebench-0.3.0/codeworld/environment/artifact_validation_rules/common.py +43 -0
- featurebench-0.3.0/codeworld/environment/artifact_validation_rules/go.py +17 -0
- featurebench-0.3.0/codeworld/environment/artifact_validation_rules/node.py +20 -0
- featurebench-0.3.0/codeworld/environment/artifact_validation_rules/php.py +17 -0
- featurebench-0.3.0/codeworld/environment/artifact_validation_rules/pytest.py +99 -0
- featurebench-0.3.0/codeworld/environment/artifact_validation_rules/python.py +300 -0
- featurebench-0.3.0/codeworld/environment/artifact_validation_rules/ruby.py +17 -0
- featurebench-0.3.0/codeworld/environment/artifact_validation_rules/rust.py +17 -0
- featurebench-0.3.0/codeworld/environment/assets/base_images/cuda-12.4.Dockerfile +9 -0
- featurebench-0.3.0/codeworld/environment/assets/base_images/dotnet-8.Dockerfile +7 -0
- featurebench-0.3.0/codeworld/environment/assets/base_images/generic-ubuntu.Dockerfile +9 -0
- featurebench-0.3.0/codeworld/environment/assets/base_images/go-1.24.Dockerfile +7 -0
- featurebench-0.3.0/codeworld/environment/assets/base_images/java-17.Dockerfile +7 -0
- featurebench-0.3.0/codeworld/environment/assets/base_images/java-21.Dockerfile +7 -0
- featurebench-0.3.0/codeworld/environment/assets/base_images/node-20.Dockerfile +8 -0
- featurebench-0.3.0/codeworld/environment/assets/base_images/node-22.Dockerfile +8 -0
- featurebench-0.3.0/codeworld/environment/assets/base_images/php-8.3.Dockerfile +15 -0
- featurebench-0.3.0/codeworld/environment/assets/base_images/python-3.10.Dockerfile +63 -0
- featurebench-0.3.0/codeworld/environment/assets/base_images/python-3.11.Dockerfile +63 -0
- featurebench-0.3.0/codeworld/environment/assets/base_images/python-3.12.Dockerfile +66 -0
- featurebench-0.3.0/codeworld/environment/assets/base_images/python-3.13.Dockerfile +66 -0
- featurebench-0.3.0/codeworld/environment/assets/base_images/python-3.14.Dockerfile +66 -0
- featurebench-0.3.0/codeworld/environment/assets/base_images/ruby-3.3.Dockerfile +7 -0
- featurebench-0.3.0/codeworld/environment/assets/base_images/rust-stable.Dockerfile +8 -0
- featurebench-0.3.0/codeworld/environment/assets/feedback/analysis.yaml +18 -0
- featurebench-0.3.0/codeworld/environment/assets/feedback/artifact.yaml +113 -0
- featurebench-0.3.0/codeworld/environment/assets/feedback/build.yaml +50 -0
- featurebench-0.3.0/codeworld/environment/assets/feedback/validation.yaml +22 -0
- featurebench-0.3.0/codeworld/environment/assets/prompts/ecosystems/dotnet.yaml +15 -0
- featurebench-0.3.0/codeworld/environment/assets/prompts/ecosystems/go.yaml +12 -0
- featurebench-0.3.0/codeworld/environment/assets/prompts/ecosystems/junit.yaml +7 -0
- featurebench-0.3.0/codeworld/environment/assets/prompts/ecosystems/maven.yaml +19 -0
- featurebench-0.3.0/codeworld/environment/assets/prompts/ecosystems/node.yaml +15 -0
- featurebench-0.3.0/codeworld/environment/assets/prompts/ecosystems/php.yaml +13 -0
- featurebench-0.3.0/codeworld/environment/assets/prompts/ecosystems/phpunit.yaml +7 -0
- featurebench-0.3.0/codeworld/environment/assets/prompts/ecosystems/pytest.yaml +53 -0
- featurebench-0.3.0/codeworld/environment/assets/prompts/ecosystems/python.yaml +17 -0
- featurebench-0.3.0/codeworld/environment/assets/prompts/ecosystems/rspec.yaml +18 -0
- featurebench-0.3.0/codeworld/environment/assets/prompts/ecosystems/ruby.yaml +12 -0
- featurebench-0.3.0/codeworld/environment/assets/prompts/ecosystems/rust.yaml +20 -0
- featurebench-0.3.0/codeworld/environment/assets/prompts/environment/analysis.instructions.md +15 -0
- featurebench-0.3.0/codeworld/environment/assets/prompts/environment/analysis.user.md +40 -0
- featurebench-0.3.0/codeworld/environment/assets/prompts/environment/artifact.activation.user.md +4 -0
- featurebench-0.3.0/codeworld/environment/assets/prompts/environment/artifact.common.user.md +11 -0
- featurebench-0.3.0/codeworld/environment/assets/prompts/environment/artifact.dockerfile.user.md +21 -0
- featurebench-0.3.0/codeworld/environment/assets/prompts/environment/artifact.initial.instructions.md +8 -0
- featurebench-0.3.0/codeworld/environment/assets/prompts/environment/artifact.repair.instructions.md +22 -0
- featurebench-0.3.0/codeworld/environment/assets/prompts/environment/artifact.runner-repair.instructions.md +10 -0
- featurebench-0.3.0/codeworld/environment/assets/prompts/environment/artifact.runner.user.md +28 -0
- featurebench-0.3.0/codeworld/environment/assets/prompts/environment/runner-review.instructions.md +57 -0
- featurebench-0.3.0/codeworld/environment/assets/prompts/environment/runner-review.user.md +6 -0
- featurebench-0.3.0/codeworld/environment/build_diagnostics.py +364 -0
- featurebench-0.3.0/codeworld/environment/builder.py +1992 -0
- featurebench-0.3.0/codeworld/environment/bundle.py +128 -0
- featurebench-0.3.0/codeworld/environment/diagnostic_rules/__init__.py +1 -0
- featurebench-0.3.0/codeworld/environment/diagnostic_rules/go.py +42 -0
- featurebench-0.3.0/codeworld/environment/diagnostic_rules/maven.py +89 -0
- featurebench-0.3.0/codeworld/environment/diagnostic_rules/python.py +490 -0
- featurebench-0.3.0/codeworld/environment/diagnostic_rules/ruby.py +81 -0
- featurebench-0.3.0/codeworld/environment/diagnostics.py +124 -0
- featurebench-0.3.0/codeworld/environment/ecosystems.py +186 -0
- featurebench-0.3.0/codeworld/environment/feedback.py +94 -0
- featurebench-0.3.0/codeworld/environment/framework_validation.py +92 -0
- featurebench-0.3.0/codeworld/environment/framework_validation_rules/__init__.py +1 -0
- featurebench-0.3.0/codeworld/environment/framework_validation_rules/pytest.py +73 -0
- featurebench-0.3.0/codeworld/environment/frameworks/__init__.py +1 -0
- featurebench-0.3.0/codeworld/environment/frameworks/pytest.py +45 -0
- featurebench-0.3.0/codeworld/environment/job.py +303 -0
- featurebench-0.3.0/codeworld/environment/jsonl.py +214 -0
- featurebench-0.3.0/codeworld/environment/labels.py +16 -0
- featurebench-0.3.0/codeworld/environment/models.py +54 -0
- featurebench-0.3.0/codeworld/environment/planning.py +1420 -0
- featurebench-0.3.0/codeworld/environment/production.py +469 -0
- featurebench-0.3.0/codeworld/environment/prompt_assets.py +36 -0
- featurebench-0.3.0/codeworld/environment/runner.py +373 -0
- featurebench-0.3.0/codeworld/environment/runner_contract.py +83 -0
- featurebench-0.3.0/codeworld/environment/runner_review.py +101 -0
- featurebench-0.3.0/codeworld/errors.py +208 -0
- featurebench-0.3.0/codeworld/events.py +146 -0
- featurebench-0.3.0/codeworld/models.py +94 -0
- featurebench-0.3.0/codeworld/progress.py +293 -0
- featurebench-0.3.0/codeworld/provenance.py +96 -0
- featurebench-0.3.0/codeworld/registry_loading.py +33 -0
- featurebench-0.3.0/codeworld/repositories/__init__.py +1 -0
- featurebench-0.3.0/codeworld/repositories/identity.py +36 -0
- featurebench-0.3.0/codeworld/repositories/jsonl.py +116 -0
- featurebench-0.3.0/codeworld/repositories/models.py +47 -0
- featurebench-0.3.0/codeworld/repositories/staging.py +525 -0
- featurebench-0.3.0/codeworld/repositories/targets.py +59 -0
- featurebench-0.3.0/codeworld/run_layout.py +81 -0
- featurebench-0.3.0/codeworld/runtime/__init__.py +1 -0
- featurebench-0.3.0/codeworld/runtime/base.py +76 -0
- featurebench-0.3.0/codeworld/runtime/container.py +1053 -0
- featurebench-0.3.0/codeworld/selection.py +136 -0
- featurebench-0.3.0/codeworld/sources/__init__.py +61 -0
- featurebench-0.3.0/codeworld/sources/adapter_registrations/__init__.py +1 -0
- featurebench-0.3.0/codeworld/sources/adapter_registrations/apt.py +6 -0
- featurebench-0.3.0/codeworld/sources/adapter_registrations/cargo.py +6 -0
- featurebench-0.3.0/codeworld/sources/adapter_registrations/composer.py +20 -0
- featurebench-0.3.0/codeworld/sources/adapter_registrations/cran.py +14 -0
- featurebench-0.3.0/codeworld/sources/adapter_registrations/dart.py +20 -0
- featurebench-0.3.0/codeworld/sources/adapter_registrations/docker.py +6 -0
- featurebench-0.3.0/codeworld/sources/adapter_registrations/git.py +6 -0
- featurebench-0.3.0/codeworld/sources/adapter_registrations/go.py +27 -0
- featurebench-0.3.0/codeworld/sources/adapter_registrations/hex.py +14 -0
- featurebench-0.3.0/codeworld/sources/adapter_registrations/huggingface.py +6 -0
- featurebench-0.3.0/codeworld/sources/adapter_registrations/maven.py +8 -0
- featurebench-0.3.0/codeworld/sources/adapter_registrations/node.py +22 -0
- featurebench-0.3.0/codeworld/sources/adapter_registrations/playwright.py +6 -0
- featurebench-0.3.0/codeworld/sources/adapter_registrations/python.py +33 -0
- featurebench-0.3.0/codeworld/sources/adapter_registrations/rubygems.py +6 -0
- featurebench-0.3.0/codeworld/sources/adapter_registrations/rustup.py +6 -0
- featurebench-0.3.0/codeworld/sources/apt.py +63 -0
- featurebench-0.3.0/codeworld/sources/arguments.py +60 -0
- featurebench-0.3.0/codeworld/sources/base.py +263 -0
- featurebench-0.3.0/codeworld/sources/cargo.py +91 -0
- featurebench-0.3.0/codeworld/sources/conda.py +95 -0
- featurebench-0.3.0/codeworld/sources/defaults.py +11 -0
- featurebench-0.3.0/codeworld/sources/docker.py +49 -0
- featurebench-0.3.0/codeworld/sources/git.py +224 -0
- featurebench-0.3.0/codeworld/sources/gradle.py +68 -0
- featurebench-0.3.0/codeworld/sources/huggingface.py +54 -0
- featurebench-0.3.0/codeworld/sources/manager.py +557 -0
- featurebench-0.3.0/codeworld/sources/maven.py +81 -0
- featurebench-0.3.0/codeworld/sources/playwright.py +51 -0
- featurebench-0.3.0/codeworld/sources/pypi.py +417 -0
- featurebench-0.3.0/codeworld/sources/pytorch.py +49 -0
- featurebench-0.3.0/codeworld/sources/registry.py +154 -0
- featurebench-0.3.0/codeworld/sources/rubygems.py +76 -0
- featurebench-0.3.0/codeworld/sources/rustup.py +71 -0
- featurebench-0.3.0/codeworld/state.py +366 -0
- featurebench-0.3.0/codeworld/storage/__init__.py +18 -0
- featurebench-0.3.0/codeworld/storage/files.py +53 -0
- featurebench-0.3.0/codeworld/storage/jsonl.py +248 -0
- featurebench-0.3.0/codeworld/tasks/__init__.py +15 -0
- featurebench-0.3.0/codeworld/tasks/generation.py +72 -0
- featurebench-0.3.0/codeworld/tasks/jsonl.py +111 -0
- featurebench-0.3.0/codeworld/tasks/production.py +707 -0
- {featurebench-0.2.2 → featurebench-0.3.0}/config_example.toml +2 -30
- featurebench-0.3.0/configs/default/adapters/featurebench.yaml +196 -0
- featurebench-0.3.0/configs/default/build.yaml +304 -0
- featurebench-0.3.0/configs/default/discover.yaml +68 -0
- featurebench-0.3.0/configs/default/host.yaml +8 -0
- featurebench-0.3.0/configs/default/sources.yaml +218 -0
- featurebench-0.3.0/docs/build.md +95 -0
- featurebench-0.3.0/docs/config.md +47 -0
- featurebench-0.3.0/docs/configure.md +29 -0
- featurebench-0.3.0/docs/discover.md +62 -0
- featurebench-0.3.0/docs/eval.md +102 -0
- featurebench-0.3.0/docs/generate.md +67 -0
- featurebench-0.3.0/docs/host.md +24 -0
- featurebench-0.2.2/docs/infer_cli_arg.md → featurebench-0.3.0/docs/infer.md +82 -75
- featurebench-0.3.0/docs/pull.md +24 -0
- featurebench-0.3.0/docs/reference/data-organization.md +97 -0
- featurebench-0.3.0/docs/reference/resume.md +52 -0
- featurebench-0.3.0/docs/sources.md +54 -0
- {featurebench-0.2.2 → featurebench-0.3.0}/featurebench/cli.py +28 -21
- featurebench-0.3.0/featurebench/environment_fixes/__init__.py +13 -0
- featurebench-0.3.0/featurebench/environment_fixes/base.py +24 -0
- featurebench-0.3.0/featurebench/environment_fixes/mlflow.py +41 -0
- featurebench-0.3.0/featurebench/environment_fixes/registry.py +43 -0
- {featurebench-0.2.2 → featurebench-0.3.0}/featurebench/harness/constants.py +1 -10
- {featurebench-0.2.2 → featurebench-0.3.0}/featurebench/harness/container.py +0 -1
- {featurebench-0.2.2 → featurebench-0.3.0}/featurebench/harness/report.py +21 -4
- {featurebench-0.2.2 → featurebench-0.3.0}/featurebench/harness/review_codes.py +129 -135
- {featurebench-0.2.2 → featurebench-0.3.0}/featurebench/harness/run_evaluation.py +184 -153
- {featurebench-0.2.2 → featurebench-0.3.0}/featurebench/harness/runtime.py +93 -74
- {featurebench-0.2.2 → featurebench-0.3.0}/featurebench/harness/utils.py +79 -114
- {featurebench-0.2.2 → featurebench-0.3.0}/featurebench/infer/agents/base.py +15 -4
- {featurebench-0.2.2 → featurebench-0.3.0}/featurebench/infer/agents/claude_code.py +0 -1
- {featurebench-0.2.2 → featurebench-0.3.0}/featurebench/infer/agents/gemini_cli.py +11 -13
- {featurebench-0.2.2 → featurebench-0.3.0}/featurebench/infer/agents/mini_swe_agent.py +104 -22
- {featurebench-0.2.2 → featurebench-0.3.0}/featurebench/infer/config.py +116 -111
- {featurebench-0.2.2 → featurebench-0.3.0}/featurebench/infer/container.py +0 -3
- featurebench-0.3.0/featurebench/infer/environments/__init__.py +1 -0
- featurebench-0.3.0/featurebench/infer/environments/mini_swe.py +185 -0
- featurebench-0.3.0/featurebench/infer/models.py +528 -0
- featurebench-0.3.0/featurebench/infer/network.py +473 -0
- featurebench-0.3.0/featurebench/infer/output.py +300 -0
- featurebench-0.3.0/featurebench/infer/proxy_bridge.py +57 -0
- {featurebench-0.2.2 → featurebench-0.3.0}/featurebench/infer/run_infer.py +435 -317
- {featurebench-0.2.2 → featurebench-0.3.0}/featurebench/infer/runtime.py +151 -27
- {featurebench-0.2.2 → featurebench-0.3.0}/featurebench/scripts/cal_eval_outputs.py +4 -4
- {featurebench-0.2.2 → featurebench-0.3.0}/featurebench/scripts/pull_images.py +13 -11
- {featurebench-0.2.2 → featurebench-0.3.0}/featurebench/utils/docker_images.py +0 -10
- featurebench-0.3.0/featurebench/utils/identifiers.py +78 -0
- featurebench-0.3.0/featurebench/utils/runtime_config.py +71 -0
- featurebench-0.3.0/pyproject.toml +101 -0
- featurebench-0.3.0/tests/fixtures/featurebench_trace/pkg.py.txt +2 -0
- featurebench-0.3.0/tests/fixtures/featurebench_trace/test_trace.py.txt +13 -0
- featurebench-0.3.0/tests/fixtures/featurebench_trace/worker.py.txt +5 -0
- featurebench-0.3.0/tests/fixtures/python_repo/.python-version +1 -0
- featurebench-0.3.0/tests/fixtures/python_repo/pyproject.toml +14 -0
- featurebench-0.3.0/tests/fixtures/python_repo/src/featurebench_fixture/__init__.py +3 -0
- featurebench-0.3.0/tests/fixtures/python_repo/src/featurebench_fixture/core.py +12 -0
- featurebench-0.3.0/tests/fixtures/python_repo/tests/test_feature.py +15 -0
- featurebench-0.3.0/tests/fixtures/python_repo/tests/test_stable.py +9 -0
- featurebench-0.3.0/tests/fixtures/smoke_environment/Dockerfile +13 -0
- featurebench-0.3.0/tests/fixtures/smoke_environment/Dockerfile.local +13 -0
- featurebench-0.3.0/tests/fixtures/smoke_environment/activate +3 -0
- featurebench-0.3.0/tests/fixtures/smoke_environment/runner +74 -0
- featurebench-0.3.0/tests/integration/test_agent_environment_build.py +132 -0
- featurebench-0.3.0/tests/integration/test_docker_environment.py +161 -0
- featurebench-0.3.0/tests/integration/test_github_discovery.py +60 -0
- featurebench-0.3.0/tests/test_cli.py +33 -0
- featurebench-0.3.0/tests/test_dataset_version.py +648 -0
- featurebench-0.3.0/tests/test_environment_fixes.py +52 -0
- featurebench-0.2.2/tests/test_eval_data_container_cleanup.py → featurebench-0.3.0/tests/test_eval_container_cleanup.py +3 -82
- featurebench-0.3.0/tests/test_gemini_cli.py +70 -0
- featurebench-0.3.0/tests/test_harness_runtime.py +61 -0
- featurebench-0.3.0/tests/test_harness_utils.py +191 -0
- {featurebench-0.2.2 → featurebench-0.3.0}/tests/test_infer_container_cleanup.py +1 -1
- featurebench-0.3.0/tests/test_infer_network.py +140 -0
- featurebench-0.3.0/tests/test_infer_output.py +135 -0
- featurebench-0.3.0/tests/test_infer_runtime.py +161 -0
- featurebench-0.3.0/tests/test_mini_swe_agent.py +208 -0
- {featurebench-0.2.2 → featurebench-0.3.0}/tests/test_openhands_session_cache.py +2 -2
- {featurebench-0.2.2 → featurebench-0.3.0}/tests/test_pull_images.py +1 -4
- featurebench-0.3.0/tests/test_report_persistence.py +30 -0
- featurebench-0.3.0/tests/test_review_codes.py +147 -0
- featurebench-0.3.0/tests/unit/test_agent_telemetry.py +100 -0
- featurebench-0.3.0/tests/unit/test_application_generate.py +1490 -0
- featurebench-0.3.0/tests/unit/test_build_diagnostics.py +285 -0
- featurebench-0.3.0/tests/unit/test_build_removal.py +163 -0
- featurebench-0.3.0/tests/unit/test_config_and_storage.py +1127 -0
- featurebench-0.3.0/tests/unit/test_config_tui.py +170 -0
- featurebench-0.3.0/tests/unit/test_console_models.py +403 -0
- featurebench-0.3.0/tests/unit/test_container_runtime.py +1011 -0
- featurebench-0.3.0/tests/unit/test_discovery_resume.py +501 -0
- featurebench-0.3.0/tests/unit/test_discovery_targets.py +54 -0
- featurebench-0.3.0/tests/unit/test_display.py +977 -0
- featurebench-0.3.0/tests/unit/test_durable_jsonl.py +121 -0
- featurebench-0.3.0/tests/unit/test_ecosystem_registries.py +334 -0
- featurebench-0.3.0/tests/unit/test_environment_bundle.py +152 -0
- featurebench-0.3.0/tests/unit/test_environment_planning.py +2227 -0
- featurebench-0.3.0/tests/unit/test_environment_production.py +409 -0
- featurebench-0.3.0/tests/unit/test_environment_runner.py +562 -0
- featurebench-0.3.0/tests/unit/test_events.py +66 -0
- featurebench-0.3.0/tests/unit/test_featurebench_core.py +5320 -0
- featurebench-0.3.0/tests/unit/test_featurebench_diagnostics.py +476 -0
- featurebench-0.3.0/tests/unit/test_featurebench_optimization.py +832 -0
- featurebench-0.3.0/tests/unit/test_featurebench_repair.py +1728 -0
- featurebench-0.3.0/tests/unit/test_progress.py +119 -0
- featurebench-0.3.0/tests/unit/test_repository_stager.py +512 -0
- featurebench-0.3.0/tests/unit/test_run_configuration.py +340 -0
- featurebench-0.3.0/tests/unit/test_runner_review.py +50 -0
- featurebench-0.3.0/tests/unit/test_source_adapters.py +899 -0
- featurebench-0.3.0/tests/unit/test_sources.py +826 -0
- featurebench-0.3.0/tests/unit/test_step_store.py +298 -0
- featurebench-0.3.0/tests/unit/test_storage_files.py +38 -0
- featurebench-0.3.0/tests/unit/test_task_contract.py +131 -0
- featurebench-0.3.0/tests/unit/test_work_selection.py +84 -0
- featurebench-0.3.0/uv.lock +3825 -0
- featurebench-0.2.2/README.md +0 -138
- featurebench-0.2.2/docs/config.md +0 -223
- featurebench-0.2.2/docs/harness_cli_arg.md +0 -100
- featurebench-0.2.2/docs/pics/workflow.png +0 -0
- featurebench-0.2.2/docs/pipeline.md +0 -293
- featurebench-0.2.2/featurebench/classification/__init__.py +0 -5
- featurebench-0.2.2/featurebench/classification/code_classifier.py +0 -1450
- featurebench-0.2.2/featurebench/classification/file_analyzer.py +0 -300
- featurebench-0.2.2/featurebench/classification/llm_top_classifier.py +0 -825
- featurebench-0.2.2/featurebench/classification/p2p_chooser.py +0 -628
- featurebench-0.2.2/featurebench/conversion/__init__.py +0 -0
- featurebench-0.2.2/featurebench/conversion/case_converter.py +0 -1189
- featurebench-0.2.2/featurebench/conversion/eval_code.py +0 -169
- featurebench-0.2.2/featurebench/conversion/llm_prompt_generator.py +0 -392
- featurebench-0.2.2/featurebench/conversion/llm_testfile_adjuster.py +0 -436
- featurebench-0.2.2/featurebench/conversion/render_task.py +0 -82
- featurebench-0.2.2/featurebench/docker/__init__.py +0 -5
- featurebench-0.2.2/featurebench/docker/dynamic_tracer.py +0 -687
- featurebench-0.2.2/featurebench/docker/image_manager.py +0 -1275
- featurebench-0.2.2/featurebench/docker/test_runner.py +0 -388
- featurebench-0.2.2/featurebench/docker/test_scanner.py +0 -517
- featurebench-0.2.2/featurebench/infer/models.py +0 -368
- featurebench-0.2.2/featurebench/infer/output.py +0 -369
- featurebench-0.2.2/featurebench/llm/__init__.py +0 -0
- featurebench-0.2.2/featurebench/llm/llm_caller.py +0 -286
- featurebench-0.2.2/featurebench/llm/llm_exceptions.py +0 -31
- featurebench-0.2.2/featurebench/mask/__init__.py +0 -1
- featurebench-0.2.2/featurebench/mask/mask_generator.py +0 -2614
- featurebench-0.2.2/featurebench/mask/mask_validator.py +0 -348
- featurebench-0.2.2/featurebench/mask/signature_extractor.py +0 -423
- featurebench-0.2.2/featurebench/pipeline.py +0 -673
- featurebench-0.2.2/featurebench/post_verify/__init__.py +0 -3
- featurebench-0.2.2/featurebench/post_verify/f2p_validator.py +0 -243
- featurebench-0.2.2/featurebench/post_verify/level2_validator.py +0 -285
- featurebench-0.2.2/featurebench/post_verify/p2p_validator.py +0 -220
- featurebench-0.2.2/featurebench/resources/constants/python_example.py +0 -93
- featurebench-0.2.2/featurebench/resources/dockerfiles/python310.py +0 -98
- featurebench-0.2.2/featurebench/resources/dockerfiles/python310_cu118_torch212.py +0 -99
- featurebench-0.2.2/featurebench/resources/dockerfiles/python310_cu121_torch251.py +0 -98
- featurebench-0.2.2/featurebench/resources/dockerfiles/python310_cu121_torch28.py +0 -98
- featurebench-0.2.2/featurebench/resources/dockerfiles/python311.py +0 -98
- featurebench-0.2.2/featurebench/resources/dockerfiles/python311_cu121_torch28.py +0 -98
- featurebench-0.2.2/featurebench/resources/dockerfiles/python312.py +0 -100
- featurebench-0.2.2/featurebench/resources/dockerfiles/python312_cu121_torch251.py +0 -98
- featurebench-0.2.2/featurebench/resources/dockerfiles/python312_cu121_torch26.py +0 -98
- featurebench-0.2.2/featurebench/resources/dockerfiles/python312_cu121_torch28.py +0 -98
- featurebench-0.2.2/featurebench/resources/dockerfiles/python312_torch251.py +0 -98
- featurebench-0.2.2/featurebench/resources/dockerfiles/python39.py +0 -98
- featurebench-0.2.2/featurebench/resources/scripts/dynamic_script/autograd_backward_patch.py +0 -236
- featurebench-0.2.2/featurebench/resources/scripts/dynamic_script/dynamic_script.py +0 -662
- featurebench-0.2.2/featurebench/resources/scripts/dynamic_script/import_hook_patch.py +0 -281
- featurebench-0.2.2/featurebench/resources/scripts/dynamic_script/joblib_patch.py +0 -77
- featurebench-0.2.2/featurebench/resources/scripts/dynamic_script/sitecustomize.py +0 -237
- featurebench-0.2.2/featurebench/resources/scripts/scanner_script.py +0 -121
- featurebench-0.2.2/featurebench/resources/templates/appendix.md.j2 +0 -17
- featurebench-0.2.2/featurebench/resources/templates/black_links.txt.j2 +0 -6
- featurebench-0.2.2/featurebench/resources/templates/config_template.yaml +0 -132
- featurebench-0.2.2/featurebench/resources/templates/level_2.j2 +0 -78
- featurebench-0.2.2/featurebench/resources/templates/llm_prompt_templates.yaml +0 -107
- featurebench-0.2.2/featurebench/scripts/post_filter_cases.py +0 -592
- featurebench-0.2.2/featurebench/utils/config.py +0 -384
- featurebench-0.2.2/featurebench/utils/logger.py +0 -688
- featurebench-0.2.2/featurebench/utils/parser/__init__.py +0 -0
- featurebench-0.2.2/featurebench/utils/parser/pytest_parser.py +0 -252
- featurebench-0.2.2/featurebench/utils/repo_manager.py +0 -404
- featurebench-0.2.2/featurebench/utils/storage.py +0 -1271
- featurebench-0.2.2/featurebench/utils/utils.py +0 -1247
- featurebench-0.2.2/featurebench/verified/__init__.py +0 -8
- featurebench-0.2.2/featurebench/verified/post_additions.py +0 -382
- featurebench-0.2.2/featurebench/verified/prompts/add_prompt_lv1.txt +0 -72
- featurebench-0.2.2/featurebench/verified/prompts/add_prompt_lv2.txt +0 -69
- featurebench-0.2.2/featurebench/verified/prompts/prompt_template_lv1.txt +0 -119
- featurebench-0.2.2/featurebench/verified/prompts/prompt_template_lv2.txt +0 -107
- featurebench-0.2.2/featurebench/verified/run_verification.py +0 -116
- featurebench-0.2.2/featurebench/verified/runner.py +0 -884
- featurebench-0.2.2/pyproject.toml +0 -43
- featurebench-0.2.2/tests/test_dataset_version.py +0 -212
- featurebench-0.2.2/uv.lock +0 -1990
- {featurebench-0.2.2 → featurebench-0.3.0}/.python-version +0 -0
- {featurebench-0.2.2 → featurebench-0.3.0}/LICENSE +0 -0
- {featurebench-0.2.2 → featurebench-0.3.0}/docs/pics/logo.png +0 -0
- {featurebench-0.2.2 → featurebench-0.3.0}/featurebench/__init__.py +0 -0
- {featurebench-0.2.2 → featurebench-0.3.0}/featurebench/harness/__init__.py +0 -0
- {featurebench-0.2.2 → featurebench-0.3.0}/featurebench/harness/grading.py +0 -0
- {featurebench-0.2.2 → featurebench-0.3.0}/featurebench/harness/test_parsers.py +0 -0
- {featurebench-0.2.2 → featurebench-0.3.0}/featurebench/infer/__init__.py +0 -0
- {featurebench-0.2.2 → featurebench-0.3.0}/featurebench/infer/agents/__init__.py +0 -0
- {featurebench-0.2.2 → featurebench-0.3.0}/featurebench/infer/agents/codex.py +0 -0
- {featurebench-0.2.2 → featurebench-0.3.0}/featurebench/infer/agents/openhands.py +0 -0
- {featurebench-0.2.2 → featurebench-0.3.0}/featurebench/infer/gpu_scheduler.py +0 -0
- {featurebench-0.2.2 → featurebench-0.3.0}/featurebench/infer/render_infer_log.py +0 -0
- {featurebench-0.2.2 → featurebench-0.3.0}/featurebench/resources/constants/fast_images.txt +0 -0
- {featurebench-0.2.2 → featurebench-0.3.0}/featurebench/resources/constants/full_images.txt +0 -0
- {featurebench-0.2.2 → featurebench-0.3.0}/featurebench/resources/constants/lite_images.txt +0 -0
- {featurebench-0.2.2 → featurebench-0.3.0}/featurebench/utils/__init__.py +0 -0
- {featurebench-0.2.2 → featurebench-0.3.0}/featurebench/utils/command_utils.py +0 -0
|
@@ -8,11 +8,7 @@ cases_filter/*
|
|
|
8
8
|
*log/
|
|
9
9
|
*logs/
|
|
10
10
|
featurebench/resources/repos
|
|
11
|
-
featurebench/
|
|
12
|
-
!featurebench/resources/constants/python_example.py
|
|
13
|
-
!featurebench/resources/constants/full_images.txt
|
|
14
|
-
!featurebench/resources/constants/lite_images.txt
|
|
15
|
-
!featurebench/resources/constants/fast_images.txt
|
|
11
|
+
.featurebench/
|
|
16
12
|
config.toml
|
|
17
13
|
tmp/
|
|
18
14
|
runs/
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: featurebench
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: Build reproducible coding environments, generate FeatureBench tasks, and evaluate coding agents.
|
|
5
|
+
License-File: LICENSE
|
|
6
|
+
Requires-Python: >=3.12
|
|
7
|
+
Requires-Dist: datasets>=3.3.3
|
|
8
|
+
Requires-Dist: docker>=5.0.3
|
|
9
|
+
Requires-Dist: genai-prices>=0.0.72
|
|
10
|
+
Requires-Dist: httpx>=0.28.1
|
|
11
|
+
Requires-Dist: huggingface-hub>=0.26.5
|
|
12
|
+
Requires-Dist: jinja2>=3.1.6
|
|
13
|
+
Requires-Dist: ortools>=9.12.0
|
|
14
|
+
Requires-Dist: pandas>=2.2.3
|
|
15
|
+
Requires-Dist: pydantic-ai-harness<0.13,>=0.12.0
|
|
16
|
+
Requires-Dist: pydantic-ai<2.20,>=2.19.0
|
|
17
|
+
Requires-Dist: pydantic>=2.12.0
|
|
18
|
+
Requires-Dist: python-dotenv>=1.1.0
|
|
19
|
+
Requires-Dist: pyyaml>=6.0.3
|
|
20
|
+
Requires-Dist: rich<16,>=15.0.0
|
|
21
|
+
Requires-Dist: textual<9,>=8.0.0
|
|
22
|
+
Requires-Dist: toml>=0.10.2
|
|
23
|
+
Provides-Extra: dev
|
|
24
|
+
Requires-Dist: pyright>=1.1.400; extra == 'dev'
|
|
25
|
+
Requires-Dist: pytest-asyncio>=1.0.0; extra == 'dev'
|
|
26
|
+
Requires-Dist: pytest-cov>=6.2.0; extra == 'dev'
|
|
27
|
+
Requires-Dist: pytest-xdist>=3.8.0; extra == 'dev'
|
|
28
|
+
Requires-Dist: pytest>=8.4.2; extra == 'dev'
|
|
29
|
+
Requires-Dist: ruff>=0.12.0; extra == 'dev'
|
|
30
|
+
Description-Content-Type: text/markdown
|
|
31
|
+
|
|
32
|
+
<p align="center">
|
|
33
|
+
<img src="docs/pics/logo.png" style="height: 10em" alt="logo" />
|
|
34
|
+
</p>
|
|
35
|
+
|
|
36
|
+
<p align="center">
|
|
37
|
+
<a href="https://arxiv.org/abs/2602.10975"><img src="https://img.shields.io/badge/arXiv-2602.10975-b31b1b.svg" alt="arXiv"></a>
|
|
38
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green.svg" alt="License"></a>
|
|
39
|
+
<a href="https://hub.docker.com/u/libercoders"><img src="https://img.shields.io/badge/DockerHub-Images-blue.svg" alt="DockerHub"></a>
|
|
40
|
+
<a href="https://huggingface.co/datasets/LiberCoders/FeatureBench"><img src="https://img.shields.io/badge/HuggingFace-datasets-yellow.svg" alt="HuggingFace"></a>
|
|
41
|
+
<a href="https://libercoders.github.io/FeatureBench/leaderboard/"><img src="https://img.shields.io/badge/Leaderboard-view-purple.svg" alt="Leaderboard"></a>
|
|
42
|
+
</p>
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
FeatureBench combines a feature-level coding benchmark with a fully automated, **Universal Coding
|
|
47
|
+
Data Factory**. With one CLI, it continuously discovers GitHub repositories, builds reproducible
|
|
48
|
+
environments across languages, and generates validated coding tasks for training and evaluation
|
|
49
|
+
through extensible Adapters.
|
|
50
|
+
|
|
51
|
+
## 📰 News
|
|
52
|
+
|
|
53
|
+
🏭 **2026.10.30**: We launched a **Universal Coding Data Factory**—fully automated, language-agnostic, and Adapter-driven—to continuously turn GitHub repositories into validated training data for any coding task format.
|
|
54
|
+
|
|
55
|
+
📈 **2026.10.30**: In internal mixed-task RL experiments using data from our **Universal Coding Data Factory**, Qwen3.8-27B improved SWE-bench Verified Pass@1 from **70.2% to a peak of 79.8%** and FeatureBench 1.1 Tests Passed from **50.3% to a peak of 60.3%**.
|
|
56
|
+
|
|
57
|
+
📦 **2026.08.24**: We released **FeatureBench Dataset V1.1**, primarily correcting inconsistencies and omissions in task problem statements.
|
|
58
|
+
|
|
59
|
+
📊 **2026.05.18**: We added **lite split** evaluation results for frontier models including **GPT-5.5, Claude Opus 4.7, DeepSeek-V4, GLM-5.1, Kimi-2.6, Mimo-V2.5-Pro**, and more to the leaderboard.
|
|
60
|
+
|
|
61
|
+
🚀 **2026.03.27**: We released the **fast split** containing 100 instances (a subset of full split). These instances require no GPU and are optimized for rapid evaluation. On an Intel Xeon Platinum 8457C with 944GB RAM, the average evaluation time per instance using gold patches is **57.2 seconds**.
|
|
62
|
+
|
|
63
|
+
🎁 **2026.02.06**: We added one-click inference for mainstream agent frameworks, including **OpenHands, Claude Code, Codex, Gemini CLI, and mini-swe-agent**. All supported agent frameworks can be found [here](featurebench/infer/agents/).
|
|
64
|
+
|
|
65
|
+
<!-- LEADERBOARD_START -->
|
|
66
|
+
## 🏆 Leaderboard
|
|
67
|
+
|
|
68
|
+
[Full interactive leaderboard](https://libercoders.github.io/FeatureBench/leaderboard/) with tabs, filters, and sorting (Dataset V1.0).
|
|
69
|
+
|
|
70
|
+
<details open>
|
|
71
|
+
<summary><b>Lite split results, ranked by %PASSED</b></summary>
|
|
72
|
+
|
|
73
|
+
| Rank | Model | Scaffold | %PASSED | %RESOLVED |
|
|
74
|
+
|---:|---|---|---:|---:|
|
|
75
|
+
| 1 | Claude Opus 4.7 | OpenHands | 78.2 | 46.7 |
|
|
76
|
+
| 2 | GPT-5.5 | OpenHands | 69.8 | 26.7 |
|
|
77
|
+
| 3 | Claude Opus 4.6 | OpenHands | 69.5 | 20 |
|
|
78
|
+
| 4 | Claude Opus 4.5 | OpenHands | 67.2 | 20 |
|
|
79
|
+
| 5 | GPT-5.4 | OpenHands | 66.2 | 23.3 |
|
|
80
|
+
| 6 | GPT-5.1-Codex | Codex | 60.2 | 20 |
|
|
81
|
+
| 7 | DeepSeek-V4-Pro | OpenHands | 59.6 | 26.7 |
|
|
82
|
+
| 8 | Claude Opus 4.5 | Claude Code | 59.1 | 20 |
|
|
83
|
+
| 9 | Kimi-2.6 | OpenHands | 49.4 | 20 |
|
|
84
|
+
| 10 | Mimo-V2.5-Pro | OpenHands | 47.8 | 13.3 |
|
|
85
|
+
| 11 | Gemini-3-Pro-Preview | OpenHands | 45.1 | 10 |
|
|
86
|
+
| 12 | GLM-5.1 | OpenHands | 44.2 | 13.3 |
|
|
87
|
+
| 13 | Gemini-3-Pro-Preview | Gemini-CLI | 43.4 | 10 |
|
|
88
|
+
| 14 | DeepSeek-V4-Flash | OpenHands | 41.9 | 16.7 |
|
|
89
|
+
| 15 | MiniMax M2.1 | Mini-SWE-Agent | 41.9 | 10 |
|
|
90
|
+
| 16 | GLM 4.7 | Mini-SWE-Agent | 41.2 | 6.7 |
|
|
91
|
+
| 17 | Qwen3-Coder-480B-A35B-Instruct | OpenHands | 38.3 | 6.7 |
|
|
92
|
+
| 18 | DeepSeek V3.2 | OpenHands | 35.9 | 6.7 |
|
|
93
|
+
| 19 | Qwen3.5-27B | OpenHands | 34.8 | 10.0 |
|
|
94
|
+
| 20 | Qwen3-Coder-30B-A3B-Instruct | OpenHands | 23 | 3.3 |
|
|
95
|
+
|
|
96
|
+
</details>
|
|
97
|
+
<!-- LEADERBOARD_END -->
|
|
98
|
+
|
|
99
|
+
## 🚀 Quickstart
|
|
100
|
+
|
|
101
|
+
**Prerequisites:**
|
|
102
|
+
|
|
103
|
+
- Python 3.12 or later
|
|
104
|
+
- [Docker](https://docs.docker.com/engine/install/) for reproducible builds and evaluation
|
|
105
|
+
- [uv](https://docs.astral.sh/uv/getting-started/installation/) when using uv or installing from source
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
# Install from PyPI
|
|
109
|
+
pip install featurebench
|
|
110
|
+
|
|
111
|
+
# Or install the CLI with uv
|
|
112
|
+
uv tool install featurebench
|
|
113
|
+
|
|
114
|
+
# Install from source
|
|
115
|
+
git clone https://github.com/LiberCoders/FeatureBench.git
|
|
116
|
+
cd FeatureBench
|
|
117
|
+
uv sync
|
|
118
|
+
source .venv/bin/activate
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Create `config.toml` from [config_example.toml](config_example.toml). From a source checkout:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
cp config_example.toml config.toml
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Optionally pre-pull the benchmark images:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
fb pull --mode fast
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Run inference:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
fb infer \
|
|
137
|
+
--config-path config.toml \
|
|
138
|
+
--data-version v1.1 \
|
|
139
|
+
--agent mini_swe_agent \
|
|
140
|
+
--model openai/qwen3-coder-480b-a35b-instruct \
|
|
141
|
+
--split fast
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Evaluate the generated patches:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
fb eval \
|
|
148
|
+
-p runs/<timestamp>/output.jsonl \
|
|
149
|
+
--split fast
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## 🏭 Universal Coding Data Factory
|
|
153
|
+
|
|
154
|
+
The factory automatically discovers GitHub repositories, builds reproducible environments, and
|
|
155
|
+
generates validated coding tasks. Adapters define the task format; FeatureBench is included by
|
|
156
|
+
default. This workflow is optional for benchmark users.
|
|
157
|
+
|
|
158
|
+
Put provider credentials in `.env`. From a source checkout:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
cp .env.example .env
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
The default settings work out of the box and can be customized through
|
|
165
|
+
`configs/default/*.yaml` or `--config`.
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
fb discover
|
|
169
|
+
fb build outputs/discover-YYYYMMDD-HHMMSS/repositories.jsonl
|
|
170
|
+
fb generate outputs/build-YYYYMMDD-HHMMSS/environments.jsonl \
|
|
171
|
+
--adapter featurebench
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
## 🧭 CLI
|
|
175
|
+
|
|
176
|
+
**Benchmark:**
|
|
177
|
+
|
|
178
|
+
- `fb infer` runs coding agents on FeatureBench tasks ([Documentation](docs/infer.md)).
|
|
179
|
+
- `fb eval` evaluates generated patches ([Documentation](docs/eval.md)).
|
|
180
|
+
- `fb pull` pre-pulls benchmark Docker images ([Documentation](docs/pull.md)).
|
|
181
|
+
|
|
182
|
+
**Data factory:**
|
|
183
|
+
|
|
184
|
+
- `fb discover` finds candidate GitHub repositories ([Documentation](docs/discover.md)).
|
|
185
|
+
- `fb build` creates reusable, validated environments ([Documentation](docs/build.md)).
|
|
186
|
+
- `fb generate` generates tasks through an Adapter ([Documentation](docs/generate.md)).
|
|
187
|
+
- `fb configure` edits an inactive run before resuming it
|
|
188
|
+
([Documentation](docs/configure.md)).
|
|
189
|
+
- `fb --resume` continues an interrupted run ([Documentation](docs/reference/resume.md)).
|
|
190
|
+
|
|
191
|
+
## ✍️ Citation
|
|
192
|
+
|
|
193
|
+
If you found FeatureBench useful, please cite us as:
|
|
194
|
+
|
|
195
|
+
```bibtex
|
|
196
|
+
@article{zhou2026featurebench,
|
|
197
|
+
title={FeatureBench: Benchmarking Agentic Coding for Complex Feature Development},
|
|
198
|
+
author={Zhou, Qixing and Zhang, Jiacheng and Wang, Haiyang and Hao, Rui and Wang, Jiahe and Han, Minghao and Yang, Yuxue and Wu, Shuzhe and Pan, Feiyang and Fan, Lue and others},
|
|
199
|
+
journal={arXiv preprint arXiv:2602.10975},
|
|
200
|
+
year={2026}
|
|
201
|
+
}
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
## 📧 Contact
|
|
205
|
+
|
|
206
|
+
If you have any questions, feel free to contact [qixing.zhou@smail.nju.edu.cn](mailto:qixing.zhou@smail.nju.edu.cn) or [zjcheng2022@gmail.com](mailto:zjcheng2022@gmail.com).
|
|
@@ -1,27 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.5
|
|
2
|
-
Name: featurebench
|
|
3
|
-
Version: 0.2.2
|
|
4
|
-
Summary: FeatureBench Pipeline - A test-driven data generation pipeline for building and evaluating feature-level coding benchmarks
|
|
5
|
-
License-File: LICENSE
|
|
6
|
-
Requires-Python: >=3.12
|
|
7
|
-
Requires-Dist: datasets>=3.3.3
|
|
8
|
-
Requires-Dist: docker>=5.0.3
|
|
9
|
-
Requires-Dist: filelock>=3.20.0
|
|
10
|
-
Requires-Dist: huggingface-hub>=0.26.5
|
|
11
|
-
Requires-Dist: jinja2>=3.1.6
|
|
12
|
-
Requires-Dist: matplotlib>=3.10.7
|
|
13
|
-
Requires-Dist: openai>=2.6.1
|
|
14
|
-
Requires-Dist: pandas>=2.2.3
|
|
15
|
-
Requires-Dist: pyarrow>=18.1.0
|
|
16
|
-
Requires-Dist: pytest>=8.4.2
|
|
17
|
-
Requires-Dist: pyyaml>=6.0.3
|
|
18
|
-
Requires-Dist: rich>=13.0.0
|
|
19
|
-
Requires-Dist: scipy>=1.16.3
|
|
20
|
-
Requires-Dist: seaborn>=0.13.2
|
|
21
|
-
Requires-Dist: toml>=0.10.2
|
|
22
|
-
Requires-Dist: tqdm>=4.67.1
|
|
23
|
-
Description-Content-Type: text/markdown
|
|
24
|
-
|
|
25
1
|
<p align="center">
|
|
26
2
|
<img src="docs/pics/logo.png" style="height: 10em" alt="logo" />
|
|
27
3
|
</p>
|
|
@@ -36,23 +12,29 @@ Description-Content-Type: text/markdown
|
|
|
36
12
|
|
|
37
13
|
---
|
|
38
14
|
|
|
39
|
-
FeatureBench
|
|
40
|
-
|
|
15
|
+
FeatureBench combines a feature-level coding benchmark with a fully automated, **Universal Coding
|
|
16
|
+
Data Factory**. With one CLI, it continuously discovers GitHub repositories, builds reproducible
|
|
17
|
+
environments across languages, and generates validated coding tasks for training and evaluation
|
|
18
|
+
through extensible Adapters.
|
|
41
19
|
|
|
42
20
|
## 📰 News
|
|
43
21
|
|
|
22
|
+
🏭 **2026.10.30**: We launched a **Universal Coding Data Factory**—fully automated, language-agnostic, and Adapter-driven—to continuously turn GitHub repositories into validated training data for any coding task format.
|
|
23
|
+
|
|
24
|
+
📈 **2026.10.30**: In internal mixed-task RL experiments using data from our **Universal Coding Data Factory**, Qwen3.8-27B improved SWE-bench Verified Pass@1 from **70.2% to a peak of 79.8%** and FeatureBench 1.1 Tests Passed from **50.3% to a peak of 60.3%**.
|
|
25
|
+
|
|
44
26
|
📦 **2026.08.24**: We released **FeatureBench Dataset V1.1**, primarily correcting inconsistencies and omissions in task problem statements.
|
|
45
27
|
|
|
46
28
|
📊 **2026.05.18**: We added **lite split** evaluation results for frontier models including **GPT-5.5, Claude Opus 4.7, DeepSeek-V4, GLM-5.1, Kimi-2.6, Mimo-V2.5-Pro**, and more to the leaderboard.
|
|
47
29
|
|
|
48
30
|
🚀 **2026.03.27**: We released the **fast split** containing 100 instances (a subset of full split). These instances require no GPU and are optimized for rapid evaluation. On an Intel Xeon Platinum 8457C with 944GB RAM, the average evaluation time per instance using gold patches is **57.2 seconds**.
|
|
49
31
|
|
|
50
|
-
🎁 **2026.02.06**: We
|
|
32
|
+
🎁 **2026.02.06**: We added one-click inference for mainstream agent frameworks, including **OpenHands, Claude Code, Codex, Gemini CLI, and mini-swe-agent**. All supported agent frameworks can be found [here](featurebench/infer/agents/).
|
|
51
33
|
|
|
52
34
|
<!-- LEADERBOARD_START -->
|
|
53
35
|
## 🏆 Leaderboard
|
|
54
36
|
|
|
55
|
-
[Full interactive leaderboard](https://libercoders.github.io/FeatureBench/leaderboard/) with tabs, filters, and sorting.
|
|
37
|
+
[Full interactive leaderboard](https://libercoders.github.io/FeatureBench/leaderboard/) with tabs, filters, and sorting (Dataset V1.0).
|
|
56
38
|
|
|
57
39
|
<details open>
|
|
58
40
|
<summary><b>Lite split results, ranked by %PASSED</b></summary>
|
|
@@ -86,40 +68,39 @@ It provides a unified CLI to run inference, evaluation, and dataset generation.
|
|
|
86
68
|
## 🚀 Quickstart
|
|
87
69
|
|
|
88
70
|
**Prerequisites:**
|
|
89
|
-
|
|
90
|
-
-
|
|
71
|
+
|
|
72
|
+
- Python 3.12 or later
|
|
73
|
+
- [Docker](https://docs.docker.com/engine/install/) for reproducible builds and evaluation
|
|
74
|
+
- [uv](https://docs.astral.sh/uv/getting-started/installation/) when using uv or installing from source
|
|
91
75
|
|
|
92
76
|
```bash
|
|
93
|
-
#
|
|
77
|
+
# Install from PyPI
|
|
94
78
|
pip install featurebench
|
|
95
|
-
# or uv add featurebench
|
|
96
79
|
|
|
97
|
-
#
|
|
80
|
+
# Or install the CLI with uv
|
|
81
|
+
uv tool install featurebench
|
|
82
|
+
|
|
83
|
+
# Install from source
|
|
98
84
|
git clone https://github.com/LiberCoders/FeatureBench.git
|
|
99
85
|
cd FeatureBench
|
|
100
86
|
uv sync
|
|
101
87
|
source .venv/bin/activate
|
|
102
88
|
```
|
|
103
89
|
|
|
104
|
-
|
|
90
|
+
Create `config.toml` from [config_example.toml](config_example.toml). From a source checkout:
|
|
91
|
+
|
|
105
92
|
```bash
|
|
106
93
|
cp config_example.toml config.toml
|
|
107
94
|
```
|
|
108
|
-
See [docs/config.md](docs/config.md) for a comprehensive reference (harness, infer, data pipeline) with examples.
|
|
109
95
|
|
|
110
|
-
|
|
96
|
+
Optionally pre-pull the benchmark images:
|
|
97
|
+
|
|
111
98
|
```bash
|
|
112
|
-
fb pull --mode
|
|
113
|
-
fb pull --mode fast # fast split image list (18 images)
|
|
114
|
-
fb pull --mode full # full split image list (24 images)
|
|
115
|
-
fb pull --mode /path/to/images.txt # one image name per line
|
|
116
|
-
|
|
117
|
-
# full list: featurebench/resources/constants/full_images.txt
|
|
118
|
-
# lite list: featurebench/resources/constants/lite_images.txt
|
|
119
|
-
# fast list: featurebench/resources/constants/fast_images.txt
|
|
99
|
+
fb pull --mode fast
|
|
120
100
|
```
|
|
121
101
|
|
|
122
|
-
|
|
102
|
+
Run inference:
|
|
103
|
+
|
|
123
104
|
```bash
|
|
124
105
|
fb infer \
|
|
125
106
|
--config-path config.toml \
|
|
@@ -129,20 +110,52 @@ fb infer \
|
|
|
129
110
|
--split fast
|
|
130
111
|
```
|
|
131
112
|
|
|
132
|
-
|
|
113
|
+
Evaluate the generated patches:
|
|
114
|
+
|
|
133
115
|
```bash
|
|
134
116
|
fb eval \
|
|
135
117
|
-p runs/<timestamp>/output.jsonl \
|
|
136
118
|
--split fast
|
|
137
|
-
# use -p gold to verify the gold patches
|
|
138
119
|
```
|
|
139
120
|
|
|
140
|
-
##
|
|
121
|
+
## 🏭 Universal Coding Data Factory
|
|
122
|
+
|
|
123
|
+
The factory automatically discovers GitHub repositories, builds reproducible environments, and
|
|
124
|
+
generates validated coding tasks. Adapters define the task format; FeatureBench is included by
|
|
125
|
+
default. This workflow is optional for benchmark users.
|
|
126
|
+
|
|
127
|
+
Put provider credentials in `.env`. From a source checkout:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
cp .env.example .env
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
The default settings work out of the box and can be customized through
|
|
134
|
+
`configs/default/*.yaml` or `--config`.
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
fb discover
|
|
138
|
+
fb build outputs/discover-YYYYMMDD-HHMMSS/repositories.jsonl
|
|
139
|
+
fb generate outputs/build-YYYYMMDD-HHMMSS/environments.jsonl \
|
|
140
|
+
--adapter featurebench
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## 🧭 CLI
|
|
144
|
+
|
|
145
|
+
**Benchmark:**
|
|
146
|
+
|
|
147
|
+
- `fb infer` runs coding agents on FeatureBench tasks ([Documentation](docs/infer.md)).
|
|
148
|
+
- `fb eval` evaluates generated patches ([Documentation](docs/eval.md)).
|
|
149
|
+
- `fb pull` pre-pulls benchmark Docker images ([Documentation](docs/pull.md)).
|
|
150
|
+
|
|
151
|
+
**Data factory:**
|
|
141
152
|
|
|
142
|
-
`fb`
|
|
143
|
-
- `fb
|
|
144
|
-
- `fb
|
|
145
|
-
- `fb
|
|
153
|
+
- `fb discover` finds candidate GitHub repositories ([Documentation](docs/discover.md)).
|
|
154
|
+
- `fb build` creates reusable, validated environments ([Documentation](docs/build.md)).
|
|
155
|
+
- `fb generate` generates tasks through an Adapter ([Documentation](docs/generate.md)).
|
|
156
|
+
- `fb configure` edits an inactive run before resuming it
|
|
157
|
+
([Documentation](docs/configure.md)).
|
|
158
|
+
- `fb --resume` continues an interrupted run ([Documentation](docs/reference/resume.md)).
|
|
146
159
|
|
|
147
160
|
## ✍️ Citation
|
|
148
161
|
|
|
@@ -159,4 +172,4 @@ If you found FeatureBench useful, please cite us as:
|
|
|
159
172
|
|
|
160
173
|
## 📧 Contact
|
|
161
174
|
|
|
162
|
-
If you have any questions, feel free to contact [
|
|
175
|
+
If you have any questions, feel free to contact [qixing.zhou@smail.nju.edu.cn](mailto:qixing.zhou@smail.nju.edu.cn) or [zjcheng2022@gmail.com](mailto:zjcheng2022@gmail.com).
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"""Generic environment and task-generation engine embedded in FeatureBench."""
|
|
2
|
+
|
|
3
|
+
from codeworld.adapters.base import (
|
|
4
|
+
AdapterDefinition,
|
|
5
|
+
AdapterGenerator,
|
|
6
|
+
AdapterLifecycle,
|
|
7
|
+
GeneratorContext,
|
|
8
|
+
QualityGateResult,
|
|
9
|
+
TaskQualityGate,
|
|
10
|
+
)
|
|
11
|
+
from codeworld.adapters.catalog import (
|
|
12
|
+
AdapterCatalog,
|
|
13
|
+
AdapterInvocation,
|
|
14
|
+
AdapterRegistration,
|
|
15
|
+
default_adapter_catalog,
|
|
16
|
+
)
|
|
17
|
+
from codeworld.models import TaskRecord
|
|
18
|
+
|
|
19
|
+
__all__ = [
|
|
20
|
+
"AdapterCatalog",
|
|
21
|
+
"AdapterDefinition",
|
|
22
|
+
"AdapterGenerator",
|
|
23
|
+
"AdapterInvocation",
|
|
24
|
+
"AdapterLifecycle",
|
|
25
|
+
"AdapterRegistration",
|
|
26
|
+
"GeneratorContext",
|
|
27
|
+
"QualityGateResult",
|
|
28
|
+
"TaskQualityGate",
|
|
29
|
+
"TaskRecord",
|
|
30
|
+
"default_adapter_catalog",
|
|
31
|
+
]
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"""Adapter SDK and built-in adapters."""
|
|
2
|
+
|
|
3
|
+
from codeworld.adapters.base import (
|
|
4
|
+
AdapterDefinition,
|
|
5
|
+
AdapterGenerator,
|
|
6
|
+
AdapterLifecycle,
|
|
7
|
+
AdapterSettings,
|
|
8
|
+
GeneratorContext,
|
|
9
|
+
QualityGateResult,
|
|
10
|
+
TaskQualityGate,
|
|
11
|
+
)
|
|
12
|
+
from codeworld.adapters.catalog import (
|
|
13
|
+
AdapterCatalog,
|
|
14
|
+
AdapterInvocation,
|
|
15
|
+
AdapterRegistration,
|
|
16
|
+
default_adapter_catalog,
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
__all__ = [
|
|
20
|
+
"AdapterCatalog",
|
|
21
|
+
"AdapterDefinition",
|
|
22
|
+
"AdapterGenerator",
|
|
23
|
+
"AdapterInvocation",
|
|
24
|
+
"AdapterLifecycle",
|
|
25
|
+
"AdapterRegistration",
|
|
26
|
+
"AdapterSettings",
|
|
27
|
+
"GeneratorContext",
|
|
28
|
+
"QualityGateResult",
|
|
29
|
+
"TaskQualityGate",
|
|
30
|
+
"default_adapter_catalog",
|
|
31
|
+
]
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"""Adapter data-production contracts and runtime composition."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from collections.abc import AsyncGenerator, Mapping
|
|
6
|
+
from dataclasses import dataclass, field
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
from typing import TYPE_CHECKING, Protocol, runtime_checkable
|
|
9
|
+
|
|
10
|
+
from pydantic import BaseModel, Field
|
|
11
|
+
|
|
12
|
+
from codeworld.models import StrictModel, TaskRecord
|
|
13
|
+
from codeworld.selection import WorkSelection
|
|
14
|
+
|
|
15
|
+
if TYPE_CHECKING:
|
|
16
|
+
from codeworld.environment.models import EnvironmentRecord
|
|
17
|
+
from codeworld.events import EventSink
|
|
18
|
+
from codeworld.progress import AdapterPhase, AdapterProgressReporter
|
|
19
|
+
from codeworld.runtime.base import ContainerRuntimeProtocol
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class AdapterSettings(StrictModel):
|
|
23
|
+
"""Execution controls shared by every Adapter-owned YAML schema."""
|
|
24
|
+
|
|
25
|
+
environment_concurrency: int = Field(default=4, ge=1, le=32)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
@dataclass(frozen=True, slots=True)
|
|
29
|
+
class GeneratorContext:
|
|
30
|
+
"""Host services and output-driven selection for one Adapter invocation."""
|
|
31
|
+
|
|
32
|
+
runtime: ContainerRuntimeProtocol
|
|
33
|
+
events: EventSink
|
|
34
|
+
progress: AdapterProgressReporter
|
|
35
|
+
work_dir: Path
|
|
36
|
+
run_id: str
|
|
37
|
+
selection: WorkSelection
|
|
38
|
+
output_dir: Path | None = None
|
|
39
|
+
completed_task_ids: frozenset[str] = frozenset()
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
@runtime_checkable
|
|
43
|
+
class AdapterGenerator(Protocol):
|
|
44
|
+
"""Produce canonical task candidates from one validated environment."""
|
|
45
|
+
|
|
46
|
+
def generate(
|
|
47
|
+
self, environment: EnvironmentRecord, context: GeneratorContext
|
|
48
|
+
) -> AsyncGenerator[TaskRecord, None]:
|
|
49
|
+
"""Generate only Adapter work whose durable state matches ``context.selection``."""
|
|
50
|
+
...
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
@dataclass(frozen=True, slots=True)
|
|
54
|
+
class QualityGateResult:
|
|
55
|
+
"""Transient outcome consumed before a candidate may enter task JSONL."""
|
|
56
|
+
|
|
57
|
+
passed: bool
|
|
58
|
+
message: str = ""
|
|
59
|
+
metrics: Mapping[str, int | float | bool | str] = field(
|
|
60
|
+
default_factory=dict[str, int | float | bool | str]
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
@runtime_checkable
|
|
65
|
+
class TaskQualityGate(Protocol):
|
|
66
|
+
"""Apply Adapter-owned quality semantics without prescribing a Gold representation."""
|
|
67
|
+
|
|
68
|
+
async def check(
|
|
69
|
+
self,
|
|
70
|
+
task: TaskRecord,
|
|
71
|
+
payload: BaseModel,
|
|
72
|
+
context: GeneratorContext,
|
|
73
|
+
) -> QualityGateResult:
|
|
74
|
+
"""Return an expected rejection; raise when the candidate could not be checked."""
|
|
75
|
+
...
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
@runtime_checkable
|
|
79
|
+
class AdapterLifecycle(Protocol):
|
|
80
|
+
"""Optional Adapter-owned durable lifecycle behind the shared Generate workflow."""
|
|
81
|
+
|
|
82
|
+
async def run_started(
|
|
83
|
+
self,
|
|
84
|
+
environment: EnvironmentRecord,
|
|
85
|
+
context: GeneratorContext,
|
|
86
|
+
) -> None: ...
|
|
87
|
+
|
|
88
|
+
async def candidate_checked(
|
|
89
|
+
self,
|
|
90
|
+
task: TaskRecord,
|
|
91
|
+
result: QualityGateResult,
|
|
92
|
+
context: GeneratorContext,
|
|
93
|
+
) -> None: ...
|
|
94
|
+
|
|
95
|
+
async def candidate_failed(
|
|
96
|
+
self,
|
|
97
|
+
task: TaskRecord,
|
|
98
|
+
error: BaseException,
|
|
99
|
+
context: GeneratorContext,
|
|
100
|
+
) -> None: ...
|
|
101
|
+
|
|
102
|
+
async def run_finished(
|
|
103
|
+
self,
|
|
104
|
+
context: GeneratorContext,
|
|
105
|
+
error: BaseException | None,
|
|
106
|
+
) -> None: ...
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
@dataclass(frozen=True, slots=True)
|
|
110
|
+
class AdapterDefinition:
|
|
111
|
+
"""Runtime manifest for one registered data-producing Adapter."""
|
|
112
|
+
|
|
113
|
+
type: str
|
|
114
|
+
payload_model: type[BaseModel]
|
|
115
|
+
generator: AdapterGenerator
|
|
116
|
+
quality_gate: TaskQualityGate
|
|
117
|
+
quality_gate_concurrency: int = 1
|
|
118
|
+
maximum_tasks: int | None = None
|
|
119
|
+
display_name: str | None = None
|
|
120
|
+
progress_phases: tuple[AdapterPhase, ...] = ()
|
|
121
|
+
lifecycle: AdapterLifecycle | None = None
|
|
122
|
+
|
|
123
|
+
def __post_init__(self) -> None:
|
|
124
|
+
if not self.type or self.type != self.type.strip():
|
|
125
|
+
raise ValueError("adapter type must be non-empty without surrounding whitespace")
|
|
126
|
+
if self.maximum_tasks is not None and self.maximum_tasks < 1:
|
|
127
|
+
raise ValueError("adapter maximum tasks must be positive")
|
|
128
|
+
if self.quality_gate_concurrency < 1:
|
|
129
|
+
raise ValueError("adapter quality gate concurrency must be positive")
|
|
130
|
+
if self.display_name is not None and (
|
|
131
|
+
not self.display_name or self.display_name != self.display_name.strip()
|
|
132
|
+
):
|
|
133
|
+
raise ValueError(
|
|
134
|
+
"adapter display name must be non-empty without surrounding whitespace"
|
|
135
|
+
)
|
|
136
|
+
phase_ids = [phase.id for phase in self.progress_phases]
|
|
137
|
+
if len(phase_ids) != len(set(phase_ids)):
|
|
138
|
+
raise ValueError("adapter progress phase IDs must be unique")
|
|
139
|
+
|
|
140
|
+
def validate_task(self, task: TaskRecord) -> BaseModel:
|
|
141
|
+
payload = self.payload_model.model_validate(task.adapter)
|
|
142
|
+
if getattr(payload, "type", None) != self.type:
|
|
143
|
+
raise ValueError(f"adapter payload type does not match definition {self.type!r}")
|
|
144
|
+
return payload
|