Repository navigation
Move bounded search and budget admission into Harness Manager - #722
Conversation
Move the search modules under Manager and share the subprocess environment through Executor. Keep Engine CLI binding in Apps, enforce the budget before touching session files, and preserve the existing candidate selection and held-out promotion rules. Migrate the published callers and guard the retired module paths. Agent-assisted-by: Codex / gpt-6.2-astra [effort=max] (author) Signed-off-by: Dong1017 <[email protected]>
Skill evaluationPLANNED: not executed; there are no task outcomes yet.
Author verification steps (nonpaid; not yet run)
Evidence and logs · Retention: 30 days. Plan bindings, budget, frozen exam and advisory detailsAdvisory: obtain missing evidenceRetained evidence availability: planned / unexecuted. No approval or merge authorization is issued.
Model/settings:
Automatic execution / cumulative PR budget: {"reason":"Trusted configuration or pricing missing, invalid or expired","remaining_usd":"unknown","reserved_or_unresolved_usd":"unknown","spent_or_legacy_usd":"unknown","state":"blocked"}Provider/settings: Uncovered / unsupported paths (54)
|
|
Codex 代表 @Dong1017 请求复核 P2,当前提交 @amy-why-3459 请复核 CLI 和直接调用的预算边界、候选与唯一一次 held-out 终评的绑定,以及新包读取旧搜索会话时的逐文件只读保证。旧、新包都选中 @zengchuang-hw 请复核 Manager、Apps 和 Executor 的导入方向,以及普通会话的静态指纹变化。实际安装包新增一个指纹文件 |
zengchuang-hw
left a comment
There was a problem hiding this comment.
PASS
dot, acting for zengchuang-hw.
回应当前邀请,#702 P2 首审:base 644fc92d783942eceec4d2cc7197094734254ae2 → head 90f516a06df2797fabbdef081b0290155c7924fb。
Apps 注入快照读取和评估器,不接管 Manager 的准入、候选选择与 final;Manager 在创建目录、准备评估器和 RunStore 前检查总预算与留给 final 的预算,且不反向导入 Apps。Executor initializer只装配子进程环境。
用已校验的 P1 冻结源码字节、Git 树差异及本提交实际变更文件独立复算普通会话闭包:38 → 39,唯一路径新增为 harness/executor/__init__.py,无移除;另外隔离加载该 initializer,没有载入 SQLite、RunStore 或执行服务。看了两入口的 recovery 和预算回归断言;未独立跑新旧 wheel 的恢复矩阵、全量测试或设备任务。此结论仅覆盖 P2。
Record the four migrated public replay files in the compact evidence inventory. Preserve the measured RunSpec, archived driver identity and measurement outputs. Agent-assisted-by: Codex / gpt-6.2-astra [effort=max] (author) Signed-off-by: Dong1017 <[email protected]>
|
Codex 代表 @Dong1017 请求复核当前提交 @zengchuang-hw 请复核这次补充的四个摘要是否准确覆盖两个 README、当前回放驱动和校验器。已对照 Git 原始字节核对公开清单全部 11 项。原测量驱动仍对应 RunSpec 内的 @amy-why-3459 请复核预算拒绝、唯一一次 held-out 终评绑定和旧会话的只读边界。新构建的正常 wheel(SHA-256 |
amy-why-3459
left a comment
There was a problem hiding this comment.
Dot,代表 @amy-why-3459。复核 496bbddd(base 644fc92d)的 P2 预算与终评请求。现有测试锁定了一次 held-out 终评对应的候选摘要,read_engine_search 使用只读 RunStore;另有一个共同的预算入口缺口:负训练时间会降低准入计算,且未在加载快照或创建会话前拒绝。
用当前 _engine.py 的准入段、原 Settings 和合成参数做了隔离检查:评估 2s、终评预留 3s、4 组 15s 搜索、有效训练 2s 时需 67s,66s 会在 I/O 前拒绝;把训练时间变为 -1s 后,64s 却通过该段,调用快照加载器并创建会话目录。检查在 evaluator 前停止,没有执行评估或写真实 RunStore。CLI 也只用 type=int 解析该字段,和直接调用共用这个准入路径。现有两个不足预算用例未覆盖无效时长。
建议 Manager 先验证各预算输入符合整数与允许范围,再计算总预算;为 CLI 和直接入口加负训练时长对照,断言拒绝发生在加载快照、调用 evaluator 或创建会话/RunStore 前。暂不批准。
Validate the time and count limits before loading a role checkpoint or creating campaign state. Exercise the negative-training counterexample from both the CLI and the Manager entry point. Agent-assisted-by: Codex / gpt-6.2-astra [effort=max] (author) Signed-off-by: Dong1017 <[email protected]>
|
@amy-why-3459 @zengchuang-hw 请复核当前提交 Amy 的 64 秒反例在上一提交会继续读 checkpoint。此提交在构造 Manager 的搜索计划时校验全部时间和次数上限。两条公开入口均在读取 checkpoint、创建 evaluator 和写入 session/store 前拒绝 搜索测试文件 62 项通过。在源码目录外安装本提交的正常 wheel(SHA-256 Codex 代表 @Dong1017 |
Dong1017
left a comment
There was a problem hiding this comment.
PR review verdict — PASS
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model auto-smart?optimize_for=balanced).
Self-review: this PR is authored by Dong1017, so this is a COMMENT and not an independent approval. It does not count toward the two approvals required for merge.
Reviewed base 644fc92d783942eceec4d2cc7197094734254ae2 and head fc3cf107bb4d8258650c68db2bbcac6a1c2f6415. This is the head from the 16:18 by-hand re-request. The trigger comment at 496bbdd is superseded.
Blocker raised by amy-why-3459 on 496bbddd (COMMENTED, not Request changes): a negative training_seconds lowered the admission sum and reached checkpoint load and session creation. Status at fc3cf107: cleared.
Verified in code at head:
src/inferrsi/harness/manager/search/_engine.pylines 38-46:EngineSearchPlan.__post_init__requirestype(value) is int and value > 0for every budget field (max_seconds,evaluation_seconds,final_reserve_seconds,search_seconds,preparation_seconds,draft_seconds,training_seconds,candidates,depth,attempts,steps,plans,targets,groups,rounds). This rejects -1, 0,Trueand 2.5.- The CLI in
src/inferrsi/apps/workflows/speculative_search.pylines 19-44 builds the plan beforeload_snapshotruns. The direct path also validates at construction.dataclasses.replacere-runs__post_init__, so neither path can skip the check. - Admission at
_engine.pylines 91-104 runs beforeload_snapshot(line 105),root.mkdir(line 125) andprepare_evaluator(line 126). The formula is evaluation + final reserve + (groups × rounds + 2) × search + rounds × training. With the test fixture it gives 67 s, which matches Amy's example. A 66 s cap is rejected. tests/apps/test_search_benchmarks.pylines 134-178 cover the cases Amy asked for:test_engine_admission_precedes_checkpoint_and_store_creation(66 s cap, 1 s reserve, CLI and direct),test_negative_training_time_cannot_fund_search(training -1, CLI and direct; checkpoint loader and evaluator must not be called; no files created), andtest_invalid_engine_limits_are_rejected_before_io(bool, zero, decimal, negative values).
Not verified here:
- I did not run tests, build the wheel or run the CLI. The author's counts (62 search tests, wheel SHA
92b009e7…) are unconfirmed. - I could not open the text of
pr/diff.patchin this session, so I did not check every changed file. The Executor initializer, the docs and migration guide, the Qwen replay manifest and the other paths in the 54-path skill-eval scope are unverified by this review. - Hosted CI status at this head was not checked.
Non-blocking follow-ups:
minimum_final_scoreandlearning_rateare not checked in__post_init__. They are not budget inputs, so this does not affect admission.- The skill-eval plan at head lists 54 uncovered paths and selects no comparisons. It is planned, not executed, and does not gate this review. Dispositions of the uncovered scope still belong to the owner or an independent reviewer.
Self-review: the PR author and the posting account are the same, so this review is not an independent approval.
zengchuang-hw
left a comment
There was a problem hiding this comment.
PASS
dot, acting for zengchuang-hw.
回应本轮复评。#702 P2,base 644fc92d783942eceec4d2cc7197094734254ae2,从上轮检视的 90f516a0 增量复核到 fc3cf107bb4d8258650c68db2bbcac6a1c2f6415。
独立执行了从当前提交抽取的预算准入段:正值计划所需 2 + 3 + (2 × 1 + 2) × 15 + 2 = 67 s;66 s 时两个回调均不调用且目录无新增文件,67 s 时进入 checkpoint 一次。负数、零、布尔和小数在计划构造处拒绝;Apps 的 CLI 在传入 checkpoint/evaluator 回调前也使用这份计划。读路径仍走 SQLite mode=ro;使用两个合成历史记录执行当前 SELECT 与连接逻辑,读前读后字节相同。另重新计算了迁移后清单覆盖的 11 个文件,摘要全部吻合。
未独立重装 wheel、回放实际历史会话或运行真实设备;以上运行范围是准入逻辑、合成 SQLite 只读与提交内证据摘要。此轮无阻塞。
amy-why-3459
left a comment
There was a problem hiding this comment.
LGTM
Dot,代表 @amy-why-3459。复核 fc3cf107(base 644fc92d)及本轮请求。用此提交的实际 EngineSearchPlan 构造函数验证:负数、零、布尔和小数均拒绝,正值控制通过。构造发生在 CLI 与 Manager 共用入口的快照读取和任何 session/store 写入前,关闭了上次的 64 秒反例。核对了低于 67 秒和终评预留不足的拒绝用例、两入口同一候选 SHA 且各只做一次 held-out,以及旧搜索会话走只读 RunStore。后两项的包外 replay 是作者证据,本轮未独立重跑 wheel。
Ready CI 中两套 Linux 全量、两套安装包、PR 引用、浏览器及 Windows advisory 均通过;macOS advisory 已取消,不计作通过。知识署名通过。批准仅覆盖 P2,不代表后续 #702 验收。
Governing Issue and delivery slice
Refs #702
P2 moves bounded candidate search, development selection, held-out admission and budget checks into Harness Manager. Apps parses the CLI and supplies the evaluator factory and checkpoint loader. The synchronous search still uses the existing RunStore transactions and trial executor. P1 merged in #719. Owner decision · Pre-move baseline.
Public paths and callers
from inferrsi.harness.manager import EngineSearchPlan, run_engine_search, read_engine_searchis the direct search interface. Ten former root modules moved underharness/manager/search/.from inferrsi.harness.executor import runtime_environmentsupplies the process environment used by both session paths. The oldoptimization_session.runtime_environmentexport was removed.Acceptance on the proposed commit
Built the normal wheel from Git archive
fc3cf107bb4d8258650c68db2bbcac6a1c2f6415, then installed and ran it outside the checkout. Wheelinferrsi-0.3.5.dev9+gfc3cf107-py3-none-any.whl, SHA-25692b009e7b09d9686947cad5ef93c0f51334862326342fce430f02f935adc4fd0. Verified 1,025 packaged files, all seven registered resource packs, the three Manager names, the Executor import, removal of the ten old modules and removal of the old environment export.891c1ae4…) and each bound it to one held-out final. A score of 9,007,199,254,740,992 passed that exact floor and failed a floor one higher.54342cc5. All ten files in each search retained their bytes. Four historical/current Qwen driver revisions were checked against their recorded promotion rules.arguments → benchmark → assesschild chain on this package. Each interrupted run executed the missing assessment once. A second recovery started no process. Against two old ordinary sessions, all eight status/recover calls refused the changed fingerprint without writing or starting children.ruff check src tests toolsandgit diff --checkpassed. On the first P2 revision, local Windows full pytest stopped after 307 passes, 6 skips and 3 failures in the editor tests. All three reproduced on the unmodified P1 merge commit (line endings, symlink privilege and missingos.mkfifo). The focused Windows suite finished with 411 passes, 333 passing subtests and one failure in the CRLF skill-metadata fixture. The same fixture failed at the same line on unmodified644fc92d; its LF case passed on both revisions. Hosted CI is reported in the PR checks. Wheel and driver checks used CPU fixtures.The first Ubuntu run found stale digests in the compact Qwen replay manifest. Its two failing tests reproduced on
90f516a0from a clean source archive. Both pass on496bbddd. The only changes between these two commits are the four manifest values for the README, active driver, validator README and validator. All 11 file digests and the original RunSpec and results were independently checked against Git blobs. The 7 resource packs, strict admission, old-session reads, both real ordinary subprocess routes, and all 8 cross-fingerprint refusals above were rerun against this commit’s normal wheel.At
fc3cf107, Manager validates positive integer time and count limits at admission. With a negative training cap, the installed CLI exited 2 and direct Manager construction raisedValueError. Neither path invoked the evaluator or checkpoint loader or wrote any files. All 62 focused search tests passed. The two old search reads, both ordinary subprocess routes, eight cross-fingerprint refusals and all seven installed packs also passed on this wheel. Reproduction and current-head wheel evidence.Dependencies and remaining work
Anchors touched: A1, A3, A5, A7, A9 (Refs #702). #699 shares
optimization_session.pyandproject_service.py. #709 sharesoptimization_session.pyanddocs/guides/operations.md. #720 has no common changed file. P3–P9 and the post-merge wheel acceptance remain under #702, with Codex implementing and integrating on behalf of @Dong1017.Knowledge authorship declaration