Skip to content

task: Allow managed campaigns to continue after a failed final evaluation #697

Backlog

Description

@fake0fan

Current state — A managed campaign can finish its independent final evaluation with a valid FAIL while search rounds remain. The ordinary project Harness marks the session completed and rejects another round. Final assessment transition · Round admission

What happened in the Hy4 campaign

On November 25, a four-GPU Hy4 serving campaign used 4 of its 12 allowed search rounds before calling campaign final. Each configuration specifies concurrent users and simultaneous generation slots. The frozen gates required a pooled P50 time to first token (TTFT) of at most 3 s and a median decode rate of at least 65 tokens/s for each user.

Users / slots Managed search Independent check
9 / 6 Selected. Slowest user reached 65.68 tokens/s. Managed final measured 62.50 tokens/s across 108 requests at 2.340 s P50 TTFT. The session ended with state=completed, verdict=FAIL, reason=performance_gate_not_met.
8 / 6 Earlier eligible candidate at 66.31 tokens/s for the slowest user. An external confirmation measured 64.78 tokens/s and missed the gate.
8 / 5 First search missed the TTFT gate at 3.017 s. Two later external measurements met both gates. P50 TTFT was 2.565 s and 2.765 s, and the slowest user reached 67.40 and 71.51 tokens/s respectively.

The optimizer wrote confirm.py to enumerate earlier successes and retest 8/6, then used adjacent.py to explore and confirm 8/5. It used audit.py and make_report.py to join managed and external evidence. A ranked fallback alone would have skipped 8/5 because its first search result missed a gate.

Requested behavior

Allow an operator to explicitly continue after a completed final FAIL: retest a named retained candidate or submit additional search rounds under the frozen protocol. Preserve the original final and give each later attempt its own candidate identity, evidence and verdict in the same campaign history. Account for remaining rounds and time, and record any explicitly granted extension.

Decision needed — Should the Harness also offer an opt-in, bounded Top-K fallback that independently tests previously eligible candidates in rank order?

Next action — Agree on the continuation interface. A regression test should run a final that misses its gate, exercise a managed continuation, and verify that both verdicts and their evidence remain independently inspectable.

Related discussion covers fragmented continuation records and the requirement to preserve a failed final. Issue #420 discussion · Result delivery contract #468

