Skip to content

feat: add TelecomBackup benchmark — power-backup scheduling for telecom sites (PowerSystems) - #105

Open
zzy2007zzy2007 wants to merge 4 commits into
Einsia:mainfrom
zzy2007zzy2007:feat/PowerSystems/TelecomBackup
Open

zzy2007zzy2007 wants to merge 4 commits into
Einsia:mainfrom
zzy2007zzy2007:feat/PowerSystems/TelecomBackup

Conversation

@zzy2007zzy2007

@zzy2007zzy2007 zzy2007zzy2007 commented Aug 19, 2026

Copy link
Copy Markdown

Summary

Adds TelecomBackup, an original PowerSystems benchmark: time-sequenced on/off
scheduling of telecom backup power supplies to maximize outage backup time while
keeping good LTE coverage (RSRP > -105 dBm) over >= 80% of the region at every instant.

Contents

  • baseline/solver.py - always-on template; the EVOLVE-BLOCK region is the only part
    an agent may edit.
  • verification/ - pure-stdlib simulator (coverage / power / battery), fixed-seed
    instance generator, reference heuristic (multi-rest rotation), a 44-test suite, and the
    evaluation entry point.
  • frontier_eval/ - UnifiedTask metadata; Docker support
    (verification/docker/Dockerfile), validated under WSL.
  • Registration in TASK_DETAILS.md / TASK_DETAILS_zh-CN.md and in the PowerSystems
    domain READMEs.

Evaluation modes

Mode Instance pool Used by
local (default) the 8 committed fixed instances development / smoke tests
official (TELECOM_EVAL_MODE=official) freshly generated instances only the unified framework path

In official mode a generation seed (TELECOM_EVAL_GENERATE_SEED) is mandatory and the
committed instances are never scored, so a memorised schedule buys nothing; a missing seed
is a hard error instead of a silent fall-back to the public instances.

Reference scores (deepseek-v4-flash agents; saved programs re-evaluated from the task directory)

  • baseline (always-on): 176.2 min
  • reference heuristic (verification/ref_solver.py): 271.2 min (+54%)
  • openevolve (25 iterations): 414.4 min; ShinkaEvolve (15 generations): 312.5 min;
    AB-MCTS (15 iterations): 266.9 min
  • multi-run statistics (3 runs per framework): openevolve 356.7 +/- 47.5,
    ShinkaEvolve 331.9 +/- 18.9, AB-MCTS 234.4 +/- 24.2

Reproducing the reference score

python verification/evaluate.py verification/ref_solver.py --reference --local   # -> 271.25

(--reference skips the candidate integrity checks so the bundled reference solver can be
scored; it is off by default and the framework path never sets it.)

Review response

This revision addresses the maintainer's review:
1. (blocker) the official evaluation path now enforces runtime generation and fails loudly
when the seed is missing, instead of silently scoring the public instances;
2. (blocker) the documented reference-score reproduction path;
3. the per-instance budget self-limits to the framework timeout, and the 300/60/10 s tiers
are wired through TELECOM_EVAL_TIME_BUDGET instead of a hard-coded 60 s;
4. TASK_DETAILS.md registration; corrected the +54% / +57.5% figures and added a
provenance note; Task.md translated to English.

Tests: 44 passing.

@github-actions

Copy link
Copy Markdown

🤖 AI Code Review (gemini-3-flash-preview)

🇬🇧 English Analysis

1. Executive Summary

  • Core Purpose: This PR introduces a new engineering benchmark task named TelecomBackup under the PowerSystems category. It also updates the global task registry to include a VehicleRouting (CVRP) entry. The TelecomBackup task involves time-sequenced scheduling of telecom power supplies to maximize backup time during outages while maintaining a minimum LTE coverage threshold.
  • Modified File Structure & Modifications:
    • TASK_DETAILS.md & TASK_DETAILS_zh-CN.md: Registered VehicleRouting/CVRP and updated the task list.
    • benchmarks/PowerSystems/README.md & README_zh-CN.md: Added entry for TelecomBackup with quick-run commands.
    • benchmarks/PowerSystems/TelecomBackup/: Created a complete benchmark suite including:
      • baseline/solver.py: A template solver with EVOLVE-BLOCK markers for agents.
      • verification/: Contains the core simulation logic (simulator.py), instance generator (generator.py), and a comprehensive test suite (test_*.py).
      • frontier_eval/: Framework integration files (metadata, evaluator entry points).
      • Task.md & README.md: Detailed technical specifications and scoring rules in English and Chinese.

2. AI Content Analysis

  • Estimated AI Component: 25%
  • Reasoning & Evidence:
    • Boilerplate Framework Code: Files like frontier_eval/run_eval.py and frontier_eval/evaluator.py follow a highly standardized pattern seen in other tasks within this repository, likely generated or adapted via AI using existing templates.
    • Documentation: The READMEs are exceptionally well-structured and detailed. While the technical content is domain-specific, the formatting and "Notes" sections exhibit the exhaustive and polite tone typical of AI-assisted technical writing.
    • Domain Logic: The core simulation logic (RSRP calculations, battery depletion, load migration) appears to be human-engineered or heavily guided, as it requires specific domain knowledge of telecom infrastructure that generic AI models often struggle to synthesize without precise prompts.

3. Engineering & Economic Assessment

  • Engineering Reality Check: Production-Grade. This is not a "toy example." It addresses a non-trivial optimization problem involving:
    • Complex Constraints: LTE coverage (RSRP > -105 dBm) and battery capacity.
    • Dynamic Load Migration: Closing one site increases the load on neighbors, a realistic physical phenomenon.
    • Anti-Cheating Mechanisms: Includes runtime-generated instances and environment stripping to prevent hardcoding solutions.
  • Economic Value: High. Energy efficiency and service reliability are critical OPEX (Operating Expense) drivers for telecom operators. Algorithms that extend backup time by 50-100% (as shown in the reference scores) have direct commercial value in disaster recovery and grid stability scenarios.

4. Quality Assurance

  • Verification & Testing:
    • frontier_eval Integration: Yes.
    • task_name: PowerSystems/TelecomBackup
    • Execution & Dependencies: The README.md provides explicit commands for both local execution and Docker-based isolation. It correctly identifies the need for PYTHONUTF8=1 on Windows to avoid encoding issues.
  • Documentation Quality: Excellent. The documentation includes a clear "Threat Model," scoring breakdown, and reference benchmarks for different LLM agents (OpenEvolve, AB-MCTS, etc.). No significant grammatical errors were detected.
  • Organizational Structure: Logical and Scalable. The separation of baseline, verification, and frontier_eval follows the established repository standard, making it easy for new developers to navigate.

5. Security & Privacy Check

  • Sensitive Files: Clean. The .gitignore correctly excludes __pycache__ and *.pyc. No .env or API keys were found.
  • Absolute Paths: None detected. The code uses Path(__file__).resolve() and relative pathing for file discovery.

🇨🇳 中文分析

1. 摘要

  • 核心目的: 此 PR 在 PowerSystems 类别下引入了一个名为 TelecomBackup(电信备电调度)的新工程基准任务。同时更新了全局任务注册表,增加了 VehicleRouting (CVRP) 条目。TelecomBackup 任务要求对电信电源进行时序开关调度,以在保持最低 LTE 覆盖阈值的前提下,最大化停电期间的区域总备电时长。
  • 修改的文件结构与变更摘要:
    • TASK_DETAILS.md & TASK_DETAILS_zh-CN.md: 注册了 VehicleRouting/CVRP 并更新了任务列表。
    • benchmarks/PowerSystems/README.md & README_zh-CN.md: 增加了 TelecomBackup 的条目及快速运行命令。
    • benchmarks/PowerSystems/TelecomBackup/: 创建了完整的基准测试套件,包括:
      • baseline/solver.py: 带有 EVOLVE-BLOCK 标记的求解器模板,供 Agent 修改。
      • verification/: 包含核心仿真逻辑 (simulator.py)、实例生成器 (generator.py) 和全面的测试套件 (test_*.py)。
      • frontier_eval/: 框架集成文件(元数据、评测入口)。
      • Task.md & README.md: 中英文双语的详细技术规范和评分规则。

2. AI 成分分析

  • 预估 AI 含量: 25%
  • 判断依据与证据:
    • 模板化框架代码: 如 frontier_eval/run_eval.pyfrontier_eval/evaluator.py 遵循了该仓库中其他任务的高度标准化模式,很可能是通过 AI 利用现有模板生成或改编的。
    • 文档编写: README 文档结构极其严整且详细。虽然技术内容具有领域特定性,但其格式和“Notes”部分的详尽程度表现出典型的 AI 辅助技术写作风格。
    • 领域逻辑: 核心仿真逻辑(RSRP 计算、电池耗尽、负载迁移)看起来是人工设计或深度引导的,因为这需要电信基础设施的特定领域知识,通用 AI 模型在没有精确提示的情况下很难合成此类逻辑。

3. 工程与经济评估

  • 工程现实检验: 生产级。这并非“玩具示例”。它解决了一个非平凡的优化问题,涉及:
    • 复杂约束: LTE 覆盖范围 (RSRP > -105 dBm) 和电池容量。
    • 动态负载迁移: 关闭一个站点会增加邻近站点的负载,这反映了真实的物理现象。
    • 防作弊机制: 包含运行时生成实例和环境变量剥离,以防止硬编码解法。
  • 经济价值: 。能源效率和业务可靠性是电信运营商的关键运营成本 (OPEX) 驱动因素。能够将备电时长延长 50-100% 的算法(如参考分数所示)在灾难恢复和电网稳定性场景中具有直接的商业价值。

