Repository navigation
feat(apps): assemble role-bound evidence capture ports - #568
Conversation
Read only current attempt sources through the Harness capability and pass bytes to an injected pure projector. Verify fixed output, report, dashboard and trace references across publication failure and original-attempt replay. Agent-assisted-by: Codex (author) Signed-off-by: zengchuang <zengchuang3@huawei.com>
Dong1017
left a comment
There was a problem hiding this comment.
PR review verdict — DO NOT PASS
Reviewed base af836963e73251622eefcf8a8a67f8ad3f4ecf12, head abc6de4ddd36a01c37187b64640e81015549bc50 (first review, no prior formal reviews or Approves seeded). This is a Dong-bot (authorized delegate) review. It is not an approval.
Blocker 1: the diff is incomplete. pr/meta.json has diffComplete: false. The seeded patch was cut off partway through src/inferrsi/harness/run_store.py. I could not see the rest of that file, the tests (including tests/test_apps_evidence_capture.py, test_harness_entry_verification.py, test_benchmark_assessment.py) or any fixtures. An approval has to cover the whole change, so I am not passing a partly seen diff.
Blocker 2: the PR contains more than its stated scope. Per the #565 decision, this PR should be only the thin Apps evidence_capture adapter, stacked on #566/#567 and merged after both. Against base af83696, the diff also adds:
benchmark/assessment.pyandbenchmark/proofs.pyharness/evidence_capture.py,entry_code.pyandprepared_binding.pyLocalCpuTarget(module_root=...), replay re-entry throughrun_store._reenter_if_registered, and new contract docs
That is the B, H, entry-verification and replay stacks. The scope decision is "merge only after both prerequisites, sync, CI and Amy+David approvals". Please either retarget or rebase onto the prerequisite branches so the diff shows only the Apps adapter, or state explicitly that this PR is meant to carry the whole stack. In that case it needs its own full review by independent reviewers.
What I checked (in the visible part of the diff):
src/inferrsi/apps/handoff/evidence_capture.pymatchesdocs/contracts/apps-evidence-capture.md.- Reads are bounded to size+1 and hash/size are re-checked.
- Streams are closed.
- Multiple sources for one role raise
IdentityMismatch. - A wrong candidate role is refused.
- Capability errors pass through with their portable code.
- It imports no Benchmark module and writes no archive or RunStore row.
EvidenceCaptureis exported fromapps.api, and the migration inventory, architecture and module-layout docs were updated consistently.- The
bound_inputsandsteps[].artifactsselection filters on attempt id, step id andstatus == "available", as the contract says.
Non-blocking, to confirm once the full diff is visible:
validate_artifact_refis imported from..storage.result. I did not verify that name exists at head.- In
_read, astror other non-bytes return fromartifacts.openis treated as a stream. A mistyped result would surface as anAttributeErrorrather than a typed error. This matches the "unknown host/type errors propagate" contract, so it is fine as long as that is intended. - The
ProofProjectordocs claim thatpreparinghappens before the worker starts. The H-side ordering is inexecution_service._run_claimed, which I did see, and it looks consistent.
Not verified: no tests were run and CI status is unknown. I did not review the truncated part of run_store.py or any of the test files.
I will re-read after the author pushes a reduced or complete diff.
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).
amy-why-3459
left a comment
There was a problem hiding this comment.
LGTM
PR review verdict — PASS
Reviewed implementation base 23fd9d6745b306670b25ffa3a6d431facb47cded (merge of #566 0ef4b078528116c45f9a2fb758b00c643adfa854 and #567 b5199316f659e3a10531d187223e8cf9db3720b5) and head abc6de4ddd36a01c37187b64640e81015549bc50 (Apps-only increment: 10 files, +541/−1). The PR target is main af836963e73251622eefcf8a8a67f8ad3f4ecf12; the main-target diff still carries those unmerged prerequisites, which were already reviewed on #566/#567.
I also read the current-head COMMENTED review 6006276369 (DO NOT PASS). Both of its blockers concern the stacked main-target diff: a truncated review snapshot, and the already-reviewed B/H prerequisite files that this branch is required to sit on. The governing #565 acceptance (7064458592) asks for a thin Apps adapter stacked on #566/#567 for review only, and forbids merging before those prerequisites. I therefore reviewed the complete Apps-only range against 23fd9d67, not the whole main-target stack as new work.
Verified against that Apps-slice acceptance by reading this increment:
apps.api.EvidenceCaptureis a thin handoff adapter: it imports no Benchmark business module, performs no grading, and writes no archive or RunStore. The injected projector's return is passed through unchanged, matching H'scapture(phase, facts, *, artifacts) -> (draft, blobs)contract.- Role selection is attempt-scoped and refuses ambiguous sources as
IdentityMismatchinstead of first/last; an absent family is passed as explicitNone. A configured candidate role that differs from H facts is refused before any byte read. - Reads go only through the supplied H capability. Ref metadata is copied before the host call; streams are bounded to size+1, closed, and independently checked against the retained size/hash. Capability refusals keep their original portable code; unknown host/type errors propagate.
- Unit tests cover the adapter boundaries; the three real pipeline cases check runtime IDs, shared RecordRef across execute/assess/trace/report/dashboard, publication-failure retention, and completed replay with zero extra capture/worker. Diagnostic worker semantics are not claimed as task/grader acceptance.
- Architecture and change necessity look sound; no redundant code or tests found. Accuracy and performance comparison experiments are not applicable for this assembly slice.
Ready lint-and-smoke, installed-package (3.10/3.11), dashboard-browser and pr-references have already passed on this head; full-check was still running when I submitted. Per 7064458592, merge #566 and #567 first, sync this branch, wait for green checks on the final head, and obtain two independent formal Approves on that head. This vote applies only to abc6de4d; a parent/author vote does not count as one of those two approvals.
|
回应当前 owner 检视:已把临时检视基线调整为 临时基线只供检视,不向它执行合入。 前置真正进入 main 后会同步并改回 main,重新获得最终头的 CI 与 Amy/David 两份有效独立批准,再 squash 到 main。已有 vs-main Ready 检查仅按原 head/测试内容保留,不伪称是同步后的最终检查。 @Dong1017 @amy-why-3459 @david6666666 请在缩小后的原生差异上复审,有意见先处理。 |
Dong1017
left a comment
There was a problem hiding this comment.
LGTM
PR review verdict — PASS (owner-boundary review by Dong-bot, authorized delegate)
Reviewed base 23fd9d6745b306670b25ffa3a6d431facb47cded (temporary review-only base) and head abc6de4ddd36a01c37187b64640e81015549bc50. The seeded diff is complete (diffComplete: true) and covers 10 files.
My earlier DO NOT PASS blockers are resolved.
- Truncated diff: the retarget gives a complete native diff, so I could read all of it, including both test files.
- Scope creep: the diff now contains only the Apps adapter, its docs, the registrations, the installed-entry probe and two test files. No B or H prerequisite files remain.
Owner boundary (verified in src/inferrsi/apps/handoff/evidence_capture.py)
- Imports are limited to
inferrsi.harness.errors.PublicErrorand..storage.result.validate_artifact_ref. There is no Benchmark business import, grading, worker start, producer sealing, archive write or RunStore write. - The projector's return value is passed through unchanged. Proof, grade and producer decisions stay with B and H.
- Role selection is scoped to the attempt.
_onerefuses multiple sources withIdentityMismatchinstead of picking a first or last one. - A configured candidate role that differs from the H facts is refused before any byte read.
- A report is only used when its attempt_id and step_id match and its status is
available. Otherwise the report is an explicitNone. - The ref is copied (
deepcopy) before the host call. Reads are bounded to size+1, the stream is closed throughclosing, and size and sha256 are checked independently. CapabilityPublicErrors keep their code. Unknown host or type errors propagate.
Registrations
- I checked
docs/apps-module-migrations.jsonagainsttest_active_consumers_use_canonical_paths_and_are_registered.evidence_capture.pyis registered as a consumer ofstorage.result, andtests/test_apps_evidence_capture.pyas a consumer of archive and artifact_reader. tests/test_apps_capture_adapter.pyimports onlyapps.apiandharness.errors, which are not inventory canonicals, so it needs no entry.evidence_capture.pyis not an inventory entry. This matches the doc claim of "no former flat-path alias".
Tests, read but not run by me
- The unit tests in
tests/test_apps_capture_adapter.pycover:- ambiguity
- foreign attempt and step
- metadata mutation by the reader
- corrupt bytes
- short reads
- preserved refusal codes
- unmasked host
TypeError
tests/test_apps_evidence_capture.pycovers three real pipeline cases. They exercise the passed, failed and publication-failure paths, and replay without capture.- The author's reported results (18 focused tests, 536 expanded tests) are unverified by me. I have not seen CI.
Non-blocking follow-ups
capture()indexesfacts["candidate"]["input_role"],bound_inputs,stepsand so on directly. A malformed H facts shape would raiseKeyError. This follows the H contract from #566, so I am not blocking on it.- A reader that returns
bytesis not size-bounded before the integrity check. It is already in memory, so this is acceptable.
Merge conditions (unchanged)
- This Approve covers the current head against the temporary base only.
- #566 and #567 must reach main first. Then sync, retarget to main, and run final-head CI.
- Fresh independent Approves from Amy and David are required on that final head. Amy has Approved the current head, and David's review is still needed.
- The real task, grader and sampler semantics stay under the separate #565 gate.
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).
* feat(benchmark): define the pinned CPU evidence smoke task Keep the documentary fixture unchanged. Grade a captured answer against a fixed public byte-sum reference, and measure actual AB/BA operations independently of correctness, without performance thresholds. Agent-assisted-by: Codex (author) Signed-off-by: zengchuang <zengchuang3@huawei.com> * test(benchmark): freeze CPU task acceptance coverage Cover actual worker sampling, independent claims, retained reference failures and original-attempt replay without changing the pinned worker, input or criteria. Agent-assisted-by: Codex (author) Signed-off-by: zengchuang <zengchuang3@huawei.com> * fix(benchmark): use the monotonic performance counter for sampling Preserve the input, operations, order and validity rules. Keep the coarse-clock run inconclusive and freeze the new source before its fixed cases. Agent-assisted-by: Codex (author) Signed-off-by: zengchuang <zengchuang3@huawei.com> * fix(benchmark): validate the accepted CPU task results Agent-assisted-by: Codex (author) Signed-off-by: zengchuang-hw <zengchuang3@huawei.com> --------- Signed-off-by: zengchuang <zengchuang3@huawei.com> Signed-off-by: zengchuang-hw <zengchuang3@huawei.com>
amy-why-3459
left a comment
There was a problem hiding this comment.
LGTM
PR review verdict — PASS
Reviewed increment abc6de4ddd36a01c37187b64640e81015549bc50 → 91ff7ee6a5c002bdb7b429e15cebd55a41e9b331 (new commit only; 10 files, +509/−7). This head is the squash merge of #569 into this branch (base codex/apps-565-evidence-capture). Its tree ec5f55131524e4f8bd0b6720608ada12f688536e is identical to the previously approved #569 head 2e203ae6f1810fe9e52f09d5c1b51f086465e93a.
This PR now carries both the previously approved Apps adapter (abc6de4d) and the pinned p1-cpu-smoke@1 task from #569. I re-read this increment rather than reusing the old #568 vote on abc6de4d.
Verified in this increment:
- Task registration is confined to
_supported_taskinbenchmark/preparation.pyandbenchmark/assessment.py, accepting only the matched pairsp1-fixture/p1-rulesandp1-cpu-smoke/p1-cpu-smoke-rules; mixed or unknown revisions are refused. cpu_smoke.pyis a configuration port over the existingPreparationService: it reads only packaged worker bytes, requires an explicitcontrol_domain, and does not import or execute the worker.fixture_worker.pymatches the recorded pin SHA-2560f17b902c3b90b1a75321ecc2181019a5c3084ca2bffeee775ce86aabe019903(2264 bytes). C is an exact-byte compare against the reference sum; a missing candidate yields no C proof; M samples A1/B1/B2/A2 independently of C with integer nanosecond conversion and no fill, clamp or retry.- Tests cover correct/wrong/invalid-UTF-8 answers, a missing candidate, invalid timing, protocol/result version refusals, resource-closure pins, and real prepare→execute→assess→replay paths, including publication failure and original-attempt replay without a second launch.
- Architecture and change necessity look sound for this Benchmark task unit; no redundant code or tests found. Accuracy and performance comparison experiments are not applicable (software handoff/evidence task; no quality or gain claims).
No review on this new head is CHANGES_REQUESTED or DO NOT PASS. Please update the PR description: it still cites head abc6de4d and an Apps-only 10-file increment, which is no longer accurate.
This vote applies only to 91ff7ee6. Do not merge into the temporary review-only base 23fd9d67. After the remaining prerequisites (#566/#567 and the rest of the recorded stack, including the separate #552 condition) reach main, sync and retarget main, wait for green checks on that final head, and obtain two independent formal Approves there. A parent/author vote does not count as one of those two approvals.
There was a problem hiding this comment.
Technical tip note (non-voting) — Ready not green on this head yet.
Reviewed tip 91ff7ee6a5c002bdb7b429e15cebd55a41e9b331 vs review-only base 23fd9d6745b306670b25ffa3a6d431facb47cded (includes Apps capture abc6de4… + CPU smoke tip move). Technical/third-party verify only.
Clean-code (preliminary): PASS on tip — Apps EvidenceCapture stays adapter-only (injected projector; H errors only); cpu_smoke pure config over owned worker bytes; assessment task/grader via _supported_task; contracts/ops/migrations/check_installed updated; tip tests cover adapter + real correct/wrong/invalid-utf8 + replay.
Holding formal Approve: tip currently has only draft lint-and-smoke + declarations (no Ready full-check/installed-package). Will re-vote when Ready greens after prerequisite merge + retarget/sync to main. Prior primary tip Approves (Dong on abc6de4…; amy on this tip) noted.
Preserve review history and keep the CPU worker on its separate delivery branch until the Apps prerequisites reach main. Agent-assisted-by: Codex (author) Signed-off-by: zengchuang-hw <zengchuang3@huawei.com>
There was a problem hiding this comment.
Technical tip note (non-voting) — tip restored Apps-only; Ready still not green.
Reviewed tip d6a319ee09808b2a721f1afb4a5c60561390874d vs review-only base 23fd9d6745b306670b25ffa3a6d431facb47cded. Tree matches prior Apps-only tip abc6de4… (cpu-smoke tip move removed). Technical/third-party verify only (cursor[bot] permission none).
Clean-code (preliminary): PASS — same Apps adapter-only slice previously checked (injected projector; H errors only; contracts/ops/migrations/check_installed; focused tests).
Holding formal Approve: tip still has only draft lint-and-smoke + declarations (no Ready full-check/installed-package). Will tip Approve when Ready greens after prerequisite merge + retarget/sync to main. Primary Dong tip Approve present on this head SHA.
Retain the independent Apps adapter and fixed-reference views over the current development baseline. Agent-assisted-by: Codex (author) Signed-off-by: zengchuang-hw <zengchuang3@huawei.com>
There was a problem hiding this comment.
cursor[bot], acting as independent third-party verify (permission none).
Tip moved after prior Ready-hold COMMENT: d6a319ee… → 28af5a83400b… (Apps-only restore + sync onto current proof/Harness prerequisites). CI event was draft-lane only (lint + declarations) — not Ready full-check.
Clean-code (preliminary): PASS on PR-vs-base Apps slice — thin EvidenceCapture adapter; no Benchmark business import; role-bound read size+1/hash; IdentityMismatch on multi-source; deepcopy facts; projector injected; contract/tests/check_installed present; no performance claim. Cpu-smoke tip move removed (good for Apps-only boundary).
Holding formal Approve until Ready full-check (and required Ready jobs) green on this head. Technical verify only — not write+/dual-tip/merge-ready. Prior Dong/amy Approves appear on older tips (abc6de4… / 91ff7ee6…); write+ tip re-Approve still needed on 28af5a83….
Checked
- Tip commits: restore Apps-only + synchronize prerequisites
- PR-vs-base (
f10c8556…):evidence_capture.py, contract, tests, migrations/api/ops
|
按 #565 的明确替补决定,本 PR 当前 head 当前验证:206 passed / 0 skips;fresh sdist → wheel 的完整独立安装检查通过。请基于当前源代码检视,有意见先处理。注意本 PR 仍指向临时只供检视的 base,不得向该分支合入;依赖真正进入 main 后会重新对齐 main、跑最终 CI 并请求最终 head 的正式审批。当前请求不宣称已满足最终合入或 #565 整体验收。 |
|
仅调整本 PR 当前 Amy 席位保持必需,未被替换。 @amy-why-3459 请检视本头或由你本人在此明确记录 unavailable;只有那之后,才按 7081206887 另行记录 Jiang 转 Amy、hsliu 填 David,两账号分别计票。Amy/David 后续实际意见都会先读并处理。 @jiangkuaixue123 请读取原生临时 review base 上的完整限定增量及消费者:Apps 薄适配(10 文件 Apps-only 增量)。已有 206 tests passed、0 skips,fresh wheel 通过。请给真实独立结论,有问题先指出;通过时当前头正式 Approve 首个非空行单独 这次是依赖整合前的窄切片检视。当前 base |
jiangkuaixue123
left a comment
There was a problem hiding this comment.
LGTM
审查身份:jiangkuaixue123(按 #565 7080299417 / 本 PR 评论 担任 David 席位候补的独立检视;本人账号、非 bot)。
改了什么
本 PR 在 Apps(应用侧宿主装配)加了一层很薄的 证据采集适配器 EvidenceCapture:按事先配置好的「候选输入角色 / 报告角色」,只通过 Harness(H,执行与记录层)已经授权的引用去读字节,再交给外面注入的 纯投影函数(projector:只根据字节和快照拼证明草稿,自己不写盘、不打分)。
具体包括:
- 新模块
apps/handoff/evidence_capture.py,并从apps.api导出 - 合同文档
docs/contracts/apps-evidence-capture.md,以及迁移清单 / 架构 / 模块布局 / 运维说明的同步 - 适配器单元测试
tests/test_apps_capture_adapter.py,以及端到端探测tests/test_apps_evidence_capture.py(含发布失败仍保留同一 RecordRef、重放跳过采集) tests/check_installed.py确认安装后能拿到EvidenceCapture
对照合同与实现:适配器本身 不 import Benchmark 业务模块、不做 grading、不写 archive / RunStore;结果原样回传 projector 的返回值。
问题与风险
未发现会影响正确性、安全或已声明行为的实质缺陷。抽查要点:
- 角色选择绑定当前
attempt_id/step_id;多源一律IdentityMismatch,缺席传显式None,不会偷用别次尝试的产物 - 候选角色与 facts 不一致时,在任何字节读取之前拒绝
- 读流按
size+1封顶、关闭流,并独立核对 hash/size;能力拒绝保留原 portable code;未知编程错误原样抛出 - 对 facts / ref 做 deepcopy,避免调用方或 reader 篡改权威元数据
validate_artifact_ref在当前 head 的apps/storage/result.py中存在,导入成立
非阻塞说明(合入边界,不是代码缺陷):
- 当前原生差异是相对 临时 review base
codex/apps-565-capture-base(f10c8556…)的 Apps-only 10 文件增量;不要向该临时分支合入 #566/#567真正进入 main 后,需要改靶 main、同步、对最终 tip 重跑适用 CI,并重新取得两份有效独立批准;本批准不继承到未来 tip,也不宣称满足 #565 最终合入条件
结论
在当前 head 28af5a83400b36197f703b78e4003f2b1f0ced29 上,针对这份可独立判断的 Apps 薄适配切片:批准(APPROVE)。理由是实现与合同一致、边界干净、关键失败路径有测试覆盖,且没有阻塞性正确性/安全问题。
|
已核对 6014878636:Jiang 对当前 身份/授权的精确依据是 维护者 standing delegation 6013958180,允许其已披露的独立代理对请求的仓库 PR 实际检视、Approve/Request changes。GitHub User 类型/非 GitHub Bot 不被用作“真人手工检视”的证明;此票按已授权的独立账号与实际审查证据核验。同一账号只计一票,未将内部作者会话自检当作外部检视。后续依赖实际合入后改靶 main、同步,再求新最终头独立两票与 CI。 |
|
Codex / Apps integrator,按用户本次扩大 committer 检视请求同步。 @amy-why-3459 @Bounty-hunter @david6666666 @Dong1017 @jiangkuaixue123 @linyueqian @hsliuustc0106 刚核对到本 PR 在 2026-11-23 03:36:56 UTC 以 head 我保留原源码、检视与合入历史,在 #565 把 Apps 切片记为“临时 base 已合入、实际 main 未交付”。#566/#567 实际进入 main 后,会把独立 Apps 增量整理到届时 main 的新 Ready PR,重跑相关/安装/边界检查并重新请求最终头的独立检视;旧头/临时 base 的批准不自动继承。此已合入 PR 无法重新发原生 review request,因此先在此 @ 各位,并在替代 Ready PR 发布时正式请求。#575 仍只作临时 base 窄检视,实际主线前置与禁止向临时 base 交付的边界保持。 |
|
Accepted. #568 合入只记为临时 review base 已合入;main 仍未交付;#565 未验收。 Dong-bot(authorized delegate)按当前 body、thread 与正式 review 记录以下条款:
非阻塞后续:替代 Ready PR 发布后,对该最终头单独复读。本记录不预批准该头。 |
Refs #565
Refs #371
Apps can now assemble H's evidence-capture callback from configured candidate/report roles and an injected pure B projector. It reads only H-authorized bytes and keeps published output, assessment, report, Dashboard and trace on the original fixed references.
Authority: Apps-only delegation. zengchuang-hw / Codex authors this slice; Dong1017 retains the accountable-owner role, which cannot count independently. Reviewer substitution is limited by 7080299417.
Current review unit: head
28af5a83400b36197f703b78e4003f2b1f0ced29, temporary combined B/H review basef10c8556edab0438c225ecf85fb24d754c2c7c3f. The native increment remains 10 files +541/−1. The base preserves the exact current B #5662b221448and H #5670668f968source and inherits main's #552 correction. Do not merge into the temporary base. After B/H actually integrate, sync and retarget main, then obtain final-head CI and two eligible independent formal approvals before squash there.Current review: Jiang's 6014878636 independently approves this exact review-only head as the recorded David-seat substitute, with a valid
LGTMfirst line and current write permission. Amy's required approval is pending. The temporary-base approval does not carry to the future synchronized main tip or establish final #565 acceptance. Retarget to main before pushing the post-dependency synchronization so the correct Ready event runs.Behavior
apps.api.EvidenceCapture(project, *, candidate_role, report_role)delegates throughapps/handoff/evidence_capture.py; no B business import, grading, producer sealing, archive write or RunStore write.Validation
abc6de4dhad broader CLI/plugin/host compatibility results (536 passed / 7 skipped); those remain bound to that content. Final main-target CI and integrated acceptance will be refreshed after dependencies.Separate CPU delivery
#569 was merged into this review branch only, not main. A normal inverse commit at
d6a319eerestored Apps-only scope without rewriting history; the current source increment is still Apps-only. The unchanged CPU worker/profile is delivered separately by #575. Its worker/input pins and both failed historical attempts remain recorded there. No whole-Issue or service-gain acceptance is claimed; #371/#429/#430/#434/#565 stay open.@amy-why-3459 @david6666666 please independently review the complete Apps increment; @Dong1017 please re-read the owner boundary.
Current accepted review seats (governing #565): Amy and David are the defaults. Under 7080299417, hsliuustc0106 is the recorded conditional substitute for David when David has not reviewed that head. Under 7081206887, jiangkuaixue123 may replace Amy only after Amy herself explicitly records on this PR that she cannot review the exact final head. Silence is not unavailability; a decision on an older/temporary-base head does not carry over. The two seats require distinct eligible independent accounts, formal current-head APPROVED reviews beginning
LGTM, required CI and actual main dependencies. Author/owner/parent and technical-only votes do not count. This paragraph states the accepted conditional rule; Amy has not been replaced.