Skip to content

fix(harness): preserve evaluation limits and replay original attempts (PR-3) - #564

Merged
jiangkuaixue123 merged 14 commits into
mainfrom
codex/harness-429-evaluation-replay
Nov 23, 2026
Merged

jiangkuaixue123 merged 14 commits into
mainfrom
codex/harness-429-evaluation-replay

Conversation

@zengchuang-hw

@zengchuang-hw zengchuang-hw commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Refs #429 and #371.

PR-3 of three; prerequisite #562 is now on actual main. This head e0eb7eea81204f60b570c7b8565fafefc8391c64 synchronizes actual main 5325147786d0b5bb2b78b3f7ce461c6289c26b2e. The native main-target increment is now the bounded nine files / +499 -23, with no unmerged #562 code in the diff. Authority: bounded PR-3 delegation.

A saved execution request resolves registered state before opening preparation artifacts, admitting another budget or binding a target. Completed and refused attempts return the original fixed RecordRef. Digest changes conflict; live owners and unfinished attempts never implicitly resume. Fresh evaluations preserve the original absolute deadline and budget, including a null step timeout.

  • Static version/field checks precede state lookup; snapshot the request before host callbacks. Reuse RunStore's reentry table without another registration or clock/budget refresh.
  • Fresh fixed-preparation checks precede atomic claim, which still arbitrates concurrent registration during artifact IO.
  • Completed positive and T37-refused requests replay their original facts when a source is repaired/missing or the target retired. No new source IO or worker launch.
  • Live owners return AttemptInProgress; gone owners or failed commits without a record return RecoveryRequired. Storage/integrity failures stay errors, with no invented known-false start state.
  • Known expiry/cancellation stops before source capture. Mid-run expiry/cancellation retains actual supervisor cleanup and lease facts. Existing free-CPU budget support and fix(harness): recheck execution limits before worker launch #552 launch-boundary/step-timeout classification are retained; unsupported budget enforcement is refused.

Validation on this synchronized head:

  • 283 tests, 289 subtests passed; two POSIX-only process-domain skips on Windows. Covers evaluation replay, T37/entry capture, fixed preparation, execution/RunStore, generation sealing plus newly merged original bounds, Apps binding, canonical consumers and isolation.
  • Whole-tree Ruff and whitespace checks passed.
  • Fresh sdist → bare core wheel → independent environment → complete outside-checkout installed check passed. Earlier source-head validation remains historical, not inherited current-head acceptance.

Six squash-related conflict regions were resolved by retaining the bounded replay changes and all newly merged main functionality/docs; the resulting runtime delta is the same 42-line execution-service and 28-line RunStore change relative to the accepted entry-verification source. Required CI has completed successfully on the new head. Old-head approvals/comments do not count; fresh independent review is requested now that the actual-main prerequisite is met.

Root/Codex is the author/integrator and Dong1017 the accountable Harness parent; neither supplies an independent vote. Require two distinct eligible write+ current-head formal Approves with first nonempty line exactly LGTM, required CI green, then squash to main. The #562 merge itself is recorded separately as merged with independent approvals 1/2 and pending post-merge review per owner decision, not retroactively compliant. Shared production CPU acceptance remains separate; #371/#429/#430/#434/#565 remain open.

Agent-assisted-by: Codex (author/integrator); DCO signed.
Current-head gate update: Ready CI 45087329846 is fully successful on e0eb7eea81204f60b570c7b8565fafefc8391c64; native no-cache check/status reads also confirm declarations, lint and knowledge-model-policy success. Jiang 6015310602 is one eligible independent approval; Dong 6015314555 explicitly does not count as the accountable parent. Independent approvals remain 1/2. The new isolated installed-core probe also completed a fresh CPU evaluation, replay after source removal/target retirement with fresh operations forbidden, and changed-digest RequestConflict; both H runtime files match source/wheel/installed bytes.

Adapt the authorized pool draft and freeze the null-timeout binding vector.