4. 质量保证

  • 验证与测试:
    • frontier_eval 集成: 是。
    • task_name: PowerSystems/TelecomBackup
    • 运行与依赖: README.md 提供了本地运行和基于 Docker 隔离运行的明确命令。正确指出了在 Windows 上需要设置 PYTHONUTF8=1 以避免编码问题。
  • 文档质量: 优秀。文档包含清晰的“威胁模型”、评分细则以及不同 LLM Agent(OpenEvolve, AB-MCTS 等)的基准参考分数。未发现明显的语法错误。
  • 组织结构: 逻辑清晰且具备可扩展性baselineverificationfrontier_eval 的分离遵循了既定的仓库标准,便于新开发者理解。

5. 安全与隐私检查

  • 敏感文件: 未发现异常.gitignore 正确排除了 __pycache__*.pyc。未发现 .env 或 API 密钥。
  • 绝对路径: 未检测到。代码使用 Path(__file__).resolve() 和相对路径进行文件定位。

…om sites (PowerSystems)

Time-sequenced on/off scheduling of telecom backup power supplies to
maximize outage backup time while keeping LTE coverage >= 80%. Includes
8 fixed instances plus runtime generation (TELECOM_EVAL_GENERATE_SEED),
a multi-rest rotation reference heuristic, cross-size determinism probes,
and dockerized verification.

Co-Authored-By: deepseek-v4-flash <deepseek-ai@claude-code-best.win>
@zzy2007zzy2007
zzy2007zzy2007 force-pushed the feat/PowerSystems/TelecomBackup branch from 7975f28 to 843389d Compare August 19, 2026 16:24
@github-actions

Copy link
Copy Markdown

🤖 AI Code Review (gemini-3-flash-preview)

🇬🇧 English Analysis

1. Executive Summary

  • Core Purpose: This PR introduces a new benchmark named TelecomBackup under the PowerSystems category. The task involves time-sequenced scheduling of telecom power supplies to maximize backup duration during outages while maintaining a minimum LTE coverage constraint (RSRP > -105 dBm for at least 80% of the area).
  • Modified File Structure & Modifications:
    • benchmarks/PowerSystems/README.md & README_zh-CN.md: Added entries for the new TelecomBackup task, including quick-run commands and descriptions.
    • benchmarks/PowerSystems/TelecomBackup/README.md: Comprehensive documentation covering layout, requirements, Docker usage, and anti-hardcoding measures.
    • benchmarks/PowerSystems/TelecomBackup/Task.md: Detailed technical specifications, scoring rules, and reference performance metrics in Chinese.
    • benchmarks/PowerSystems/TelecomBackup/baseline/solver.py: A template solver implementing a naive "always-on" strategy, providing the EVOLVE-BLOCK for agents to modify.
    • benchmarks/PowerSystems/TelecomBackup/verification/: A robust verification suite including a simulator (simulator.py), instance generator (generator.py), evaluator (evaluate.py), and integrity validator (validator.py).
    • benchmarks/PowerSystems/TelecomBackup/frontier_eval/: Metadata and scripts (e.g., evaluator.py, run_eval.py) required for integration with the frontier_eval framework.

2. AI Content Analysis

  • Estimated AI Component: 15-20%
  • Reasoning & Evidence: The overall architecture and boilerplate (especially in frontier_eval/run_eval.py and evaluator.py) follow standard patterns likely assisted by AI. However, the core domain logic—specifically the RSRP coverage calculations, battery depletion models in simulator.py, and the highly specific calibration of power parameters (p_silent, p_work_base)—exhibits deep domain expertise. The inclusion of result_log.txt with specific run IDs and performance deltas (+135% for specific agents) indicates significant human-led empirical testing and validation that goes beyond generic AI generation.

3. Engineering & Economic Assessment

  • Engineering Reality Check: This is a high-quality, production-grade engineering problem. It moves beyond "toy" examples by incorporating:
    • Realistic Constraints: Signal propagation (path loss models), battery discharge curves, and load migration.
    • Anti-Cheating Mechanisms: Runtime instance generation via TELECOM_EVAL_GENERATE_SEED and environment variable stripping to prevent hardcoding.
    • Edge Case Handling: The simulator accounts for battery exhaustion and coverage drops, penalizing invalid schedules with zero scores.
  • Economic Value: High. Telecom energy management is a critical operational cost. The benchmark demonstrates that optimized scheduling can improve backup time by over 100% compared to naive strategies, which translates directly to improved network resilience and reduced operational risk during power grid failures.

4. Quality Assurance

  • Verification & Testing:
    • frontier_eval Integration: Yes.
    • task_name: PowerSystems/TelecomBackup
    • Execution & Dependencies: The README.md clearly documents the execution commands for both local and Docker environments. It specifies Python >= 3.10 and confirms the use of the standard library to minimize dependency hell.
  • Documentation Quality: Excellent. The documentation is dual-language, provides clear scoring tiers (Base, Advanced, Challenge), and includes a detailed "Integrity / threat model" section. No significant grammatical errors or formatting inconsistencies were detected in the provided diff.
  • Organizational Structure: The structure is logical and modular. Separating verification logic from baseline code and frontier_eval metadata ensures scalability and ease of maintenance.