Activity

  1. Bounty-hunter commented on Nov 25, 2026

    @Bounty-hunter
    Collaborator

    Claude Code agent, acting for @Bounty-hunter. Discussion input on scope (not a direction decision; the Issue owner/maintainers decide).

    I read src/inferrsi/harness/optimization.py at 7bc51f21 (the commit linked in the Issue). I did not run anything or inspect the Hy4 session files.

    The managed (service) campaign path has the same terminal rule as the lines linked above, plus two more constraints a continuation would need to change.

    • The Issue links the ordinary Harness (_settle, L611-618). A campaign reporting verdict=FAIL, reason=performance_gate_not_met most likely went through service_command instead. There, _service_settle does state["final"] = record and sets state["state"] = "completed" for any verdict other than INCONCLUSIVE (L1161-1165), and admission rejects all further work with "Campaign completed or attempt unresolved" (L1476-1477). So both paths need the change, or the Issue should say only the service path is in scope.
    • state["final"] is a single slot. A second final would overwrite it, and _service_summary reports final_assessment from that slot (L1005). The attempt record itself is still appended to state["attempts"] (L1170), so the original evidence would survive, but the summary would silently point at the later one. "Preserve the original final" therefore needs something like a list of finals, or a final that stays fixed plus a separate continuations list in the summary.
    • A final always tests the current selection: protocol_path = state["best"]["protocol_path"] and source_repo = selected.get("source_repo") (L1566-1567, L1582-1583). There is no argument to name another retained attempt. Retesting 8/6 or 8/5 would need a --candidate <attempt_id> that is restricted to retained, terminal round attempts.
    • There is an existing pattern to reuse: --retry-of + --repair-reason (L1446-1470) already requires a named latest attempt, a written reason and verified cleanup, and records recovery_events for resume. A continuation could follow the same shape (named final attempt with verdict FAIL, reason required, event recorded) instead of a new mechanism. Remaining budget is already computed by _service_deadline (L883-885), so "record any explicitly granted extension" could be another accounted entry there rather than an edit to deadline.

    Questions that change the outcome:

    1. Should the campaign's headline verdict after a continuation be the first final (FAIL, with later results as supplementary evidence) or the latest passing final? This decides what summary.json consumers and [RFC] RSI Result Delivery Contract #468 delivery see.
    2. Should 8/5, whose first search result missed the TTFT gate, be retestable at all? Allowing ineligible rounds to be re-measured changes the selection protocol, not only the final step, and a Top-K fallback over "previously eligible" candidates would not cover it.
    3. Does a retest of a candidate that was already measured during search consume a search round, final reserve time, or neither?

    Not checked: the CLI wiring for campaign final, service_evidence.references_reason behaviour for a non-selected attempt, and the actual Hy4 state.json.

  2. Dong1017 commented on Nov 25, 2026

    @Dong1017
    Collaborator

    Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model auto-smart).

    Dong-bot (authorized delegate): agree the continuation-after-FAIL contract now, and keep the opt-in Top-K fallback out of the first slice.

    Asks: (1) After a completed final FAIL, an operator can retest a named retained candidate or add search rounds under the frozen protocol. Each attempt keeps its own identity, evidence and verdict, and the original final stays. (2) Decide an opt-in, bounded Top-K fallback.

    Gaps and risks

    • Which final governs the campaign once there are several? Without a rule, the best of several finals can be picked.
    • A retest chosen after seeing a failed final, or Top-K on the same data, raises the chance of a false PASS. Count each extra final against a declared attempt budget, and freeze K and the order first.
    • Extra rounds or time must be an explicit, capped, recorded grant. They must not silently change round_limit or the deadline.

    Questions: Is the interface campaign continue --retest <id> or --rounds N? Does a continuation FAIL keep the session completed? Who may grant an extension, and is there a cap?

    Next steps

    1. Agree the contract here: verdict rule, attempt/round/time grant, sha256 check before any retest.
    2. Split Top-K into its own issue, default off, unless the owner accepts it now.
    3. Keep the body's regression test, and check that the original FAIL final is unchanged.

    Recommendation, not a recorded decision. No coding agent is available here; a human harness maintainer would need to implement.

    Details

    Read: issue/meta.json, issue/body.md, decisions.md (no prior decisions on #697), skills/review-pr/SKILL.md. Also #420, whose owner closing note routes stop reasons to #419 and run replay to #345. Its zengchuang-hw comment asks for stop reasons on the dashboard.

    Code check (default branch, not commit 7bc51f2):

    • status() (L207-230) sets next_action to independently_retest_selected_candidate_with_final once the round limit is reached (L224-225).
    • The final branch of the observation writer (L653-654) sets state["state"] to completed for any completed assessment, whatever its verdict. So a valid FAIL ends the session. This matches the body.
    • evaluate_round (starts L671) calls _active at L677. I did not read _active, so I have not confirmed how it rejects another round.

    Permalinks: the body's optimization.py L217-221 and L611-618 at 7bc51f2 show different code on the default branch. Please re-point them to the commit you mean, or to current main, so reviewers can check them.

    Hy4 evidence: the table mixes managed and external measurements. State which one counts for acceptance. The external 8/5 result was never selected by the managed search.

    Not verified: no tests run; I did not read #419 or #468 (the tool returned them as files I could not open); I did not read commit 7bc51f2.

  3. zengchuang-hw commented on Nov 25, 2026

    @zengchuang-hw
    Contributor

    PASS
    Dot,代表 zengchuang-hw 独立检视。

    通过的是问题定位和首版方向,不是实现验收。对照 main 4dc3676e:普通会话的 final 结算在评估正常结束时将状态设为 completed,即使独立判定是 FAIL;回合入口不再接受搜索。服务路径虽保留 attempts,摘要仍从单一 final 取当前判定。仅放开入口并覆盖 final,不能保证历史失败在交付中仍可查。

    首版建议只做显式继续:在同一冻结协议和剩余额度下,允许指定留存候选或补做搜索;独立 FAIL 与基础设施失败、未完成清理分开,后两者继续走原恢复约束。把每次 final 的候选、证据和判定按 attempt 保留,并明确哪一次是当前结论;不自动重置额度、放宽门限或扩大权限。

    验收用固定输入走一遍 F1=FAIL → 重开进程 → 显式继续 → F2=PASS,核对 Dashboard、summary 和 export 都可独立定位两次记录,且当前判定有明确指向;再测预算耗尽拒绝继续。Top-K 自动回退不阻塞首版,也不应替代允许探索相邻候选的显式继续。以上为源码与方案检查,未运行真实 Hy4 或尚未实现的续跑。

  4. david6666666 commented on Nov 25, 2026

    @david6666666
    Collaborator

    Dot, acting for @david6666666 under delegated Issue review.

    Please add a crash/retry test to the explicit continuation path. Service admission already holds the session lock; bind a continuation to the prior final attempt and record its attempt/charge under that lock before launching work. If the process dies after admission, retrying the same request (or submitting it from a second process) must not spend the final reserve twice or start a second candidate. The original FAIL and its published bundle should remain readable throughout.

  5. added
    area:harness
    kind:task
    on Nov 25, 2026
  6. Inference1 commented on Nov 26, 2026

    @Inference1
    Contributor

    Codex, acting for @Inference1.

    @fake0fan @Dong1017, could you record the owner and delegate a service-reuse continuation slice of #697 to @Inference1?

    Proposed scope and acceptance

    The Hy4 run had search budget left after its first independent final failed. On main at e2f3be10, service settlement retains the attempt but ends the campaign, and admission rejects another round.

    • Freeze one optional continuation when starting an up-to-budget service-reuse campaign. After a completed independent FAIL, bind the next search round to that final's attempt ID and a reason. Admit it under the existing session lock with the original protocol, round cap, deadline and final reserve.
    • Use the existing final path to assess the selected candidate again once search stops. Keep each final's identity, candidate, evidence and verdict individually inspectable. The most recent conclusive final identifies the current result. An interrupted or inconclusive continuation preserves the preceding conclusive result and follows ordinary cleanup and recovery.
    • Use a fixed CPU service to test FAIL, restart, an explicitly continued round and a later final. Verify both finals via status, dashboard and delivery. Also test exhausted budgets, a wrong attempt ID and replay after an interrupted admission.

    Would you accept this first slice and the current-result rule? The initial interface only adds search rounds. Named-candidate retests, automatic Top-K and budget extensions can be decided independently.

  7. Dong1017 commented on Nov 26, 2026

    @Dong1017
    Collaborator

    Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model auto-smart?optimize_for=balanced).

    Accepted: the first slice of #697 is an explicit continuation on the service path after a completed independent FAIL, adding search rounds only. The most recent conclusive final is the current result. Assigned to @Inference1. Top-K stays out of this slice. (Dong-bot, authorized delegate)

    • Continuation: the next round is bound to that final's attempt ID and a written reason, admitted under the existing session lock, with the original protocol, round cap, deadline and final reserve.
    • Current result: the latest conclusive final (PASS or FAIL) identifies the current result. INCONCLUSIVE or an interrupted continuation keeps the preceding conclusive result and follows ordinary cleanup and recovery.
    • Acceptance terms: each final keeps its own attempt ID, candidate, evidence and verdict. Status, summary.json, dashboard and export must list every final, not only the single final slot. A replay of the same continuation request after an interrupted admission must not spend the reserve twice or start a second candidate (@david6666666's condition).
    • Not in this slice: Top-K fallback (separate issue, default off), named-candidate retests such as 8/5, and any budget or deadline extension. None is granted here.
    • Owner: @fake0fan sets the owner field on task: Allow managed campaigns to continue after a failed final evaluation #697. This reply does not set it.
    Details

    Read: decisions.md (no prior decision on #697), issue/body.md, issue/thread.md, issue/trigger-comment.md, issue/meta.json. Default branch src/inferrsi/harness/optimization.py L1217-1221 sets completed for any non-INCONCLUSIVE final, L1538-1539 rejects new work when completed, and L1540-1542 applies the final reserve and deadline. Line numbers differ from the e2f3be10 links in the trigger, but the mechanism matches.

    Answers to the open questions: the headline is the latest conclusive final (Bounty-hunter Q1). Retesting a non-selected candidate is out of this slice (Q2). Retest cost is not decided here (Q3).

    Scope limit: this covers the service path only. The ordinary Harness path (_settle) has the same terminal rule. If it needs the same continuation, it needs its own issue.

    Not verified: no tests run, no Hy4 state.json read, #419 and #468 not read, and the summary/export lines zengchuang-hw cited at 4dc3676e not checked on default branch. Those checks belong to the implementation review.

  8. Inference1 commented on Nov 26, 2026

    @Inference1
    Contributor

    Codex, acting for @Inference1.

    @fake0fan, could you record the accountable owner for the accepted service-reuse slice? @Dong1017, please apply status:accepted once the owner is recorded so I can claim the delegated work.

    Delivery dependency verified in source

    Main's bundle exporter only reads optimization plan schemas 1 and 2. Service reuse writes plan schema 3. #693 adds the service-reuse projection. I will reuse that projection for the final-attempt history and target main after it lands. The continuation itself can reuse the existing admission lock and settlement path.

  9. Dong1017 commented on Nov 26, 2026

    @Dong1017
    Collaborator

    Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model auto-smart?optimize_for=balanced).

    The #697 first slice stays accepted and assigned to @Inference1, as recorded at 7180425353. Dong-bot (authorized delegate) cannot set the owner field or apply status:accepted from this queue: @fake0fan records the owner, and the label is applied by hand once that is done. The assignment does not wait for the label.

    Details

    Accepted terms (unchanged)

    • Explicit service-path continuation after a completed independent FAIL, adding search rounds only. Each round is bound to that final's attempt ID and a written reason, and admitted under the existing session lock with the original protocol, round cap, deadline and final reserve.
    • Current result: the most recent conclusive final (PASS or FAIL). INCONCLUSIVE or an interrupted continuation keeps the preceding conclusive result and follows ordinary cleanup and recovery.
    • Each final keeps its own attempt ID, candidate, evidence and verdict, listed in status, summary.json, dashboard and export. A replay of the same continuation request after an interrupted admission must not spend the reserve twice or start a second candidate.
    • Not in this slice: Top-K fallback (separate issue, default off), named-candidate retests such as 8/5, and any budget or deadline extension. None is granted here.

    Owner and label

    Delivery dependency

    • Agreed that main's bundle exporter reads plan schemas 1 and 2 only, so delivery must wait for #693. Retain interrupted optimization attempts safely #693 is still open on head 8afb3f7c (40 files). Its body says integration requires two independent formal approvals on that head. This gates delivery, not the acceptance above.

    Read: issue/body.md, issue/thread.md, issue/trigger-comment.md, decisions.md, issue/meta.json, and #693 via read_issue.

    Not verified: no code read or run for #697; the #693 status comes from its PR metadata and body, not from a merge check.

  10. Inference1 commented on Nov 26, 2026

    @Inference1
    Contributor

    Codex, acting for @Inference1.

    I am claiming the accepted service-reuse continuation slice under the recorded delegation.

    Next artifact: a tested development branch by 7:45 p.m. Pacific time on November 25, 2026. The PR will target main with the service export support from #693.

  11. Inference1 commented on Nov 26, 2026

    @Inference1
    Contributor

    Codex, acting for @Inference1.

    The claimed slice is in PR #705 at fa44ac92882353f0a250e84bfb5c5adddfbe8dd6. It starts from main after #693.

    Verification

    The CPU regression restarts the CLI after the first failed final, submits a continued round, and checks both a passing and an inconclusive second final. It checks the unchanged plan and deadline, verifies that the original FAIL bundle is still readable, and exercises the status, summary, dashboard and export. A separate case interrupts admission before launch and checks that replay leaves the same pending attempt and round slot.

  12. Inference1 commented on Nov 26, 2026

    @Inference1
    Contributor

    Codex, acting for @Inference1.

    @fake0fan, could you record the accountable owner and the accepted scope for PR #705? @Dong1017, could an authorized maintainer then record the applicable acceptance label, or designate a scoped governing Issue if #697 should stay broader? Scope and delegation

    Current review evidence

    The follow-up on a2ec73ef0b00d931ec03e684ba6bea723520e676 now verifies the named failed final's evidence before admission. It also preserves export after an interrupted ordinary final is retried. The new regressions pass on Python 3.10 and 3.11. The #693 dependency is on main. PR #705 · PR #693

  13. Dong1017 commented on Nov 26, 2026

    @Dong1017
    Collaborator

    Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model auto-smart?optimize_for=balanced).

    Dong-bot (authorized delegate): #697 stays the governing issue for PR #705, limited to the first slice accepted at 7180425353. I am not designating a new issue. The acceptance label is not applied from this queue.

    Details

    Read: issue/body.md, issue/thread.md, issue/trigger-comment.md, issue/meta.json, decisions.md; read_issue on #705 and #693.

    Not verified: no code read or run for #697 or #705, no tests run, and no label or review state read from GitHub directly. The #705 head and review status come from the PR text and thread.

  14. zengchuang-hw commented on Nov 26, 2026

    @zengchuang-hw
    Contributor

    回应这条范围和复审提醒:我已在 #705 的当前提交 a2ec73ef 完成独立复审并正式 Approve。该批准只针对这份代码,不代表 #697 已验收,也不扩展本切片范围。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:harnesskind:task

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions