Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions doc/architecture/SPEC/rebase_engine.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,10 @@ choke-point 编号(agent_loop/rebase_tools 写"C5")落后于 `_CONSTRAINTS.m

`module_rebase` 既可跑进程内 agent 循环,也可把一个 module 交给 harness
provider;两条路径共用同一 prompt、同一工具面与同一 plan gate。

## module agent 轮次预算(2026-09-19)

`RebaseModuleConfig.max_turns` = 400。耗尽预算不致命:引擎会**重启** agent
循环而不是判 module 失败——但重启会丢掉已积累的上下文,所以预算过低时
agent 会反复从头探索。flash 级模型在同一 module 上约需 pro 级 2.3 倍轮次
(140+ vs 62),150 的旧上限会被截断三次仍未完成。
9 changes: 8 additions & 1 deletion src/infermatrix_copilot/rebase_engine/module_rebase.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,14 @@ class ModuleRunConfig:
last_rebase_vllm_commit: str = ""
cuda_devices: str = "0,1"
hf_home: str = "/model"
max_turns: int = 150
# Raised from 150 for the v0.30.0 campaign: a flash-class module agent
# needs ~2.3x the turns of the pro tier on the same module (140+ vs 62),
# mostly shell exploration before the first edit. Exhausting the budget
# is NOT fatal — the engine restarts the agent loop — but a restart
# discards accumulated context, so too low a ceiling makes the agent
# re-explore from scratch. Bounds the in-process loop; a harness session
# is bounded by `harness_timeout_s` instead (see below).
max_turns: int = 400
# Harness backend selection (doc/features/provider-registry.md). "api"
# keeps the in-process Anthropic tool-use loop; any other provider id
# delegates the whole module step to that harness, with the SAME 20-tool
Expand Down
Loading