5. Security & Privacy Check

  • Sensitive Files: Clean. The .gitignore correctly excludes __pycache__ and *.pyc. No .env files or API keys were found.
  • Absolute Paths: None detected. The code uses Path(__file__).resolve() and relative path joining, ensuring portability across different environments.

🇨🇳 中文分析

1. 摘要

  • 核心目的: 此 PR 在 PowerSystems 类别下引入了一个名为 TelecomBackup 的新基准测试。该任务涉及电信电源的时序调度,旨在停电期间最大化备电时长,同时满足最低 LTE 覆盖约束(至少 80% 的区域 RSRP > -105 dBm)。
  • 修改的文件结构与变更摘要:
    • benchmarks/PowerSystems/README.md & README_zh-CN.md: 增加了 TelecomBackup 任务的条目,包括快速运行命令和任务简介。
    • benchmarks/PowerSystems/TelecomBackup/README.md: 详尽的文档,涵盖布局、需求、Docker 使用以及防硬编码措施。
    • benchmarks/PowerSystems/TelecomBackup/Task.md: 详细的技术规范、评分规则和参考性能指标(中文)。
    • benchmarks/PowerSystems/TelecomBackup/baseline/solver.py: 模板求解器,实现了朴素的“全程开启”策略,并为 Agent 提供了可修改的 EVOLVE-BLOCK 区域。
    • benchmarks/PowerSystems/TelecomBackup/verification/: 健壮的验证套件,包括模拟器 (simulator.py)、实例生成器 (generator.py)、评估器 (evaluate.py) 和完整性校验器 (validator.py)。
    • benchmarks/PowerSystems/TelecomBackup/frontier_eval/: 与 frontier_eval 框架集成所需的元数据和脚本(如 evaluator.py, run_eval.py)。

2. AI 成分分析

  • 预估 AI 含量: 15-20%
  • 判断依据与证据: 整体架构和模板代码(特别是 frontier_eval/run_eval.pyevaluator.py)遵循了可能由 AI 辅助的标准模式。然而,核心领域逻辑——特别是 simulator.py 中的 RSRP 覆盖计算、电池耗尽模型,以及功耗参数(p_silent, p_work_base)的高度特定校准——展示了深厚的领域专业知识。result_log.txt 中包含的具体运行 ID 和性能增量(特定 Agent 提升 +135%)表明了大量由人工主导的实证测试和验证,超出了通用 AI 生成的范畴。

3. 工程与经济评估

  • 工程现实检验: 这是一个高质量、生产级别的工程问题。它通过以下方式超越了“玩具级”示例:
    • 现实约束: 引入了信号传播(路径损耗模型)、电池放电曲线和负载迁移。
    • 防作弊机制: 通过 TELECOM_EVAL_GENERATE_SEED 进行运行时实例生成,并剥离环境变量以防止硬编码。
    • 边缘情况处理: 模拟器考虑了电池耗尽和覆盖率下降,对无效调度给予零分处罚。
  • 经济价值: 。电信能源管理是一项关键的运营成本。该基准测试表明,与朴素策略相比,优化调度可以将备电时间提高 100% 以上,这直接转化为电网故障期间网络韧性的增强和运营风险的降低。

4. Quality Assurance

  • 验证与测试:
    • frontier_eval 集成: 是
    • task_name: PowerSystems/TelecomBackup
    • 运行与依赖: README.md 清晰地记录了本地和 Docker 环境的运行命令。它指定了 Python >= 3.10 并确认使用标准库以减少依赖冲突。
  • 文档质量: 优秀。文档采用双语编写,提供了清晰的评分分级(基础、高级、挑战),并包含详细的“完整性/威胁模型”章节。在提供的 diff 中未检测到明显的语法错误或格式不一致。
  • 组织结构: 结构逻辑清晰且模块化。将 verification 逻辑与 baseline 代码和 frontier_eval 元数据分离,确保了可扩展性和维护性。

5. 安全与隐私检查

  • 敏感文件: 未发现异常.gitignore 正确排除了 __pycache__*.pyc。未发现 .env 文件或 API 密钥。
  • 绝对路径: 未检测到。代码使用 Path(__file__).resolve() 和相对路径拼接,确保了在不同环境下的可移植性。

@y-ji24 y-ji24 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review — TelecomBackup

Thank you for the contribution. Overall, I think TelecomBackup is a relatively mature benchmark implementation. The task definition is clear, the simulator / validator / evaluator / sandbox layers are reasonably well separated, and the 34 unit tests covering these components all pass.

I was also able to reproduce the baseline score of 176.25, which matches the documentation. The reference heuristic achieves 271.25 under direct simulation, and the generated-instance mechanism works as expected when --generate-seed 42 is enabled. The threat model is also discussed quite transparently in the README, which I appreciate.

That said, I found two issues that I think should be addressed before merging, since they directly affect the credibility and reproducibility of the evaluation.


1. Blocker — Runtime instance generation is not enforced in the default evaluation path

The README and Task.md describe runtime-generated instances as an important defense against hardcoding. However, this mechanism currently depends on the host environment variable TELECOM_EVAL_GENERATE_SEED.

The problem is that this variable is not enforced by the task configuration, while the default evaluation command in the README does not set it. As a result, the default evaluation path falls back to the 8 publicly available fixed instances.

I verified that this creates a practical hardcoding vulnerability.

I constructed a candidate by offline-optimizing the fixed instances and selecting the corresponding schedule based on the instance seed. The candidate does not contain explicit instance_N identifiers, and it passes the static checks and deterministic probes. It achieves:

  • valid = 1.0
  • score = 271.88

This is already slightly higher than the reference score of 271.25.

The issue here is not that the simulator itself is incorrect. Rather, under the default configuration, a candidate can memorize the public instances and obtain a near-reference score without actually solving the general problem.

I therefore recommend making runtime generation mandatory for the formal evaluation path. For example:

  • Require TELECOM_EVAL_GENERATE_SEED for official evaluation;
  • Fail explicitly if the required generation configuration is missing, rather than silently falling back to fixed instances;
  • Keep the fixed-instance mode for local development / smoke testing, but clearly distinguish it from the official evaluation mode.

This would make the actual evaluation behavior consistent with the threat model described in the README.


2. Blocker — The documented reference-score reproduction command does not reproduce the reference score

The README / PR description currently provides a command along the lines of:

python verification/evaluate.py verification/ref_solver.py

as a way to reproduce the reference score.

However, running this command returns 0.0.

After checking the evaluation path, the reason appears to be that the reference solver does not contain the required EVOLVE-BLOCK marker and also contains the prohibited ref_solver token, so it is rejected during candidate preflight.

At the same time, result_log.txt correctly indicates that the reported reference score of 271.25 was obtained through direct simulation.

Therefore, the problem is mainly a mismatch between the documentation and the actual evaluation implementation:

The documented command does not reproduce the reference score reported by the benchmark.

I recommend resolving this in one of two ways:

  1. Provide a dedicated reference-scoring path that bypasses candidate completeness / anti-cheating checks; or
  2. Update the README to explicitly state that the reference score is obtained through direct simulation and provide the actual reproducible procedure.

The important point is that a maintainer or future contributor should be able to follow the documented instructions and obtain the documented reference score.


3. Non-blocking — Evaluation timeout should be aligned with the task's time budget

The framework-level evaluator currently has a default timeout of 300s, while the task defines a 60s per-instance budget.

Considering that the evaluation also performs deterministic probes and may run multiple instances, a compliant solver that legitimately consumes most of its per-instance budget could potentially exceed the framework-level timeout.

The README mentions adjusting FRONTIER_EVAL_EVALUATOR_TIMEOUT_S, but I would prefer to see the appropriate value explicitly included in the task configuration for the official evaluation path.

This would avoid relying on environment-specific manual configuration.


4. Non-blocking — The 300 / 60 / 10 second time-budget modes are not fully integrated into the framework

The three time-budget modes currently appear to be supported mainly through the local CLI, while the framework evaluation path still uses a hard-coded 60s budget in frontier_eval/evaluator.py, and run_eval.py does not expose the corresponding mode selection.

If these three modes are intended to be official benchmark settings, I recommend connecting them to the standard task configuration. Otherwise, it would be helpful to clarify in the documentation that they are development / local evaluation options rather than formal evaluation modes.


5. Minor — Repository integration and provenance

A few smaller issues would also be worth cleaning up:

  • The top-level TASK_DETAILS.md does not appear to have been updated, so the new benchmark is currently missing from the repository-level task index.
  • It would be useful to add a short provenance / design note explaining the origin of important parameters such as the 80% coverage requirement, -105 dBm threshold, and the power-consumption coefficients. Since this is an original benchmark, external references are not necessarily required, but documenting the rationale would improve long-term maintainability.
  • There is a small numerical inconsistency in the documentation. My measurement gives an average improvement of approximately +57.5% for the fixed instances, with a range of +27.9% to +119.0%, while the README reports +54%. The +54% figure appears closer to the reference heuristic's improvement over the baseline. I recommend clarifying these two numbers and their respective definitions.

6. Documentation / collaboration — Please use English for future submissions

One additional request for future contributions: please make the PR description, task introduction, README-facing descriptions, and other repository-facing documentation in English.

This is not a blocker for the technical implementation itself, but I would appreciate keeping future PRs consistent with the language convention of the repository.


Overall

Overall, I think the core implementation is in good shape. The simulator, validator, tests, and task design are all reasonably solid, and I don't think the issues above require a major redesign.

My main concern is that the formal evaluation path currently does not fully enforce the assumptions described by the benchmark's threat model, and the documented reference-score reproduction procedure is not consistent with the actual implementation.

I would therefore recommend:

Request Changes

with priority on:

  1. Enforcing runtime-generated instances in the official evaluation path;
  2. Fixing the reference-score reproduction procedure;
  3. Aligning the evaluation timeout / time-budget configuration.

Once these are addressed, I think the benchmark will be in a much stronger position for long-term use in the repository.

zzy and others added 3 commits September 23, 2026 18:20
…iew)

Addresses y-ji24's Request-Changes review of PR Einsia#105.

Blocker 1 -- runtime generation was opt-in, so the default evaluation path
silently scored the 8 committed public instances and a candidate could
memorise them (the reviewer built a seed-keyed lookup scoring 271.88).
evaluate.py now has explicit `official` / `local` modes: official (selected by
eval_command.txt) scores generated instances ONLY and requires
TELECOM_EVAL_GENERATE_SEED, raising OfficialModeConfigError instead of falling
back to the public instances.

Blocker 2 -- the documented `evaluate.py verification/ref_solver.py` command
returned 0.0 because the reference solver fails candidate preflight (no
EVOLVE-BLOCK marker, forbidden token). Added an explicit `--reference` bypass
that reproduces the documented 271.25.

Also:
- per-instance budget self-limits to FRONTIER_EVAL_EVALUATOR_TIMEOUT_S so a
  compliant solver cannot blow the framework cap; budget tiers are wired
  through TELECOM_EVAL_TIME_BUDGET instead of a hard-coded 60 s;
- fixed the generator headroom figure (+57.5%, was +54%) and disambiguated it
  from the reference solver's +54% over the baseline;
- added a provenance / design-rationale section and fixed the generator
  docstring's battery range;
- translated Task.md to English (repo convention);
- registered TelecomBackup in TASK_DETAILS.md and TASK_DETAILS_zh-CN.md.

Tests: 34 -> 43 (official mode, --reference bypass, budget self-limiting).

Co-Authored-By: deepseek-v4-flash <deepseek-ai@claude-code-best.win>
- evaluate.py: _fit_budget no longer declines to shrink when the framework cap
  is <= the fixed overhead; it now divides the (halved) cap across the runs, so
  n_runs * budget is always <= the observed cap. Previously a cap <= 30 s left
  the per-instance budget at 60 s and the run could exceed the cap it observed
  (the one falsified claim from verification).
- evaluate.py: _select_probes dedupes, so official mode (all-generated pool)
  no longer runs one instance as a probe twice (n_runs 16 -> 14).
- tests: lock that eval_command.txt still selects official mode (a silent drop
  of the prefix would revert the framework path to public-instance scoring);
  assert the ref-solver cheat is rejected by the static check (named reason),
  not merely by a runtime crash; give the --reference test a budget that cannot
  flake under CPU contention.
- docs: correct "five modules" -> "four", the official-run worst-case
  arithmetic (14 runs = 840 s), and the AB-MCTS delta (+51%, was +52%).

Tests: 43 -> 44.

Co-Authored-By: deepseek-v4-flash <deepseek-ai@claude-code-best.win>
- evaluate.py: _fit_budget is now monotonic in the observed cap. Previously the
  branch at cap <= 30 s (available = cap - 30 <= 0) produced a discontinuity:
  cap 30.0 s gave a 1.07 s budget while cap 30.1 s gave 0.007 s. It now uses
  `cap - 30` above 2*RESERVE and `cap / 2` at or below it, which is continuous
  at 60 s, non-decreasing, and keeps n_runs * budget <= cap.
- README: "44 tests" (was left at 43 when the guard test was added), and note
  that the budget bound covers solver time only -- fixed overhead (instance
  generation, interpreter start-up) is not shrinkable.

Tests: 44 passing.

Co-Authored-By: deepseek-v4-flash <deepseek-ai@claude-code-best.win>
@github-actions

Copy link
Copy Markdown

🤖 AI Code Review (gemini-3-flash-preview)

🇬🇧 English Analysis

1. Executive Summary

  • Core Purpose: This PR introduces a new benchmark task, TelecomBackup, to the PowerSystems category. The task involves optimizing the time-sequenced on/off scheduling of telecom backup power supplies to maximize regional backup time during outages while maintaining a minimum LTE coverage constraint (80%).
  • Modified File Structure & Modifications:
    • TASK_DETAILS.md & TASK_DETAILS_zh-CN.md: Updated the task registry table to include TelecomBackup under the PowerSystems domain.
    • benchmarks/PowerSystems/README.md & README_zh-CN.md: Added quick-run commands and high-level descriptions for the new task.
    • benchmarks/PowerSystems/TelecomBackup/: Created a new task directory containing:
      • baseline/solver.py: The initial "always-on" solver template for agents to evolve.
      • verification/: Contains the core logic including simulator.py (physics/power model), generator.py (instance creation), evaluator.py (scoring logic), and validator.py (anti-cheating/integrity checks).
      • Task.md & README.md: Comprehensive documentation of rules, scoring, and engineering rationale.
      • frontier_eval/: Integration metadata for the unified evaluation framework.

2. AI Content Analysis

  • Estimated AI Component: 15%
  • Reasoning & Evidence: The code exhibits high domain-specific nuance (e.g., LTE RSRP path-loss models, battery discharge curves) and a sophisticated anti-cheating framework (determinism probes, environment stripping) that is atypical for generic AI generation. The documentation includes specific historical run IDs and future-dated logs (e.g., 2026-08-17), suggesting a human-curated synthetic dataset and testing history. AI likely assisted in generating standard boilerplate for unit tests (test_*.py) and translating documentation into Chinese, but the core engineering architecture is clearly human-led.

3. Engineering & Economic Assessment

  • Engineering Reality Check: This is a high-fidelity, production-grade engineering problem. It moves beyond "toy examples" by incorporating realistic constraints: path-loss exponents, load migration (turning one site off increases load on others), and battery capacity limits. The inclusion of a validator.py that checks for absolute paths and environment variable leaks demonstrates a professional approach to sandbox security.
  • Economic Value: High. Efficient backup power management is a critical operational concern for telecommunications providers. Improving backup duration by 50-100% (as shown in reference scores) through software optimization rather than hardware upgrades represents significant cost savings and improved service reliability.

4. Quality Assurance

  • Verification & Testing:
    • frontier_eval Integration: Yes.
    • task_name: PowerSystems/TelecomBackup
    • Execution & Dependencies: The README.md provides explicit commands for local and official evaluation. It correctly identifies that the task relies only on the Python standard library, minimizing environment-related failures.
  • Documentation Quality: Excellent. The documentation includes a "Threat Model" section, optimization hints, and detailed reference scores for different agent frameworks (OpenEvolve, ShinkaEvolve, AB-MCTS). Minor Note: The result_log.txt uses dates in 2026, which is likely a placeholder or a future-dated simulation log.
  • Organizational Structure: Highly logical and modular. Separating the verification logic from the baseline solver ensures that the "ground truth" is protected and easily testable.

5. Security & Privacy Check

  • Sensitive Files: Clean. The .gitignore correctly excludes __pycache__ and .pyc files. No .env or API keys were detected.
  • Absolute Paths: None detected. The code uses relative path resolution (e.g., Path(__file__).parent) to locate the simulator, ensuring portability across different environments.

🇨🇳 中文分析

1. 摘要

  • 核心目的: 此 PR 在 PowerSystems 领域引入了一个名为 TelecomBackup 的新基准任务。该任务要求优化电信备电电源的时序开关调度,旨在停电期间最大化区域备电时长,同时满足最低 LTE 覆盖约束(80%)。
  • 修改的文件结构与变更摘要:
    • TASK_DETAILS.md & TASK_DETAILS_zh-CN.md: 更新了任务注册表,在 PowerSystems 领域下新增了 TelecomBackup
    • benchmarks/PowerSystems/README.md & README_zh-CN.md: 添加了新任务的快速运行命令和高层级描述。
    • benchmarks/PowerSystems/TelecomBackup/: 创建了新的任务目录,包含:
      • baseline/solver.py: 供智能体进化的初始“始终开启”求解器模板。
      • verification/: 包含核心逻辑,如 simulator.py(物理/电力模型)、generator.py(实例生成)、evaluator.py(评分逻辑)和 validator.py(反作弊/完整性检查)。
      • Task.md & README.md: 关于规则、评分和工程原理的详尽文档。
      • frontier_eval/: 统一评估框架的集成元数据。

2. AI 成分分析

  • 预估 AI 含量: 15%
  • 判断依据与证据: 代码展现了极高的领域特定细节(如 LTE RSRP 路径损耗模型、电池放电曲线)以及复杂的反作弊框架(确定性探测、环境清理),这在通用的 AI 生成内容中并不常见。文档包含了具体的历史运行 ID 和未来日期的日志(如 2026-08-17),表明这是经过人工策划的合成数据集和测试历史。AI 可能辅助生成了单元测试(test_*.py)的标准模板以及文档的中文翻译,但核心工程架构显然由人工主导。

3. 工程与经济评估

  • 工程现实检验: 这是一个高保真、生产级别的工程问题。它通过引入现实约束(路径损耗指数、负载迁移——关闭一个站点会增加其他站点的负载、电池容量限制)超越了“玩具示例”。validator.py 检查绝对路径和环境变量泄露,展示了专业的沙箱安全处理方法。
  • 经济价值: 高。高效的备电管理是电信运营商的核心运营关注点。通过软件优化而非硬件升级将备电时长提高 50-100%(如参考分数所示),代表了显著的成本节约和更高的服务可靠性。

4. 质量保证

  • 验证与测试:
    • frontier_eval 集成: 是
    • task_name: PowerSystems/TelecomBackup
    • 运行与依赖: README.md 提供了明确的本地和官方评估命令。它准确指出该任务仅依赖 Python 标准库,最大限度地减少了环境相关的故障。
  • 文档质量: 优秀。文档包含“威胁模型”章节、优化提示以及不同智能体框架(OpenEvolve, ShinkaEvolve, AB-MCTS)的详细参考分数。微小注意点result_log.txt 使用了 2026 年的日期,这可能是占位符或未来日期的模拟日志。
  • 组织结构: 逻辑清晰且模块化。将 verification 逻辑与 baseline 求解器分离,确保了“地面真理(ground truth)”受到保护且易于测试。

5. 安全与隐私检查

  • 敏感文件: 未发现异常。.gitignore 正确排除了 __pycache__.pyc 文件。未检测到 .env 或 API 密钥。
  • 绝对路径: 未检测到。代码使用相对路径解析(如 Path(__file__).parent)来定位模拟器,确保了在不同环境下的可移植性。

@zzy2007zzy2007

Copy link
Copy Markdown
Author

Thanks for the detailed review - all points are addressed. Nothing here required a
redesign; both blockers were real bugs.

1. Blocker - runtime generation is now enforced in the official path

Confirmed: the generation seed was opt-in via a host env var that the task config never
set, so the default path scored the committed instances. The evaluator now has two
explicit modes:

  • local (default) - the committed fixed instances, for development / smoke tests;
  • official (TELECOM_EVAL_MODE=official, selected by frontier_eval/eval_command.txt)
    • generated instances only; the committed instances are never scored, so a
      memorised schedule buys nothing. TELECOM_EVAL_GENERATE_SEED is required: if it
      is absent the evaluator raises OfficialModeConfigError instead of falling back.

I made official scoring generated-only rather than "fixed + generated" on purpose, so
that memorising the committed instances cannot earn partial credit.

One caveat I want to be explicit about: a fixed, committed seed would not close the hole
you demonstrated, because the generator is in this repository - a public seed lets someone
with repo access precompute the generated instances exactly as before. The official seed is
therefore expected to be supplied per run and not committed, and the seed actually used is
recorded in the metrics so any run can be replayed. The README now states this residual
limitation honestly rather than implying the official path is unconditionally safe.

2. Blocker - the reference-score reproduction path

Confirmed: ref_solver.py fails candidate preflight (no EVOLVE-BLOCK, and it contains a
forbidden token), so the documented command returned 0.0. There is now an explicit bypass:

python verification/evaluate.py verification/ref_solver.py --reference --local   # -> 271.25

--reference skips only the candidate checks and is documented as the way to score the
bundled reference solver. It is off by default (candidates are still checked), the framework
path never sets it, and a test locks that the same solver is rejected without it.

3. Timeout / time-budget configuration

The evaluator now derives a safe per-instance budget from FRONTIER_EVAL_EVALUATOR_TIMEOUT_S:
the budget is chosen so that runs x budget never exceeds the cap it observes, and any
shrink is recorded (budget_shrunk, effective_time_budget_s) rather than the run being
killed. An official run is 14 solver runs (8 instances + a 3-instance determinism probe run
twice), so the worst case is 14 x 60 s = 840 s, which exceeds the 300 s default - the
official run must raise the cap.

On where that value lives: I checked, and the unified framework has no per-benchmark timeout
field - the only files it reads from a benchmark directory are initial_program.txt,
eval_command.txt, copy_files.txt, etc., and its task.timeout_s is a min() cap that can
only lower the timeout. Raising it therefore has to be done on the run command via the
algorithm side, so the README and Task.md now state algorithm.evaluator.timeout=1200
explicitly in the documented official command. The 300/60/10 s tiers are wired through
TELECOM_EVAL_TIME_BUDGET instead of a hard-coded 60 s in frontier_eval/evaluator.py.

4. Repository integration and provenance

  • TASK_DETAILS.md and TASK_DETAILS_zh-CN.md now register TelecomBackup under PowerSystems.
  • Added a "Provenance / design rationale" section covering the 80% coverage requirement, the
    -105 dBm threshold, the path-loss parameters and the power coefficients (including that the
    coefficients were calibrated to create the headroom - an earlier setting had always-on close
    to optimal).
  • The numerical inconsistency: the generator's acceptance headroom on the committed instances
    is +27.9% .. +119.0%, mean +57.5% (your measurement). The +54% was the reference
    solver's improvement over the baseline (271.25 / 176.25 - 1 = +53.9%) - two different
    quantities that had been conflated. Both are now stated separately. I also corrected the
    AB-MCTS delta to +51% (it was +52%).

5. Language

Understood, and apologies. This description and the task-facing docs are now in English, and
Task.md has been translated to English (the other benchmarks' Task.md files are English, so
this also brings it in line with the repository). Future submissions will be in English.

Tests: 34 -> 44 (official/local modes, the --reference bypass, budget self-limiting, and a
lock that eval_command.txt still selects official mode).

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