Repository navigation
feat(harness): bind generated candidates to fixed evaluation attempts - #621
Conversation
Agent-assisted-by: Codex (author/integrator) Signed-off-by: zengchuang <zengchuang3@huawei.com>
amy-why-3459
left a comment
There was a problem hiding this comment.
Codex, acting for @amy-why-3459.
候选文件在注册前的校验会额外构造两份完整内容,见行内意见。
| "evaluation does not use the original retained candidate") | ||
| _require(item["snapshot_format"] == "file-v1", "unsupported generated candidate snapshot", | ||
| "UnsupportedRuleVersion") | ||
| _read(store, candidate) |
There was a problem hiding this comment.
Codex, acting for @amy-why-3459.
这里仅需校验候选的大小和摘要,_read 返回的内容会被直接丢弃。但 RunStore.open() 已把完整对象放入 BytesIO,_read 又保留所有 1 MiB 分块,并在返回前 join 出另一份完整候选。对于较大的合法候选,仅这次注册前校验就可能额外占用约两倍文件大小的内存。建议给候选提供只累计长度和 SHA-256 的校验路径,逐块释放;需要解码或比较内容的 plan 再收集字节。保留损坏候选在注册前被拒绝的测试。
Agent-assisted-by: Codex (author/integrator) Signed-off-by: zengchuang <zengchuang3@huawei.com>
|
已按 Amy 的行内意见更新当前头 |
amy-why-3459
left a comment
There was a problem hiding this comment.
LGTM
Codex, acting for @amy-why-3459.
PR review verdict — PASS
审阅范围与验证依据
已审阅 base 5a303ca4 到 head 3b80fee0 的 8 个文件,并对照 #584 的授权范围。首次评估按固定版本读取生成记录,核对原始时限、预算范围、候选引用和实际字节;已登记请求先走重放或冲突处理。回归覆盖了两次读取之间候选变化、历史记录缺失和发布失败后重放。上一轮提出的内存问题已修复:候选校验逐块累计长度和 SHA-256,只有需要解析或比对的 plan 才保留分块。
已核对该提交的 CI run 45376660559:Python 3.10/3.11 全量检查和安装包验证均通过。本次批准针对 #621 的同一 RunStore 本地 CPU 评估改动。
david6666666
left a comment
There was a problem hiding this comment.
LGTM
Dot, acting for @david6666666 (repository admin) under delegated independent InferRSI PR review and approval.
PASS — reviewed 3b80fee0df28d0a2d876bc45990c91bfc1feca6e against 5a303ca4f9f3d1b1f24f8a1b5bef68b4a327f735 for the accepted #584 slice. Fresh admission binds the exact same-Store sealed generation, original deadline and budget scope/policy, and frozen candidate role before registration. Registered requests still replay first. The follow-up hashes the candidate in bounded chunks without keeping or joining them, addressing the prior review finding; the underlying Store still supplies a buffered reader.
Verified all eight Ready jobs and the required knowledge policy status on this head, including the Windows and macOS advisory results. I reviewed the regression coverage and installer evidence but did not rerun the tests or the reported real CPU case locally. This verdict is for the Harness lineage slice, not shared #371 or hardware acceptance.
Dong1017
left a comment
There was a problem hiding this comment.
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 5a303ca4f9f3d1b1f24f8a1b5bef68b4a327f735 and head 3b80fee0df28d0a2d876bc45990c91bfc1feca6e (8 files, +932 -11), the #584 same-Store lineage slice.
State note: #621 is already merged at this exact head (2026-11-24T12:37:01Z), with independent current-head Approves from @amy-why-3459 (6037999714) and @david6666666 (6038090650) and no outstanding changes requested. This review records the technical check of 3b80fee0; it does not change merge state and does not count as a third independent vote.
Verified in the diff
- Prior inline finding resolved. Candidate integrity now streams:
generation_lineage._read(..., collect=False)accumulates size and SHA-256 over 1 MiB chunks without retaining or joining them, and_sourceverifies the candidate withcollect=False. Generation-plan bytes are still collected, because they are decoded and compared against the captured copy — the split Amy's inline ask allowed, per the author's 10:38Z reply. New regressiontest_large_candidate_integrity_check_does_not_collect_content(3 MiB + 17 bytes) asserts no content is returned; the corrupt/missing-candidate refusals before registration are retained. - Ordering holds.
execution_service.executecallsstore._reenter_if_registeredbefore_validate_fresh(execution_service.py:1185-1188), so a registered request replays or conflicts with no fresh lineage read;_validate_freshreturnsgeneration_lineage.authorize's_CaptureReader, and that router is the reader used for capture (:1211). Publicvalidate()passes no store, so non-null lineage still refuses withUnsupportedOperation(:490-493) — matchingdocs/contracts/generation-lineage.md. - Refusals stay pre-registration:
authorize()re-raises withstage="validate",started=False, preserving code plus retained/field errors;OSErrormaps toArtifactUnavailable, malformed metadata toArtifactIntegrityError. - The new module's contract expectations line up with the accepted bounds slice: foreign-Store refs are rejected against
run_store.record_location(run_store.py:148), the sealed snapshot's field set matches_BOUNDS_FIELDS(:72-75), and_time's nanosecond split matches_is_timestamp's 1–9 fractional-digit grammar (:197-205), so the original-vs-evaluation deadline comparison cannot truncate. - Referenced helpers exist as used:
run_store._has_fields/_is_id/_is_timestamp,prepared_binding._is_path/_is_sha256/_is_definition(prepared_binding.py:85-105). - Docs and catalog:
docs/contracts/generation-lineage.mdis new,generation-bounds.md's blanket refusal now points at that profile,docs/operations.mdadds the effect-class row, anddocs/apps-module-migrations.jsonadds the new test to both consumer lists it actually imports (apps.storage.archive,apps.storage.artifact_reader).
Not verified here: I did not run the suite, the real CPU case, or the installed-wheel check; CI evidence is the seeded approvals (Amy's run 45376660559) and the PR body. David's recorded residual still stands and is non-blocking: RunStore.open hands back a buffered BytesIO, so only the extra join/copy is gone, not the store-side buffer.
Governing issue and delivery slice
Refs #584
The Harness owner’s accepted scope allows a distinct CPU evaluation attempt to consume the candidate retained by a successful generation in the same RunStore. The implementation delegation is to zengchuang-hw / Codex. All source prerequisites, including #609 and #618, are on the actual base
5a303ca4f9f3d1b1f24f8a1b5bef68b4a327f735. This PR carries the Harness slice independently of the Apps CLI adapter in #620.Anchors touched A1 and A5, within the existing #584 contract. Harness reads the fixed generation revision and original bounds, binds the retained candidate artifact to its pre-sealed plan role, and rechecks bytes. Validation preserves the original overall deadline and budget scope. Registered requests take the existing replay/conflict path first. The existing ordinary-path and argument checks from #617 are preserved. The original worker and grading rules stay with Benchmark.
Verification
Two independent current-head formal LGTM approvals and required green CI precede squash. The author and the accountable Harness owner are excluded from those two seats. Issue acceptance remains with the Harness owner.
Knowledge authorship declaration