Repository navigation
feat(benchmark): add frozen P1 preparation port - #530
Conversation
Agent-assisted-by: Codex (author) Signed-off-by: zengchuang <zengchuang3@huawei.com>
Dong1017
left a comment
There was a problem hiding this comment.
LGTM
PR review verdict — PASS
Reviewed base 4934165 and head 8980ff6. This is the first review of the full diff, which was seeded complete. There is no prior formal review and no outstanding CHANGES_REQUESTED.
Verified by reading the diff (preparation.py, tests/test_benchmark_preparation.py, docs/contracts/production-prepare.md, docs/operations.md):
- Request boundary: requests are closed-shape and version/task/operation/scope checked.
comparison_conditionsmust be{}. Request pins cannot override a frozen role's hash, format or required use (IdentityMismatch). Pins for roles that exist only as baseline/reference/quality-reference are refused. - Frozen rules: worker recipe, candidate contract, evidence rules and claim registry are checked strictly against the accepted P1 revisions. Unknown revisions give
UnsupportedRuleVersion. The constructor also requires that theworker_roleresource digest equalsworker_recipe.code_sha256. - Identity:
prepared_idexcludes itself,created_at,display_notesand the outer protocol and resource locations.protocol_digestprojects locations only on declared ArtifactRefs, so ref-shaped Parameters stay semantic.- Both are covered by tests, including relocation, an internal-location move and a Parameters change.
- Pure codecs:
encode,decodeandvalidate_preparedread no artifacts. They require canonical bytes and recheck the protocol/prepared binding, including the sha256, size and media type of the protocol ref. - Failure mapping:
- Declared rejections return a PublicError wire dict at stage
prepare. - A missing resource gives
ArtifactUnavailable. A byte or metadata mismatch givesArtifactIntegrityError. - Host-capability programming errors are not swallowed (tested).
- Streams are closed through
closing, and the returned reader accepts only roles in the preparation's closure.
- Declared rejections return a PublicError wire dict at stage
- Isolation: the frozen protocol is held as bytes and decoded per call, so caller mutation cannot change it (tested). Benchmark imports neither Apps nor Harness. Only the tests import Apps.
- Docs: they state the scope limits clearly. The H evaluation-mode path and production offline assessor stay under #429 and #434, and there is no default backend.
Not verified here:
- I did not run the tests, and no CI results were seeded.
- I did not read the governing issue or the #429/#434 context beyond what the PR text states.
- I did not independently check the
inferrsi.apps.api.prepareand archive integration beyond what the tests assert.
Optional follow-ups, not blockers:
expected_candidateis validated only after the resources are read. Moving that check earlier would give a faster rejection.- The merge ruleset still needs a second qualifying approval. This Approve is one vote.
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).
…urces Agent-assisted-by: Codex (author) Signed-off-by: zengchuang <zengchuang3@huawei.com>
|
已处理候选 metadata 校验时机建议:当前 head 审批角色说明:本 PR 的 限定交付责任人是 Dong1017。依照 独立检视规则,责任 parent 的技术审批不计独立票。因此 Dong 的 PASS 是技术检视结论,本 PR 当前有效独立审批仍为 0/2,需要 david6666666 和 amy-why-3459(或其他符合独立条件的 write+ 评审)分别提交正式结论。此角色限制针对 #430;Dong 在 #528 是独立评审,原有有效票不受影响。 @Dong1017 请复核当前增量并继续确认配置式 P1 prepare 的接口;@david6666666 @amy-why-3459 请独立检视。首个非空行单独写 |
Dong1017
left a comment
There was a problem hiding this comment.
LGTM
PR review verdict — PASS
Reviewed base 4934165 and head 3a19e5a (seeded diff complete, 4 files).
Role note: this is the accountable-parent technical/interface verdict for #430, posted by Dong-bot (@Dong1017's authorized delegate). Per docs/agent-collaboration.md a parent's review — including one submitted through this account — is not an eligible independent approval, so the PR's eligible count remains 0/2; david6666666 and amy-why-3459 still need to approve this head. This review does not substitute for either, and I am not asserting merge readiness.
Verified by reading src/inferrsi/benchmark/preparation.py, tests/test_benchmark_preparation.py, docs/contracts/production-prepare.md and docs/operations.md:
- Current increment.
_preparenow validatesexpected_candidatevia_expectation(...)before the closure loop that callsself._resources(...), so a malformed or wrong-contract expectation is refused with zero opener calls;test_request_rejections_are_wire_errors_before_any_archiveassertsopened == []and an empty archive dir for all seven cases, including the missing-field and wrong-format_schemaexpectation. The seeded patch is base..head, so I read current file state rather than an isolated 8980ff6..3a19e5a hunk; the ordering above is what I checked in code. - Request boundary. Closed shape (
_REQUEST),schema_version/task/operation/scope checked against the frozen protocol,comparison_conditionsmust be{},task_parametersre-validated by_parametersand then copied into the frozen protocol before_protocolis re-applied. A pin for an existing direct role must match on projected fields (IdentityMismatch); a pin for a role that exists only as baseline/reference/quality-reference is refused because onlydirectmay be extended. - Frozen rules and worker binding.
_recipepins recipe/entrypoint revisions, args, input roles, capabilities and the single requiredgraderoutput (UnsupportedRuleVersion);_requirementsand the claim registry are checked strictly;PreparationService.__init__requiresworker_roleto be in the closure and itsartifact.sha256to equalworker_recipe.code_sha256, then freezescanonical_encode(protocol)so later caller mutation of the dict cannot leak in (covered bytest_real_prepare_freezes_exact_supplied_bytes_and_isolates_caller_mutations). - Identity, both layers.
prepared_iddropsprepared_id/created_at/display_notes, the outerprotocol.locationand projectedresources[].artifact.location;protocol_digestdropsdisplay_notesand locations only on declaredArtifactRefpositions.test_two_layer_locations_and_ref_shaped_parameterscovers outer relocation ofprotocolandresources[].artifact(id unchanged,encodebytes still differ), an internal location change (protocol.sha256andprepared_idchange,protocol_digestequal), and a non-location field (label) changing all three. - Opener lifecycle.
_measurewraps the stream incontextlib.closingand consumes it in 1 MiB chunks, so the reader owns closing on both the normal and the mid-read failure path; the T36 test assertsall(stream.closed for stream in opened)afterprepare. The returnedread_resourceclosure refuses roles outside that preparation's closure withKeyError. - Failure boundary.
PreparationError.to_json()emits the portable PublicError wire withstage: "prepare"and emptyretained_refs/latest_record_ref; Benchmark writes nothing, so a prepare failure cannot publish a closure. Missing/Noneresources andOSErrormap toArtifactUnavailable; byte mismatch maps toArtifactIntegrityError.test_t36_resource_loss_at_each_boundarycovers loss at bothprepareandprepared_archivewithprepared_ref is Noneand an empty archive, andtest_source_change_after_preparation_is_rejected_by_independent_apps_verificationcovers post-prepare byte change being rejected by Apps' verifier. - Apps cross-check is the canonical one. The test imports
inferrsi.apps.handoff.bridge.verify_protocol(not theapps.bridgeshim) and calls it on real prepare output, plus a-Isubprocess readback that re-validates archived prepared/protocol/resource bytes against the ref digests. - #430 pending item is now closed. The wiring I asked for in the 2026-11-20 scope-acceptance comment (D023 /
t108-v4must be explicitly named) is present:docs/contracts/production-prepare.mdopens on "the accepted D023 /t108-v4task family", and the tests readdocs/contracts/fixtures/t108-v4. The limit is still stated correctly — the historical golden digest is a compatibility vector, not an available executable.
Non-blocking observations (no correction required for this head):
_measure's_require(isinstance(chunk, bytes), ...)defaults to codeInvalidRequest, so a host opener returning a text stream is reported as a request rejection rather than surfacing as a host capability bug, which sits slightly off the stated rule that host programming errors propagate. It still fails closed;test_programming_error_in_a_host_capability_is_not_a_port_rejectioncovers raising capabilities but not a non-bytes return. A distinct code or propagation plus one regression line would close the gap.- Pins are matched to frozen direct roles on projected fields, so
locationis request-settable for a frozen role by design. If Apps keys archived artifacts by logical location, one pin could point at another role's path; a one-line uniqueness assertion (or an explicit note that Apps de-duplicates) would remove the ambiguity.
Not verified here: I ran no tests — the 229/51 numbers and the Ruff/whitespace results are the author's, and required CI on 3a19e5ae is still in flight per the author's note, so nothing here should be read as green CI. I did not re-read Apps' archive internals beyond the call sites and cross-test. Merge still needs two eligible independent approvals on this head, required CI, and host-compatibility treated as advisory per #508. I'll re-read on the next @Dong1017 mention or a further DO NOT PASS cycle.
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).
Agent-assisted-by: Codex (author) Signed-off-by: zengchuang <zengchuang3@huawei.com>
|
已处理本轮两项边界建议,当前 head
当前相关 Benchmark/Apps prepare 53 passed,全仓 Ruff / whitespace 通过。原 229/330 和独立安装结果保留初始版本,当前新 CI 等待完成。@Dong1017 请复核增量;仍按责任 parent 技术意见记录,独立审批当前 0/2。 @david6666666 @amy-why-3459 请先完成可直接推进合入的 #528 第二份有效审批,再继续独立检视本 PR。 |
Dong1017
left a comment
There was a problem hiding this comment.
LGTM
PR review verdict — PASS
Reviewed base 493416520f537590eb8f2a4e74f276f82e488307 and head 73d1e446e3a877d801c7ff1377a91c3e508b75a4 (seeded diff complete, 4 files). Increment since the last head I reviewed: 3a19e5ae9dd718d3d2f4538a150bebd4242256c2..73d1e446. The seeded patch is base..head, so I read current file state (src/inferrsi/benchmark/preparation.py, tests/test_benchmark_preparation.py, docs/contracts/production-prepare.md, docs/operations.md) rather than an isolated hunk.
Role note: this is the accountable-parent technical/interface verdict for #430, posted by Dong-bot (@Dong1017's authorized delegate). Per docs/agent-collaboration.md a parent's review — including one submitted through this account — is not an eligible independent approval, so #530's eligible count remains 0/2; david6666666 and amy-why-3459 still need to approve this head. This review does not substitute for either, and I am not asserting merge readiness: required CI plus two eligible approvals still gate integration.
The two items from the last round are resolved in code, not only in the tests
- Host text-stream capability is no longer a port rejection.
_measureraisesTypeError("A host resource capability must return binary bytes.")on a non-byteschunk, and the surroundingwith closing(source)closes the handle as the exception unwinds._preparecatches only(KeyError, OSError)around the read loop andpreparecatches onlyPreparationError, so thatTypeErrorpropagates as a host programming error instead of being reshaped intoInvalidRequestorArtifactUnavailable.test_text_stream_is_a_closed_host_capability_errorasserts the exception type/message andstream.closed. - Role, not provisional location, is the byte authority.
_resource/_closurenever require distinct locations; uniqueness is enforced onroleonly (closure plusroles == sorted(set(roles))in_prepared). A pin for an existing role is accepted when_project_resource(pin) == _project_resource(direct[role]), which comparesartifact.{sha256,size_bytes,media_type},format_schemaandrequired_forbut notlocation. Bytes are opened and measured per role (self._resources(resource["role"])) against that role's own metadata, and the returnedread_resourceis keyed by role.test_provisional_locations_do_not_replace_role_authority_or_archive_pathsrepairs the case at the real Apps boundary:archive_preparedgives every sorted role its ownresource-{index}path, both readback byte values match the per-role sources, and the archived protocol still shows a single aliased location — the alias survives in the frozen protocol without affecting byte authority or archive paths.
Earlier findings: resolved, no regressions observed
Candidate expectation is still validated before any opener call (_expectation precedes the closure read loop), so the zero-read rejection cases keep holding; the request stays closed-shape; frozen rule versions are refused at PreparationService.__init__ (test_frozen_task_rules_are_not_request_parameters); identity projections, pure codecs and the IdentityMismatch self-check are unchanged in substance.
#430 acceptance points re-checked in this diff
- Two-layer relocation, including outer
resources[].artifact(Amy, 6856558760):test_two_layer_locations_and_ref_shaped_parametersrelocates the outer protocol ref and every outer resource artifact and assertsprepared_idunchanged; a location change inside the protocol keepsprotocol_digest, changesprotocol.sha256/size_bytesand thereforeprepared_id; ref-shaped Parameters stay semantic. - Canonical cross-test: the test imports
inferrsi.apps.handoff.bridge.verify_protocol(not theapps.bridgeshim) and runs it on real prepared output. - Both unavailability stages:
ArtifactUnavailableatprepareand atprepared_archive,prepared_ref is Noneand an empty archive directory in both. - Opener lifecycle: the fixture records every opened stream; T36 asserts all are closed after
prepare, andclosingcovers the error path. - #430's pending D023 hook is closed at this head:
docs/contracts/production-prepare.mdnames the accepted D023 /t108-v4family (p1-fixture@1,p1-rules@1,evaluate,p1), and the T36 fixture derives its protocol fromdocs/contracts/fixtures/t108-v4/protocol.jsonwhile binding actual code bytes, with the historical golden digest retained only as an encoding-compatibility reference. That matches the accepted scope and the body's own "不以历史 golden 摘要表示可执行文件可用" disclosure.
Boundaries re-checked: preparation.py imports stdlib plus contracts.json_v1 only — no Apps, no Harness; the request cannot supply task rules, worker or opener; input_pins cannot replace a frozen role's hash, format or required use, and a pin for a role that exists only as baseline/reference/quality-reference is refused (role in direct fails); comparison_conditions must be {}; unknown protocol/task/rule versions are refused. Only two docs files and the two new files change — no existing consumer, CI lane or frozen fixture is modified.
Not verified here
I did not run pytest, Ruff or the sdist → wheel isolation check, and I cannot see CI status for 73d1e446. The 229 passed / 330 subtests and isolated-install results in the body are explicitly version-pinned to 8980ff6e; the increment's stated coverage is 53 relevant Benchmark/Apps prepare tests plus repo-wide Ruff/whitespace. Independent approvals are 0/2 on this head.
Non-blocking follow-ups
PreparationService's docstring says the caller owns closing each opener stream, but_measurecloses the handle on the non-binary path. Closing is the right behaviour (no leak) — please align the docstring/docs sentence with it rather than change the code.test_closed_prepared_shape_rejected_even_with_recomputed_identityassignsprepared_idinsidepytest.raises, so a rejection raised byprepared_id()itself would also satisfy the test; asserting the specific rejection for at least theencodecall would keep the closed-shape intent explicit.- The new doc paragraph covers location aliasing, but not that an
input_pinsentry may rewrite a frozen role's declared location (every other projected field must match). Since the archived protocol keeps that location, one sentence would make the request-visible surface explicit.
I'll re-read on the next push or on an explicit mention; a later DO NOT PASS cycle also brings me back.
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).
Agent-assisted-by: Codex (author) Signed-off-by: zengchuang <zengchuang3@huawei.com>
|
当前 head |
Dong1017
left a comment
There was a problem hiding this comment.
LGTM
PR review verdict — PASS
Reviewed base 493416520f537590eb8f2a4e74f276f82e488307 and head a1d441ae8b758aa603b684b23b3222e23c64c750 (seeded diff complete, 4 files: src/inferrsi/benchmark/preparation.py, tests/test_benchmark_preparation.py, docs/contracts/production-prepare.md, docs/operations.md). Increment since the last head I reviewed: 73d1e446e3a877d801c7ff1377a91c3e508b75a4..a1d441ae. The patch is base..head, so I checked current file state rather than an isolated hunk. No formal APPROVED review exists on this head and there is no outstanding CHANGES_REQUESTED; my earlier PASS reviews sit on 8980ff6e / 3a19e5ae / 73d1e446 and this one supersedes them for the current head.
Role note: this is the accountable-parent technical/interface verdict for #430, posted by Dong-bot (@Dong1017's authorized delegate). Per docs/agent-collaboration.md and the #430 assignment record (6889156052), a parent's review — including one submitted through this account — is not an eligible independent approval. #530's eligible count remains 0/2; david6666666 and amy-why-3459 still need to approve this head. This is not an assertion of merge readiness.
The three items from the last round are resolved, and in code rather than only in prose
- Stream ownership is now stated where each side acts.
_measurekeepswith closing(source)around the read loop, so verification streams close as it returns or unwinds; the returnedread_resourcehands the host capability's stream straight to the caller and never closes it.docs/contracts/production-prepare.mdand thePreparationServicedocstring both split the two phases explicitly ("Preparation closes each stream it opens… after prepare, the closure's consumer (normally Apps) owns closing each stream it opens").test_real_prepare_freezes_exact_supplied_bytes_and_isolates_caller_mutationsassertsall(stream.closed for stream in opened)and the text-stream test assertsstream.closedafter theTypeError. input_pinsmay move only a provisional source location. In_prepare, a pin whose role is already in the closure must satisfyrole in direct and _project_resource(pin) == _project_resource(direct[role])—_project_resourcedropslocationand keepssha256,size_bytes,media_type,format_schemaandrequired_for, so the pin can relocate but cannot re-hash, re-type or drop a use. Pins for roles that exist only as baseline/reference/quality-reference still fail therole in directconjunct withIdentityMismatch.test_provisional_locations_do_not_replace_role_authority_or_archive_pathsshows the intended asymmetry end to end: the frozen protocol keeps one aliased location while the archived closure gets two distinct per-role paths with bytes re-read per role.- Closed shape is rejected by
encodeitself.encode→_preparednow ends with theprepared_idrecompute-and-compare (IdentityMismatch), and_preparedruns the structural checks (_objecton_PREPARED,_candidate,_recipe,_requirements, timestamp parse, sorted-unique roles) before that comparison, so a recomputed identity cannot launder a closed-shape violation.test_closed_prepared_shape_rejected_even_with_recomputed_identityrecomputesprepared_idfirst and still getsValueErrorfor all eight shapes, andtest_unsafe_location_is_rejected_by_the_encoder_itselfpins the illegal-location case to_artifact's own message instead of relying on the identity mismatch.
Also re-checked on this head
- Ordering preserved.
_expectation(request["expected_candidate"], …)plus_parameters,comparison_conditions == {}, pin validation and_protocol(protocol)all run before the_closure(protocol)read loop, so every rejection is zero-read;test_request_rejections_are_wire_errors_before_any_archiveassertsopened == []and an empty archive dir for all seven cases. - Host programming errors stay host errors. Only
(KeyError, OSError)are reshaped around_measureand onlyPreparationErrorinprepare, so the text-streamTypeErrorand the injectedValueError/CanonicalErrorpropagate as themselves;Nonefrom the capability isFileNotFoundError(anOSError) →ArtifactUnavailableatprepare, matching the docs. - Frozen configuration is decoupled from the caller's dict.
self._frozen = canonical_encode(protocol)at construction and a freshcanonical_decodeper call, so the fixture's post-constructionprotocol["task_parameters"]["label"]mutation cannot leak into the prepared bytes. - Validation hardening.
_requirements/_protocolcheckkey in expectedbeforepop, so a duplicated check or claim id yieldsUnsupportedRuleVersioninstead of a bareKeyError;recipe["outputs"] == [{…}]short-circuits before thetype(…["required"]) is boolprobe, so the output check cannot index into an empty or wrong-typed list. - D023 /
t108-v4hook (the #430 condition). The T36 fixture decodesdocs/contracts/fixtures/t108-v4/protocol.jsonand binds real code bytes through the resource capability, anddocs/contracts/production-prepare.mdnow names "the accepted D023 /t108-v4task family:p1-fixture@1,p1-rules@1" as the port's target. That is the explicit wiring #430 asked for, andtest_frozen_documentary_ids_and_pure_codec_remain_compatiblekeeps the historical vectors byte-identical. - Cross-test target.
verify_protocolis imported from the canonicalinferrsi.apps.handoff.bridge, not theapps.bridgeshim.
Not verified here / non-blocking
- I did not execute the suite, Ruff or CI. The 53-relevant-test and 229-passed/330-subtests figures are the author's; the required CI on this head is re-running and gates integration.
- Optional follow-up, not a blocker: a host capability that itself raises
benchmark.PreparationErrorwould be absorbed byprepare's handler and returned as a declared wire rejection with the host'scodestring, sincePreparationErroris aValueErrorand is not in the(KeyError, OSError)tuple. Only reachable if a host imports this module's error type to signal its own bug; the documented host-error contract is otherwise intact. - Eligible independent approvals remain 0/2 on this head; the follow-on #429 execution and #434 assess ports are out of scope for this slice.
I will re-read after the next push if anything changes.
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).
|
当前 a1d441a 的技术 PASS 及三项建议已清除记录收到。对最后的可选观察补充类型语义: 本 head 的独立有效审批仍为 0/2,等待非责任 parent 的 write+ 评审;CI 在运行。 |
Agent-assisted-by: Codex (author) Signed-off-by: zengchuang <zengchuang3@huawei.com>
|
已修复当前完整 CI 的调用方登记失败,head 本地连同 |
Dong1017
left a comment
There was a problem hiding this comment.
LGTM
PR review verdict — PASS
Reviewed base 493416520f537590eb8f2a4e74f276f82e488307 and head 0a82e7b5ad7115f1b2e81818bcf227129208e4ec (seeded diff complete, 5 files). Increment since the last head I reviewed: a1d441ae8b758aa603b684b23b3222e23c64c750..0a82e7b5. The patch is base..head, so I re-read current file state rather than an isolated hunk. No formal APPROVED review exists on this head and there is no outstanding CHANGES_REQUESTED; my earlier PASS reviews sit on 8980ff6e / 3a19e5ae / 73d1e446 / a1d441ae and this one supersedes them for the current head.
Role note: this is the accountable-parent technical/interface verdict for #430, posted by Dong-bot (@Dong1017's authorized delegate). Per docs/agent-collaboration.md and the #430 assignment record (6889156052), a parent's review — including one submitted through this account — is not an eligible independent approval. #530's eligible count remains 0/2; david6666666 and amy-why-3459 still need to approve this head. This is not an assertion of merge readiness: required CI plus two eligible approvals still gate integration.
The increment is the registration fix, and nothing else moved
docs/apps-module-migrations.jsongains exactly one consumer entry in each of two arrays:tests/test_benchmark_preparation.pyinserted aftertests/test_apps_replay.py(beforetests/test_result_delivery.py) in the first, and appended aftertests/test_apps_module_migrations.py(with the trailing comma corrected) in the second. Both positions preserve the existing alphabetical ordering of the surrounding entries, which matches the author's "保留原顺序" claim.- The registrations are motivated by real imports in the new test:
inferrsi.apps.handoff.bridge.verify_protocolandinferrsi.apps.storage.archive.read_archive_artifact/read_prepared(plusinferrsi.apps.api.prepare, already registered by the earliertest_apps_preparecoverage in the first array). - No check was weakened to get green: no change to
tests/test_apps_module_migrations.py, no new skip/xfail, no CI lane or gate edit in the diff.src/inferrsi/benchmark/preparation.pyanddocs/contracts/production-prepare.mdare byte-identical in substance to what I reviewed ata1d441ae, so the four previously-cleared findings (stream ownership, pin-limited-to-provisional-location,encodeitself rejecting closed-shape/unsafe paths, hostTypeErrorpropagation) stay resolved and are untouched by this head. - This also closes the one recorded gap from
a1d441ae— the author's reported full CI failure (Python 3.10: 1 failed, 5553 passed, 31 skipped, 672 subtests) was the missing registration, not a code defect, and the fix targets that failure directly.
Not verified here
- The seeded hunks carry three lines of context, so the array keys for the two edited blocks are not visible in
pr/diff.patch. I confirmed insertion position, ordering and shape, but the mapping of those two arrays to theapps.handoff.bridge/apps.storage.archivemodule entries rests on the author's localtest_apps_module_migrations.pyrun rather than my own inspection ofdocs/apps-module-migrations.json. - I did not run any tests. The claimed 78 passed (migration check + new Benchmark prepare + existing Apps prepare) and the Ruff/whitespace pass are the author's results; required CI on
0a82e7b5was retriggered and I have not seen it green. Green CI plus two eligible independent approvals are still the merge gate.
Optional, non-blocking
- When CI on this head completes, a one-line confirmation on this thread is enough for me; no further review round is needed unless the head moves.
I will re-read if the author pushes a new head.
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).
|
当前 head @Dong1017 按本轮技术检视的约定补这一行 CI 完成确认;head 保持不变,无待处理代码阻断。技术 PASS 保留,当前独立有效票 0/2。@david6666666 @amy-why-3459 请先完成 #528 所缺的第二份有效审批,再独立检视本 PR;满足各自两份有效 write+ 批准后按顺序集成。 |
There was a problem hiding this comment.
LGTM
PR review verdict — PASS
Reviewed base 493416520f537590eb8f2a4e74f276f82e488307 and head 0a82e7b5ad7115f1b2e81818bcf227129208e4ec.
Independent third-party second verify after Dong1017 tip Approve (always-on) on the same head. Scope: #430 frozen P1 Benchmark preparation port; tip increment registers tests/test_benchmark_preparation.py as a handoff.bridge / storage.archive consumer in docs/apps-module-migrations.json (fixes prior Ready full-check failure; no production code change vs a1d441ae…).
Verified:
- Tip diff is registration-only; preparation contract/code unchanged from prior reviewed substance.
- Local:
tests/test_benchmark_preparation.py+tests/test_apps_module_migrations.py→ passed. - Ready CI green on tip (full-check 3.10/3.11, declarations, installed-package, dashboard-browser, pr-references).
Eligibility: cursor[bot] collaborator permission is none. This Approve is technical/third-party verify only — not a write+ eligible Approver under docs/agent-collaboration.md, and not a claim that dual tip / merge-ready is satisfied. Merge still needs write+ independent Approves and steward integration (Dong tip note: parent technical verdict is not an eligible independent approval).
|
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5). CI 完成确认记在这一条上,技术 PASS 保留,head 本 head 的增量我按 diff 复核过(base 这正好对应上一轮的失败原因:新测试导入 canonical 形式化评审状态不需要再发一次:本 head 独立票仍是 0/2,不受这一行影响:#430 是本切片的负责 parent,Dong-bot(授权代理)经本账号提交的技术/接口结论按 未在本环境执行的部分:我没有重跑 CI 或 pytest,CI 结果按你补报的运行记录采信;代码与 diff 是我逐段读的。你们先 #528 再本 PR 的检视顺序由集成方安排,我不对 #528 的当前票数作判断。 |
amy-why-3459
left a comment
There was a problem hiding this comment.
LGTM
PR review verdict — PASS
Reviewed base 493416520f537590eb8f2a4e74f276f82e488307 and head 0a82e7b5ad7115f1b2e81818bcf227129208e4ec.
#430 first P1 Benchmark preparation port. Verified in benchmark/preparation.py and tests/test_benchmark_preparation.py:
- Requests are closed-shape; pins cannot override frozen resource metadata, and pins for baseline/reference/quality-reference roles are refused.
expected_candidateis checked before resource reads; declared rejections return a PublicError wire; host TypeError and other programming errors propagate.prepared_id/protocol_digestdrop outer locations, clock and display notes; encode/decode/validate_prepared are pure and do not open artifacts.- Benchmark imports only
contracts.json_v1(no Apps/Harness). The current-head increment only registers the new test as a consumer indocs/apps-module-migrations.json.
Accuracy and performance comparisons are not applicable: this port freezes and verifies configured artifacts and does not install, register or execute the worker. No outstanding CHANGES_REQUESTED on this head.
Governing Issue and delivery slice
Refs #430
Refs #371
Refs #434
Refs #490
实现 D023 /
t108-v4首个 P1 家族的 Benchmark 准备端口:冻结已配置的 task/rules、核对实际 worker/resource 字节,向 Apps 交付 PreparedEvaluation、规范协议字节和按 role 读取的资源闭包。限定交付与作者授权明确允许 Apps 作者承担此 PR;执行记录。作者为 zengchuang-hw / Codex;Dong1017 保留 #430/#434 的交付责任与接口 owner,不涉及 S3 整体 ownership。
Base
493416520f537590eb8f2a4e74f276f82e488307,head0a82e7b5ad7115f1b2e81818bcf227129208e4ec,5 个文件。此 PR 是 #430 的准备/编码/校验切片;#429 execution 和 #434 assess 分别推进,#528 的 Apps 目录合入顺序保持原计划。Changed artifacts and evidence
benchmark.preparation.PreparationService.prepare:只接受已授权配置的p1-fixture@1 / p1-rules@1 / evaluate / p1;PrepareRequest 无法替换冻结的 task rules、worker 或文件读取权限。实际 code resource 的固定摘要必须与 recipe.code_sha256 一致,prepare 时逐项验证大小及 SHA-256。encode / decode / validate_prepared和明确类型位置的两级身份投影;外层 protocol/resource 定位不影响 prepared_id,内层协议定位改变字节摘要及 prepared_id,ref-shaped Parameters 的位置仍是语义。Checks and dependencies
Windows / Python 3.12。完整 229 项、schema 和独立发行物检查实际针对初始提交
8980ff6e;当前3a19e5ae将 expected_candidate 校验前移到资源读取前,同一校验 helper 继续被纯 codec 复用,新增两项零读取拒绝回归。当前增量相关 Benchmark / Apps prepare 共 51 passed,全仓 Ruff / whitespace 通过。随后73d1e446将错误的 text-stream capability 作为宿主 TypeError 传播并验证临时 source-location 别名按 role 归档;当前相关端口 53 passed,全仓 Ruff / whitespace 通过。a1d441ae进一步明确 stream 所有权、pin 可改动的临时位置,以及 encode 本身拒绝非法形状/路径的独立断言;53 项相关回归再次通过。完整 CI 在a1d441ae发现唯一失败:新增测试未列入两个 canonical Apps 模块的 consumers(Python 3.10:1 failed、5553 passed、31 skipped、672 subtests)。当前0a82e7b5已补登记,连同迁移检查的本地回归 78 passed;没有放宽或跳过检查。当前0a82e7b5的 Ready run 44659195558 必需检查全部成功:full-check 3.10/3.11 各 5615 passed、31 skipped、672 subtests passed(各保留 1 条现有 zip warning);两项安装、浏览器与引用检查成功,两宿主 advisory 也成功,knowledge-model-policy 为 success。先前失败记录保留,原内容验证记录单列:f4fe59130727ef9f80d42ef6e416aaea10ca27b0a56b93339c72e82ae77f1879主要节点:
tests/test_benchmark_preparation.py、tests/test_apps_prepare.py、tests/test_module_boundaries.py、tests/test_target_module_import_gate.py、tests/test_first_wave_isolation_policy.py、tests/test_contracts_package.py。使用python -m pytest -o addopts= -q ... --tb=short。未修改 CI lanes 或 numeric gates。Limits and acceptance
可信宿主必须提供已审定的 P1 ProtocolV1 和实际 worker/resource capability;本 PR 不自动选择历史文档 fixture 或从 PrepareRequest 获取 task 定义。新端口会冻结/校验配置,不会安装或注册该 worker 到 Harness target,也不执行它。历史 golden 的代码摘要仅作兼容编码对照,不表示该可执行文件已经可用。现有 packaged engineering-task registry 不变。首个任务的配置说明见
docs/contracts/production-prepare.md。本 PR 验证真实 B prepare 代码与 Apps 归档消费方的 T36;T37/T40 仍依赖 #429,T35/T39/V23 离线判定依赖 #434。三端口齐备后再跑共享 CPU 生产联调。未声明模型/服务收益,#430 和 #371 的整体接受另行确认,使用非关闭关联。
保持 Ready。Dong1017 作为本切片交付责任人进行技术/接口检视;依照仓库独立性规则,其意见不计本 PR 的独立审批票。独立正式批准应来自两名非作者、非责任 parent 的 write+ 评审(请求 david6666666 和 amy-why-3459),首个非空行
LGTM。必需 CI 与两份有效批准齐备后再集成;host-compatibility 按 #508 为 advisory。