Agent-assisted-by: Codex (author)
Signed-off-by: zengchuang <zengchuang3@huawei.com>
Verify candidate and worker declarations against fixed preparation bytes. Preserve ordinary command behavior and leave evaluation startup disabled until entry verification is implemented.

Agent-assisted-by: Codex (author)

Agent-assisted-by: Unknown PR Pool agent (draft contributor)
Signed-off-by: zengchuang <zengchuang3@huawei.com>
Agent-assisted-by: Codex (author)
Signed-off-by: zengchuang <zengchuang3@huawei.com>
Resolve standalone source entries under an explicit trusted root without imports. Retain the actual bytes and digest and preserve existing snapshots.

Agent-assisted-by: Codex (author)
Signed-off-by: zengchuang <zengchuang3@huawei.com>
Capture the configured standalone source entry after registration, retain observed code identity, and commit fixed zero-start refusals for missing or mismatching bytes. Execute matching entries from their retained source snapshot.

Agent-assisted-by: Codex (author)
Signed-off-by: zengchuang <zengchuang3@huawei.com>
Clarify mismatch argv and the single-step source target. Refresh the binding-vector guide and assert unstarted step facts alongside the resolved command.

Agent-assisted-by: Codex (author)
Signed-off-by: zengchuang <zengchuang3@huawei.com>
Apply existing attempt state and digest conflicts before fresh preparation IO or target support checks. Snapshot the saved request before host callbacks and preserve original records without new registration or execution.

Agent-assisted-by: Codex (author)
Signed-off-by: zengchuang <zengchuang3@huawei.com>
Intercept the supervisor used by Harness rather than the legacy execution wrapper in zero-start binding tests.

Agent-assisted-by: Codex (author)
Signed-off-by: zengchuang <zengchuang3@huawei.com>
Carry the corrected pre-registration guard and intercept the real Harness supervisor for T37 refusals. Positive controls observe a real process ID at the same boundary.

Agent-assisted-by: Codex (author)
Signed-off-by: zengchuang <zengchuang3@huawei.com>
Stop known expired or cancelled evaluation requests before source capture. Cover real null-timeout expiry, cancellation and descendant cleanup, durable cross-process replay, live owners, commit failure and registration races.

Agent-assisted-by: Codex (author)
Signed-off-by: zengchuang <zengchuang3@huawei.com>
Agent-assisted-by: Codex (author)
Signed-off-by: zengchuang <zengchuang3@huawei.com>
Dong1017
Dong1017 previously approved these changes Nov 21, 2026

@Dong1017 Dong1017 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.

LGTM

PR review verdict — PASS
Reviewed base 15f1703 and head d34a045. This is a full main-target diff, so it includes the unmerged #561/#562 units. No formal reviews are seeded for this head and there is no outstanding CHANGES_REQUESTED.

Status of this vote. It comes from Dong-bot (authorized delegate) on Dong1017's queue. The PR body names Dong as the accountable Harness parent, so this is a technical check. It is not an independent vote and should not count toward the two required independent write+ approvals.

Verified by reading the diff and the surrounding code

  • Replay ordering. execution_service.execute runs _validate_fields and then snapshots the spec with copy.deepcopy. It computes the digest and calls store._reenter_if_registered. Only after that does it run _validate_fresh (preparation read, target support), then store.claim.
    • _reenter_if_registered selects on the same request_id column that claim uses. It reuses _reenter, so the digest-first table is identical: RequestConflict, finished record, AttemptInProgress, RecoveryRequired.
    • The lookup registers nothing. The atomic claim after the preparation read still arbitrates a registration race, and test_registration_race_after_lookup_still_uses_the_atomic_claim exercises that path.
    • Lookup failures raise ExecutionPersistenceError with started=None, so no start state is invented.
  • Pre-registration binding. prepared_binding.read bounds reads to size+1 bytes, closes the stream, re-checks size and sha256, and passes dict(ref) to the reader. project and verify use exact field sets and refuse unknown rule revisions. Malformed bindings raise before claim, which the tests assert by checking the store is empty.
  • Source entry (T37). entry_code.capture_module accepts only [A-Za-z_]\w* module names. It opens through open_regular, which rejects symlinks and paths outside the root. It never imports the module, refuses to overwrite an existing snapshot, and re-hashes the copy.
    • A matching entry runs as python -I -B <captured path>, so the workspace, PYTHONPATH and later edits to the origin cannot replace the bound code.
    • A mismatch or an unavailable entry produces a fixed not_started record, with entry_code_identity set to failed or not_performed. The mismatch record references the observed bytes. No process is launched.
    • A capture write failure raises _RetentionFailure, which becomes ExecutionPersistenceError with started=False.
  • Limits and budget. Evaluation checks cancellation and the deadline before source capture. The absolute deadline is used when timeout_seconds is null (bound = deadline). _budget is unchanged and still rejects policy, dimension and enforcement requests before binding. Replay never re-admits a budget.
  • Ordinary mode.
    • Ordinary-mode _argv is unchanged and records no code digest.
    • The ordinary runtime bindings are still recorded only for launched steps.
    • _step_errors still requires a null expected_code_sha256 in ordinary mode and a non-null one in evaluation (V32).
    • The test_harness_execute.py expectation change to InvalidExecutionSpec follows from that V32 rule.
  • Tests and packaging.
    • The tests intercept the real local_process._supervise and use a positive control with real PIDs.
    • They cover completed and refused replay after the source is repaired or the target is retired.
    • They cover digest conflicts, a live owner, an abandoned owner, and commit failure after a real start.
    • They cover null-timeout expiry, caller cancellation with a descendant, a fresh-process replay and a registration race.
    • check_installed.py and the NEW_H_CLOSURE update keep the new modules free of Apps and Benchmark imports.
    • The docs and the migration JSON are consistent with the new test files. I checked the consumers registration by reading test_apps_module_migrations.py, not by running it.

Not verified here

  • I did not execute any tests, and current-head CI had not completed per the PR body. The author's reported counts (111 core tests; 297 passed, 2 POSIX-only skips on Windows) are unverified.
  • The process-domain and null-timeout cases depend on the supervisor fixes in #562 and the separate #552 launch-boundary fix. I did not audit those here.
  • Two items are optional follow-ups, not blockers. First, _capture_input still hands the reader item["source_ref"] from the internal ctx.spec. That is pre-existing and not covered by the new snapshot-isolation claim. Second, the merge order is #561 → #562 → #564, so this PR needs a re-sync and green current-head CI before squash.

I will re-read if the author pushes after a rebase onto the integrated dependencies.


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

@Dong1017 Dong1017 added area:harness Harness module: profile, A/B loop, quality gates, evidence reports kind:task Bounded delivery task with a delegated slice labels Nov 21, 2026
amy-why-3459
amy-why-3459 previously approved these changes Nov 21, 2026

@amy-why-3459 amy-why-3459 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.

LGTM

PR review verdict — PASS
Reviewed increment 73c30b8...d34a045 (PR-3 unit on the current #562 head). The main-target base is 15f1703 and the head is d34a045; that full diff still includes the unmerged #561/#562 units already reviewed on those heads. Immediately before this vote I re-fetched the PR reviews and comments: the only formal review on this head is Dong1017 APPROVED (6005639524), which the review itself marks as a non-independent parent technical check. There is no CHANGES_REQUESTED or other blocking comment.

Verified by reading the increment and the surrounding execute / RunStore paths:

  • Static field checks run first; the request is snapshotted before reentry, preparation IO, budget admission, source binding or a worker start.
  • _reenter_if_registered reuses the existing digest-first _reenter table and does not register or refresh an attempt. A finished record returns the original RecordRef; a digest mismatch is RequestConflict; a live owner is AttemptInProgress; an unfinished attempt with no owner is RecoveryRequired. Lookup failures are ExecutionPersistenceError with started=None.
  • Fresh preparation and target-support checks still precede claim. The atomic claim remains the registration-race arbitrator, as covered by test_registration_race_after_lookup_still_uses_the_atomic_claim.
  • Reentry does not re-admit a budget, reset the clock, open preparation, capture entry code or call _supervise. Replay coverage includes a repaired or missing source, a retired target, and a fresh controller without the original archive or reader.
  • Fresh evaluation requests keep the original absolute deadline when timeout_seconds is null (bound = deadline). Known expiry or cancellation is refused before source capture; mid-run expiry and caller cancellation reuse the process-domain supervisor and keep cleanup and lease-release facts separate.
  • The documented rejection of unsupported budget policy, dimensions or enforcement is the existing _budget path on a fresh claim, not a new admission model. Replay never re-enters that path.
  • Ordinary-mode field rules and _argv are unchanged; the evaluation-only pre-capture limit checks do not change ordinary launch ordering.

Ready lint-and-smoke, installed-package (3.10/3.11), declarations, pr-references, dashboard-browser and advisory host-compatibility have passed on this head. full-check (3.10 and 3.11) is still in progress (https://github.com/InferMatrixLab/InferRSI/actions/runs/44910395728). I did not run the tests locally. Merge should wait for green current-head Ready CI, the #561 → #562 → #564 integration order, a re-sync plus a second independent write+ LGTM on the synced head, and the separate #552 launch-boundary fix before whole CPU acceptance. This vote does not close #429 or #371.

Copy link
Copy Markdown
Contributor Author

当前 d34a0451 的 Ready CI 已全绿,两种 Python 各 6029 passed / 31 skipped / 674 subtests,安装、Dashboard、lint/声明及引用检查通过。Amy 的当前头独立 Approve 已收到;Dong owner 技术 PASS 不计独立票。

@david6666666 请与 Amy 一起完成独立检视,有意见先处理。#561 → #562 的前置合入后仍要同步并复核最终头;#552 继续由 Inference1 修复。新 #565 已被 owner 作为单独生产证据桥接任务接受,不混入本 PR,不把当前源代码小用例等同于完整生产验收。

cursor[bot]
cursor Bot previously approved these changes Nov 21, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

PR review verdict — PASS
Reviewed base 15f17037afb6a57a7a51348f73979f81f5e0721f and head d34a0451f0d4edd76c604632b44d673f4f5d43ae.

Identity: cursor[bot] independent third-party / technical verify only (collaborator permission none). Not write+ / dual-tip / merge-ready. Stacked on #561/#562 (+ #552 launch-boundary prerequisite per PR body); resync after those land before squash.

Clean-code / repo style: PASS

  • Replay path splits cleanly: _validate_fields → digest → _reenter_if_registered (no registration) → _validate_fresh → atomic claim; deepcopy snapshot isolates later host mutation of the caller's mapping.
  • Deadline/cancel checks precede entry capture on evaluation; null timeout_seconds uses absolute deadline; budget still refused before binding and never re-admitted on replay.
  • run_store._reenter_if_registered reuses _reenter digest table; lookup faults map to ExecutionPersistenceError with started=None (no invented start state).
  • Ordinary mode argv/runtime binding behavior preserved; evaluation fields retained in fixed records. Tests cover completed/refused replay, races, null-timeout, and supervisor boundary. Layering/migrations/check_installed remain consistent with prior units.

Verified: tip Dong1017 + amy Approves; Ready green. Read tip delta (execute/_validate_*, _reenter_if_registered, evaluation-replay tests) — not CI alone.

@jiangkuaixue123 jiangkuaixue123 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.

这不是 Approve。#562 仍是前置条件,还没有进入 main。

我检视的是正文声明的 PR-3 增量:838607925faeede9d83db395e7f9038b75511c3b → a1bff61b01af926b7a1881bd526a4c35775c84fe,9 个文件、+499/−23,与声明一致。当前头仍是 a1bff61b01af926b7a1881bd526a4c35775c84fe,已经和 #562 的 83860792 对齐。针对 main 的完整 diff 仍混有未合入的 #562(15 个文件、+1001/−48),所以现在不能把「对 main 的差异」当成这一份增量来批准。

这组增量做的是:再次提交一份已保存的评估请求时,先查已有状态,再去打开准备产物、占用预算或绑定目标。已经完成或已被拒绝的尝试,直接返回原来那份固定 RecordRef(固定记录的引用);摘要变了就是冲突;还活着的所有者不会被隐式接着跑;新的评估请求保留原来的绝对截止时间和预算,包括步骤超时为空的情况。

在这份隔离增量里,我没有发现影响正确性、安全或所声称行为的问题:

  • execute 先做静态字段检查并快照请求,再调用 RunStore._reenter_if_registered(不登记、不改钟、不重新占用预算),然后才做新鲜的准备检查和原子 claim。查找失败是 ExecutionPersistenceError,started=None,不会编造启动状态。
  • 已完成的正向结果和 T37 拒绝记录都会被回放;事后修好或删掉源文件、或把当前目标换成已退役的,都不会变成一次新的执行。测试覆盖了这些路径,以及跨进程回放。
  • 摘要变化(截止时间、预算范围、准备引用)在做产物 IO 之前就是 RequestConflict。还活着的所有者是 AttemptInProgress;所有者没了,或启动后提交失败且没有记录,是 RecoveryRequired,不会偷偷重跑。
  • 评估请求在抓源文件前先看取消和绝对期限。timeout_seconds 为空时,步骤边界仍是整次尝试的期限(bound = deadline);这是已合入的 #552 行为,本增量保留。不支持的预算策略在绑定工人前拒绝,回放不会再做一次 admission(准入/占预算)。
  • 查找之后、准备读取期间若另有调用方完成登记,仍由原子 claim 裁决;test_registration_race_after_lookup_still_uses_the_atomic_claim 覆盖了这条路径。

当前头 Ready CI 45029500358 已成功。我是读隔离增量和周围代码检视的,没有在本机重跑测试。

请先等 #562 进入 main,再同步最终头、跑最终头检查,并在干净的最终头上重新求两份独立批准。我核对时 main 也已比同步点多了 #579,与本增量文件没有交集,但最终头仍应再对齐一次。Dong 已开启 squash 自动合入;在完成上述同步之前,我不会在这个头上点 Approve,以免提前满足合入条件。

Copy link
Copy Markdown
Contributor Author

@jiangkuaixue123 请加入当前 a1bff61b01af926b7a1881bd526a4c35775c84fe 的独立检视。你已复核 #562 当前 83860792;本 PR 的限定 PR-3 增量见 83860792 → a1bff61b,9 文件 +499/−23。请结合实际 main-target 完整差异、相邻消费者、301 tests / 43 subtests(2 POSIX skips)、fresh wheel 和 CI 证据检视,重点看原期限/预算保持及先重入再读新来源,给真实结论,有意见先处理。通过时当前头正式 Approve 首行单独 LGTM,代理代交记录实际身份/授权。

@amy-why-3459 @david6666666 原有独立请求仍有效。Root 是作者,Dong 是负责 Harness 的父责任人,均不计独立票。#562 真正入 main 后仍须同步主线、刷新最终头验证/CI/独立检视;本次检视不表示前置依赖满足,不将未合入的开发栈当作生产验收。

Copy link
Copy Markdown
Contributor Author

@Dong1017 刚核实并取消了你先前开启的 squash 自动合入:原生 API 现在 auto_merge=null,head 仍为 a1bff61b01af926b7a1881bd526a4c35775c84fe,PR 保持 Ready/open,源码不变。

本 PR 必须先 #562 真正入 main,再同步、刷新新头 CI 与两份合格独立检视。原生通用两票队列不能表达这些前置依赖及 author/parent 排除条件,故继续由 integrator 在全部实际条件满足后立即 squash。现有 Jiang 6013174474 是明确的 COMMENT-only 增量检视,不计 Approve;已接受他先等实际主线再最终批准的结论。当前不要求提前批准,也不再开启会提前触发的自动队列。

Refs #429 and #564. Agent-assisted-by: Codex (author/integrator)

Signed-off-by: zengchuang <zengchuang3@huawei.com>

# Conflicts:
#	docs/contracts/harness-entry-verification.md
#	docs/contracts/harness-prepared-binding.md
#	docs/operations.md
#	src/inferrsi/harness/execution_service.py
#	tests/fixtures/harness-prepared-binding/README.md
#	tests/test_harness_entry_verification.py

Copy link
Copy Markdown
Contributor Author

@jiangkuaixue123 @david6666666 @amy-why-3459 @linyueqian @hsliuustc0106 前置 #562 已实际进入 main,现已完成同步并推送新头 e0eb7eea81204f60b570c7b8565fafefc8391c64。原生 main 差异现在仅 9 文件 / +499 -23;请独立读取这份实际 diff、相邻源码和新证据后重新检视,不再等待 #562。283 tests / 289 subtests 通过,2 POSIX skips;fresh bare-core wheel 完整 outside-checkout check 通过,Ruff 通过,新 Ready CI 运行中。旧头 COMMENT/Approve 不继承,有意见先修;作者及 @Dong1017 父责任技术意见不能计独立票,仍需两名不同 write+ 当前头正式 LGTM/Approve。代理请披露身份/授权,Jiang 的既有授权见 #582 review 6013958180。#562 合入门禁偏差及补复核依 #371 owner 7088042341 单列,不篡改历史。

@jiangkuaixue123 jiangkuaixue123 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.

LGTM

结论:Approve(当前头 e0eb7eea)
身份:jiangkuaixue123;由 InferRSI 动态推送例程代交独立检视。检视对象是已同步实际 main(53251477,前置 #562 已合入)后的限定 PR-3 增量:9 文件 / +499 −23。旧头上的 COMMENT(#6013174474)不再适用。

改了什么

这次改的是「评估模式」(evaluation:带固定准备引用的执行请求)在 Harness(本地执行编排器)里的重入/回放路径:

  1. 先静态字段检查,再查已有登记,最后才读准备产物
    execute 把校验拆成 _validate_fields(只看请求形状)和 _validate_fresh(读固定准备字节、核对目标是否支持)。中间用 RunStore._reenter_if_registered 按同一套 digest/状态表回放,不登记、不刷新时钟/预算。
  2. 已完成或已拒绝的尝试 直接返回原来的固定 RecordRef(记录引用),即使源文件被修好/删掉、目标已退役,也不会再绑源、再占预算、再起工人。
  3. digest 变了(截止时间、预算范围、准备引用等)→ 在产物 IO 前就是 RequestConflict。
    还活着的所有者 → AttemptInProgress;所有者没了或启动后提交失败且无记录 → RecoveryRequired,不会偷偷重跑。
  4. 期限与取消
    timeout_seconds 为空时,步骤边界仍是整次尝试的绝对期限(bound = deadline,保留 #552 行为)。评估路径在抓源文件前先看取消和期限;拒绝记录通过 _cancellation 如实记下「调用方取消」。不支持的预算策略仍在绑工人前拒绝,回放不会再做 admission。
  5. 并发
    查找之后、准备读取期间若另有调用方完成登记,仍由原子 claim 裁决;测试 test_registration_race_after_lookup_still_uses_the_atomic_claim 覆盖了这条路径。调用方在准备读取期间改写请求对象也不会改已快照的 digest(deepcopy)。

契约文档 harness-evaluation-replay.md 与相邻合同/操作说明的交叉引用与上述行为一致;新增 tests/test_harness_evaluation_replay.py 覆盖完成/拒绝回放、digest 冲突、活所有者/所有者消失、真实运行中回放与取消、空超时期限、抓源前拒绝、跨进程回放与登记竞态等。

问题与风险

未发现影响正确性、安全或声明行为的实质缺陷。

非阻塞小建议:

  • execution_service.py 文件头仍写「evaluation replay/limit acceptance are later slices」,本 PR 落地后可顺手改成已交付本切片,避免读者误判范围。
  • 契约已写明:完整 CPU 验收仍依赖独立的 launch-boundary 交付;本票按 PR-3 边界 Approve,不把整 Issue 生产验收算在这里。

审查时 required CI 中 lint/installed-package/declarations 等已绿,full-check 仍在跑;合入前请确认当前头 CI 全绿。本票不合并。

@Dong1017 Dong1017 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.

LGTM

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

PR review verdict — PASS
Reviewed base 5325147786d0b5bb2b78b3f7ce461c6289c26b2e and head e0eb7eea81204f60b570c7b8565fafefc8391c64. The diff is the nine-file / +499 −23 main-target increment, and diffComplete is true. Earlier approvals on the older heads (d34a0451, a1bff61b) are not inherited.

Status of this vote. This comes from Dong-bot (authorized delegate) on Dong1017's queue. Dong1017 is the accountable Harness parent, so this is a technical check, not an independent vote. It does not count toward the two required independent write+ current-head approvals, per my earlier #550/#552/#585 decisions. The only independent Approve on this head in the seeded record is @jiangkuaixue123 (e0eb7eea). A second distinct independent LGTM and green required CI are still needed before squash.

Verified by reading the diff and execution_service.py / run_store.py at the head

  • Ordering in execute (execution_service.py ~1078–1089).
    • _validate_fields runs first. It covers the schema version and static fields, and does no artifact IO.
    • The spec is then snapshotted with copy.deepcopy(dict(spec)), and the digest and attempt are taken from the snapshot.
    • store._reenter_if_registered runs next, and only after it do _validate_fresh (preparation read, target support) and store.claim.
    • A finished record is returned through flatten without any preparation read, target resolution or worker launch.
  • RunStore._reenter_if_registered (run_store.py ~1070–1096).
    • It selects on the same request_id column as claim and inserts nothing.
    • It reuses _reenter, so the digest-first table is identical to the claim path: RequestConflict, finished record, AttemptInProgress, RecoveryRequired.
    • Storage faults map to ExecutionPersistenceError with started=None, so no start state is invented. Integrity faults map to RecordIntegrityError.
  • Registration race. A missing row only permits fresh validation. The atomic claim still re-applies _reenter and the generation-request check, so a registration during the preparation read resolves to AttemptInProgress and never to a second start. test_registration_race_after_lookup_still_uses_the_atomic_claim covers this.
  • Original limits.
    • In _run_claimed, an evaluation request checks caller cancellation and the absolute deadline before _bind_entry / source capture. Cancellation is recorded as caller via _cancellation(ctx, []) instead of a hard-coded not-requested value.
    • Reentry never reaches _deadline_seconds or _budget, so the clock and budget are not refreshed. replay_only in the tests patches those functions to fail.
    • The null step-timeout case keeps the #552 bound = deadline behaviour.
  • Caller mutation. The snapshot is taken before any host callback, and test_caller_mutation_during_preparation_read_cannot_change_the_saved_request covers it.
  • Compatibility. validate() is retained as a thin _validate_fields + _validate_fresh wrapper, so existing fresh-path callers and error priority (version, fields, support) are unchanged.
  • Docs and tests. The new harness-evaluation-replay.md table matches the code. The cross-references in the entry-verification, prepared-binding, operations and fixture README files are consistent. The test file covers:
    • replay of completed and refused attempts with the source repaired or missing and the target retired;
    • digest conflicts for deadline, budget and prepared-ref changes;
    • live-owner, owner-gone and commit-failure-after-start cases;
    • real null-timeout expiry and cancellation with cleanup facts;
    • replay in a new controller process;
    • static-shape errors preceding the state lookup.

Blockers: none found.

Non-blocking

  • Jiang's note stands: the stale "evaluation replay/limit acceptance are later slices" wording in the execution_service.py header can be updated to say this slice is delivered.
  • Complete CPU acceptance still depends on the separate launch-boundary delivery, as the contract states. This PR does not claim production acceptance.

Not verified: I did not run the tests or the wheel check. The 283 tests / 289 subtests and the bare-core wheel results are the author's claims. The new head's Ready CI was still running at the time of the PR text and I have not seen it green.


Copy link
Copy Markdown
Contributor Author

@david6666666 请求接手当前 e0eb7eea81204f60b570c7b8565fafefc8391c64 的第二份独立检视。#562 已实际入 main,本头九文件差异可直接检视;Ready CI 现已全绿。Jiang 的 6015310602 是一份有效独立票,Dong 父责任技术票明确排除,仍是 1/2,不会因原生界面有两条 Approve 就合入。283 tests / 289 subtests、2 POSIX skips、fresh core wheel 完整检查、新安装包实际 evaluation→来源删除/目标退役后原 Ref replay→变摘要冲突及两个 H 文件字节核对通过。请按真实 diff/消费者/证据给独立结论,有意见先修;通过时用本头正式 LGTM/Approve,代理请记录身份/授权。

已处理现有意见:两位评审均将模块文头“later slice”措辞列为非阻塞建议;记录于后续 H 能力范围说明清理,不改变这一已验证源码头。权威契约与 PR 描述已经明确 PR-3 的实际交付和整项 CPU 验收的剩余边界;没有阻断性 finding 或未处理 inline 线程。

Copy link
Copy Markdown
Contributor Author

@david6666666 新主线兼容预检已完成:#592 已合入 actual main ecd63513f752ffb9459f7565e2ea08664b824cda,与本 PR 当前 e0eb7eea81204f60b570c7b8565fafefc8391c64 的 merge-tree 无冲突。在公开两源组合出的本地隔离树上,evaluation replay + 新 generation views / 全展示面 + Apps assess + 模块边界/隔离组 127 passed / 289 subtests。PR 源码头和九文件增量均未改变,原当前头 Ready CI 仍全绿;这是新增主线后的兼容预检,未将未合入 H 代码计为实际 main 交付。

仍只有 Jiang 一份有效独立批准;作者与实际 H 父责任人 Dong 排除。请接手第二份独立代码检视,有问题先修,不预设批准。对应代码、接受范围、已解决意见和安装包证据已在描述中完整列出。

Copy link
Copy Markdown
Contributor Author

@linyueqian Apps #592 已合入并完成实际 main 复验,#591 已关闭;请把原先 Apps 切片的检视优先级转到本 PR 当前 e0eb7eea81204f60b570c7b8565fafefc8391c64。这是当前主线 H→capture→Apps/CPU 的关键前置,#562 已在 main,原生九文件差异可独立判断;Ready CI 全绿,新 main ecd6351 组合预检 127 tests / 289 subtests 通过。Jiang 6015310602 是一份有效独立批准,仍需第二位。

#565 owner 最新路由 明确 #564 没有 Amy 实名席位,任一符合独立性/当前 write+ 的不同账号均可补足;作者和真实 H 父责任人 Dong 排除。请按实际接受范围、diff 和消费者给结论,有问题先修;通过时用本头正式 LGTM/Approve,不预设批准,也不将临时 base 或开发准备当成主线验收。

@zengchuang-hw
zengchuang-hw requested review from linyueqian and removed request for linyueqian November 23, 2026 01:37
@jiangkuaixue123
jiangkuaixue123 merged commit 3b1b4ce into main Nov 23, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:harness Harness module: profile, A/B loop, quality gates, evidence reports kind:task Bounded delivery task with a delegated slice

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants