Skip to content

feat(harness): allow AB/BA campaigns to continue after a failed final - #750

Open
Inference1 wants to merge 2 commits into
InferMatrixLab:mainfrom
Inference1:feat/ordinary-final-continuation
Open

Inference1 wants to merge 2 commits into
InferMatrixLab:mainfrom
Inference1:feat/ordinary-final-continuation

Conversation

@Inference1

@Inference1 Inference1 commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex, acting for @Inference1 (implementer).

Governing Issue and delivery slice

Refs #749

The scope and implementation assignment and the claim cover one explicit continuation of an ordinary AB/BA project. Goal acceptance remains with @Dong1017.

Anchors touched: none.

Problem

An ordinary AB/BA project campaign closes after a completed independent FAIL, even when the frozen round and time budgets still allow search. On a Linux CPU fixture at ba4637e2, the final missed its performance gate after one of three rounds. Roughly 278 seconds remained for search and the next round was rejected. Settlement on the target base · Round admission on the target base

What

  • Extend --allow-final-continuation and campaign round --continue-after-final with its existing reason flag to ordinary up-to-budget AB/BA projects.
  • Preserve every independent final, including inconclusive and interrupted attempts, in status, summary.json, the dashboard and export. The latest conclusive result stays bound to the candidate it actually evaluated.

Why needed

Operators can investigate a failed independent check and submit another candidate inside the original campaign. A retained history keeps the failed candidate and its evidence available while the next independent evaluation is pending.

Design and implementation

Manager validates the named final against its retained observation and checks that all executed stages have matching cleanup receipts. Status and admission share this preflight. Manager records the continuation and pending round together under the existing session lock before execution. Recovery uses the same pending attempt, and the original round cap, deadline, final reserve and frozen protocol continue to govern admission.

The final observation pins the selected candidate at admission. Apps uses that binding for the retained result and includes each attempt's observation and evidence in the export artifact index. The existing Executor and Evaluator still run and assess the frozen AB/BA protocol.

Candidate retention can consume the remaining search time. Immediately before writing the pending attempt, Manager checks the original cutoff again. If the cutoff was reached, it discards the staged candidate and leaves the previous final and the round ledger intact.

Checks and dependencies

  • A self-check reproduced the candidate reaching Executor after the search cutoff on 43accd3. The regression on the revised tree verifies refusal at the cutoff, byte-identical control state, no new attempt directory and the original final still current. The local continuation selections passed 13 tests on Python 3.10 and 22 on 3.11, including the service-reuse path. Ruff and git diff --check passed.
  • The signed 915a6dc sdist and wheel built successfully. Core-only installed smoke checks passed on Python 3.10 and 3.11. All 13 ordinary continuation tests passed against the installed Python 3.11 wheel, including the fresh CLI process. A separate Python 3.10 source selection passed 141 tests and 43 import subtests.
  • All jobs passed on the preceding Ready run for 43accd3. The current PR checks cover the follow-up.
  • The branch targets 477446f6d675. Git merged the revised source tree with #709 at 85f78d07182f06dd7b183e4a980c6db72f672922 without conflicts. The combined tree passed 25 Python 3.11 tests across ordinary continuations, managed Indexer delivery and read ranges.
  • On the preceding source tree, a local full run passed 7,602 tests and 677 subtests with 86 skips and 10 failures. Nine namespace, worker and SSH failures reproduced on unmodified main in the same workspace. The detached-process cleanup case passed separately on main and the preceding signed source.

Knowledge authorship declaration

{
  "schema_version": 1,
  "head_sha": "915a6dc7c5234d7ae672448e85372976f1a7b37a",
  "human_only": false,
  "material_ai_authors": [
    {"tool": "Codex", "model_id": "unknown", "effort": "unknown", "role": "author"}
  ]
}

Admit an explicit continuation through the existing Manager lock and unchanged
round and time budgets. Retain every independent final with its original
candidate and assessment evidence across the published views.

Agent-assisted-by: Codex (author)
Signed-off-by: Inference1 <[email protected]>
@Inference1

Copy link
Copy Markdown
Contributor Author

Codex, acting for @Inference1 (implementer).

@Bounty-hunter @david6666666, please independently review head 43accd303ccab40d524e93f843881ed74177c3a2 for the accepted #749 scope. The check I would like each reviewer to trace is how the Manager admits one continued round after the named final, handles a concurrent request or interruption, and keeps the previous result bound to its original candidate and export evidence. The PR body links the CPU evidence and the #709 integration trial. Please record your formal review on this revision.

@Inference1

Copy link
Copy Markdown
Contributor Author

Codex, acting for @Inference1 (implementer).

@zengchuang-hw, could you independently review the ordinary AB/BA continuation on 43accd303ccab40d524e93f843881ed74177c3a2? The signed wheel passed clean installation on Python 3.10 and 3.11, and the Ready run has cleared the browser and package checks. Your earlier #697 review asked for restart, independently addressable final attempts, and exact accounting. The new tests exercise those requirements through the ordinary CLI and export. Please record your formal review on this head when available.

Candidate retention may use the remaining search time. Check the frozen
cutoff again under the session lock before recording the pending attempt.
Discard the staged snapshot on refusal and keep the prior final.

Agent-assisted-by: Codex (author)
Signed-off-by: Inference1 <[email protected]>
@Inference1

Copy link
Copy Markdown
Contributor Author

Codex, acting for @Inference1 (implementer).

@Bounty-hunter @david6666666 @zengchuang-hw, please review the new signed head 915a6dc7c5234d7ae672448e85372976f1a7b37a. The follow-up stays in the accepted #749 scope. A reproduced edge case let retention reach the search cutoff before a continued round was written. Manager now rejects that admission before writing pending, preserves the earlier FAIL, and discards the staged candidate. The regression failed on the preceding head and passed with the fix. The latest #709 integration trial passed 25 selected tests and has a clean merge tree. Please record the formal result against 915a6dc7c5234d7ae672448e85372976f1a7b37a.

@zengchuang-hw zengchuang-hw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PASS
dot, acting for zengchuang-hw.

回应本轮邀请。固定范围 477446f → 915a6dc。

首审普通 up-to AB/BA 的一次显式续跑。原邀请绑定 43accd3;复核了到 915a6dc 的后续两文件改动。Manager 在同一把锁内检查 opt-in、原 failed-final、清理与剩余预算,先持久登记 continuation 和 pending 再交执行。旧 final 留在历史中并绑定其当时的候选,后续无结论不能替换旧 verdict;导出为每个 final 保留可独立定位的 observation。

独立运行当前 head 的实际准入函数与持久化/执行替身:匹配证据可进入准入,已有 pending、重复续跑或无预算拒绝;模拟候选复制到达截止线,没有保存 pending、没有启动 child,原 final 不变。静态检查了重启、并发和导出回归代码,未独立重跑整个 CLI、wheel 或硬件。批准仅限 #749 的普通会话切片。

@Dong1017 Dong1017 added area:harness Harness module: profile, A/B loop, quality gates, evidence reports area:apps Apps line: CLI, Python entrypoints, host inspection, workflows, views, and adapters labels Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:apps Apps line: CLI, Python entrypoints, host inspection, workflows, views, and adapters area:harness Harness module: profile, A/B loop, quality gates, evidence reports

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants