Repository navigation
Conversation
…e adapter Hill-climb never calls cap-evolve's helper lint or import smoke test; only agent-optimize's pregate does. When CAPEVOLVE_HELPERS_SPEC points at a run's capevolve.yaml, the adapter now runs lint_candidate and run_smoke once per distinct helper tree (content hash), before any LLM call, so every optimizer that shares this rollout layer gets the identical check. A failing candidate returns error_kind=candidate on every rollout (scored 0 under errored_trial_policy=fail); the harness still debits its evaluation. Unset (the default), the adapter behaves exactly as before. Used by the issue skillberry-ai#895 comparison, where nine non-CapEvolve optimizers share this adapter. Signed-off-by: Boaz Carmeli <boazc@il.ibm.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
❌ Automatic Labeling Failed An error occurred while trying to automatically label this pull request. Please check the workflow logs for details and add labels manually. |
CI does not install litellm, so importing it failed the test with ModuleNotFoundError. Use a fake litellm module in sys.modules whose completion fails the test, as test_spreadsheetbench_helper_staging already does. The gate returns before litellm is imported, so the test still proves no LLM call is made. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Boaz Carmeli <boazc@il.ibm.com>
SummaryAdds an opt-in "common pre-rollout helper gate" to Verification performed
Confirmed issues1. The gate is dead unless 2. The "fails loudly on a broken config" contract is broken by 3. Parent/seed baseline is not passed to 4. No test for the broken-config path, which is exactly the "fails loudly" guarantee that issue #2 shows is not held. 5. Minor: the Other observations (no action required)
Merge recommendationDo not merge as-is. The test suite is solid and the off-by-default contract holds, but two of the findings go to the heart of what the PR claims to deliver:
Recommend: fix |
Summary
Adds an optional common pre-rollout helper gate to the SpreadsheetBench adapter. Off by default; behaviour is unchanged unless
CAPEVOLVE_HELPERS_SPECis set.Hill-climb never runs cap-evolve's helper checks (the static
lint_candidateand therun_smokeimport test); only agent-optimize's pregate does. Other optimizers that share this adapter's rollout layer get no check at all. WhenCAPEVOLVE_HELPERS_SPECpoints at a run'scapevolve.yaml, the adapter now runs both checks itself, so every optimizer using the adapter is held to the same rule.How it works
Adapter.run_target, right after the existing task-template check.skills/*/scripts/*.py, so a candidate's many rollouts pay for one check.lint_candidate(task ids, answer literals, branching on task identity, network use) andrun_smoke(each script imports cleanly in a subprocess that cannot readdeny_roots). Smoke only runs if lint passes.error_kind=candidatewith aCANDIDATE_HELPER_GATE: ...message listing the findings. That scores 0 undererrored_trial_policy: fail, and the harness still debits the evaluation.Why
Used in the issue #895 comparison, where nine non-CapEvolve optimizers run through this adapter. Without it, only CapEvolve's agent-optimize path would have its helper scripts checked. Results are on the
spreadsheet-historybranch.Testing
core/tests/test_spreadsheetbench_helper_gate.py(new, 7 tests): off when the env var is unset; a clean helper passes; a candidate with no scripts passes; a task-id literal is refused by lint; an import crash is refused by the smoke test; the verdict is cached per tree;run_targetreturns a candidate fault without an LLM call. The broken-spec path (it raises) is not covered by a test.test_spreadsheetbench*.pyandtest_helper*.py: 373 passed, 6 skipped, 1 failed.test_spreadsheetbench_recalc_parallel.py::test_headless_and_no_leftover_profile_dirs, also fails on plainmainon the same host. Three stale/tmp/capevolve_sb_libre_*dirs from earlier runs were already on that host, and the test asserts none exist. It is unrelated to this change.🤖 Generated with Claude Code