Skip to content

feat(apps): capture frozen CPU evidence from the evaluation CLI - #620

Merged
zengchuang-hw merged 1 commit into
mainfrom
codex/apps-599-production-capture
Nov 24, 2026
Merged

zengchuang-hw merged 1 commit into
mainfrom
codex/apps-599-production-capture

Conversation

@zengchuang-hw

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

Copy link
Copy Markdown
Contributor

Governing Issue and delivery slice

Refs #599

Apps implements the accepted opt-in CLI composition. All source prerequisites are on main, including the CPU delivery in #618. Base 5a303ca4f9f3d1b1f24f8a1b5bef68b4a327f735, head 6fa2078e282b0e5297b6147e28fe054dde6b0f7c.

Anchors touched: A1, A4, A5, A6 (implementation of existing assembly, grading and execution boundaries).

Change and verification

  • evaluate execute --capture-evidence uses the frozen Benchmark projector and the existing Apps/Harness capture adapter. Role selection and projection happen inside the fresh capture callback. Existing requests, configuration schemas and the default execution identity stay compatible.
  • The CPU tests cover correct, wrong, invalid UTF-8 and missing candidates, with independent format, correctness and measurement verdicts. They check fixed references through status, trace, report and dashboard, replay after publication failure, and zero new capture on conflicts and registered attempts.
  • On the seven-file tree prepared against the merged feat(benchmark): deliver the pinned CPU evidence smoke task #618, all 233 focused CLI, CPU, capture, migration and proof tests passed. Ruff and whitespace checks passed. The local Git tree and published source tree are identical. All 16 installed-launcher cases passed on this tree: correct, wrong, invalid UTF-8 and missing candidates through each of the wheel, Codex, WorkSwarm and DSH launchers. Each case ran prepare, execute, offline assess and fixed views in separate processes, then replayed the saved attempt after removing the sources. The core wheel built from the sdist also passed the repository’s outside-checkout installed-package check.
  • A genuine generated candidate depends on the separate Harness lineage delivery in feat(harness): bind generated candidates to fixed evaluation attempts #621 (Refs task: Harness generation lineage for production evaluation attempts #584). Final shared three-host acceptance remains with task: Apps 应用层详细设计与迁移计划(CLI / Python / Plugin) #371. This PR makes no performance claim.

Two eligible, independent current-head LGTM approvals and required green CI precede squash. The Apps owner will verify the merged increment and record completion on the issue.

Knowledge authorship declaration

{
  "schema_version": 1,
  "head_sha": "6fa2078e282b0e5297b6147e28fe054dde6b0f7c",
  "human_only": false,
  "material_ai_authors": [
    {
      "tool": "Codex",
      "model_id": "unknown",
      "effort": "unknown",
      "role": "author"
    }
  ]
}

Agent-assisted-by: Codex (author/integrator)
Signed-off-by: zengchuang <zengchuang3@huawei.com>
@Dong1017 Dong1017 added area:apps Apps line: CLI, Python entrypoints, host inspection, workflows, views, and adapters kind:task Bounded delivery task with a delegated slice labels Nov 24, 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
Codex, acting for @amy-why-3459.

PR review verdict — PASS

复核范围与验证

已核对 base 5a303ca4f9f3d1b1f24f8a1b5bef68b4a327f735 至 head 6fa2078e282b0e5297b6147e28fe054dde6b0f7c 的七文件差异及 #599 的验收范围。仅 execute 接受采集开关;投影器在 Harness 为新尝试调用采集回调时创建,并从已验证的冻结元数据读取候选和报告角色。回归用例覆盖重放、冲突、进行中的尝试及发布失败后的恢复,核对固定的记录引用,并在不应重新执行的路径上禁止再次启动 worker 或构建投影器。

当前提交的 Ready CI 已通过。本次批准覆盖 Apps CLI 的 CPU 证据采集;生成候选的血缘验证与三宿主集成分别由 #621 和 #371 跟踪。

@Bounty-hunter Bounty-hunter 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.

deepseek-v4.1-flash (agent), acting for @Bounty-hunter.

Interim review note — no formal vote. I reviewed 6fa2078e against base 5a303ca4 (main), as a static read of the diff and the cited head files.

Verified:

  • --capture-evidence is added only to evaluate execute; _execute_ports receives it as host assembly, and AppsExecuteRequest, StorageConfig and the runtime-config schemas are untouched, matching the accepted #599 scope.
  • PreparedCapture.__init__ only deep-copies storage. read_prepared, the protocol read and ProofProjector construction sit inside capture(), which H invokes only for a fresh attempt; the added replay, conflict and in-progress tests assert zero projection, capture or worker.
  • Role names come from validated prepared metadata (candidate_contract.input_role, recipe.outputs[0].role), and preparation._recipe pins outputs to the single grader entry, so the [0] access is backed by the frozen validator.
  • ProofError is translated to PublicError at evidence_capture, preserving H's zero-start refusal for a declared projection error.
  • The new tests cover correct, wrong, invalid-UTF-8 and missing candidates, fixed references through status/trace/report/dashboard, registered replay, conflict, live attempt, publication failure before and after publication, and the execute-only flag.

Not verified:

  • I did not run the tests; the "233 focused tests" and "local Git tree and published source tree are identical" claims were not recomputed.
  • At review time full-check (3.10) was still in progress. full-check (3.11), both installed-package checks, declarations, lint-and-smoke, pr-references and dashboard-browser had passed.

Optional, not blocking: the PR body says the repeated installed-launcher checks "will be linked here" — update it once recorded. In production_capture.py, prepared["recipe"]["outputs"][0] relies on the single-output invariant; a one-line comment pointing at the validator would make that explicit (the validator already enforces it).

Stop check: PR #620, governing #599 and ancestors #371/#362 have no bot:stop and no active stop comment.

Scope: static diff and affected-source read on this head; no execution and no test run.

@Bounty-hunter Bounty-hunter 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.

deepseek-v4.1-flash (agent), acting for @Bounty-hunter.

PR review verdict — PASS (non-voting patrol follow-up; the formal vote stays with the account's formal reviewer).

Evidence on unchanged head 6fa2078

This follows my earlier interim note on the same head and the independent approval at 6037150963. All check runs for 6fa2078e282b0e5297b6147e28fe054dde6b0f7c are now green, including full-check (3.10) (success, finished 09:59:17Z), which that note left in progress, full-check (3.11) (09:52:39Z), both installed-package lanes, declarations, lint-and-smoke, pr-references, dashboard-browser and the advisory host-compatibility lanes; the knowledge-model-policy status is success. The ready-lane run linked in that approval (45367280089) is on this same head.

Static findings are unchanged: --capture-evidence exists only on evaluate execute; replay, conflict and in-progress requests return before _run_claimed, so PreparedCapture.capture and any projector or worker construction are fresh-attempt only; role names come from the validated preparation (candidate_contract.input_role, the single recipe.outputs[0].role); and a ProofError becomes a PublicError whose code is in H's fatal-config set, so the record keeps the zero-start refusal (exit 3, started: false).

Not verified: I did not execute the test suite locally, so the "233 focused tests" count and the local/published tree-identity claim were not recomputed.

Scope: static re-read of the seven changed files plus check-run and status reads on this head; no execution.

@david6666666 david6666666 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
Dot, acting for @david6666666 (repository admin) under delegated independent InferRSI PR review and approval.

PASS on 6fa2078e282b0e5297b6147e28fe054dde6b0f7c for #599's bounded CLI composition. I reviewed the seven-file diff and traced the switch from evaluate execute to H's fresh capture callback. The adapter reads frozen role metadata and delegates projection to B; it does not change saved requests or rerun capture for registered attempts. The regression definitions cover independent F/C/M outcomes, fixed views, replay and a publication failure without losing the original reference.

Verified all eight Ready jobs, including installed-package jobs, and the required policy result on this head. I did not rerun the full suite locally. This does not cover generated-candidate lineage (#621) or merged three-host acceptance (#371).

@zengchuang-hw
zengchuang-hw merged commit 69ccadc into main Nov 24, 2026
12 checks passed

@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 5a303ca4f9f3d1b1f24f8a1b5bef68b4a327f735 against head 6fa2078e282b0e5297b6147e28fe054dde6b0f7c (7 files, seed diff complete). No blocking findings.

Seat first. This head already carries two independent current-head formal Approves — @amy-why-3459 (6037150963) and @david6666666 (6037578062) — so #599's gate of two eligible LGTMs plus green CI is met without this review. @Bounty-hunter's two reviews on this head are COMMENTED patrol notes, not votes. Per the #599 records (by-hand comments there, plus the #597 body that excludes this account as the slice's accountable parent), a Dong1017/Dong-bot check is comment-equivalent and not an independent vote: the two qualifying votes above stay the only ones. This Approve is therefore a Dong-bot (authorized delegate) technical record on 6fa2078e, not a third vote.

Verified in the diff

  • --capture-evidence is registered only for the execute action (src/inferrsi/apps/cli/evaluate.py:30-32) and reaches _execute_ports as host assembly (:185-186); no field is added to the saved request, StorageConfig or runtime config.
  • The adapter is constructed outside the callback and injected at call time (evaluate.py:116-126 → src/inferrsi/harness/api.py:18-26,47-56), so the flag stays opt-in and #597 identities are unchanged when it is absent.
  • Every read sits inside the callback: read_prepared, the protocol read through ArtifactReader.open (returns BytesIO, context-manager safe), then ProofProjector(prepared, protocol), whose __init__ runs preparation.validate_prepared, all before any role name is read (src/inferrsi/apps/handoff/production_capture.py:17-36, src/inferrsi/benchmark/proofs.py:186-191). Role derivation is not guessed: _recipe pins outputs == [{role: "grader", …}] (src/inferrsi/benchmark/preparation.py:179-183) and _candidate pins input_role: "candidate" (:38-44,154-156).
  • ProofError → PublicError(code, stage="evidence_capture") keeps H's structured refusal; the new test asserts exit 3, started: false, process_outcome: not_started with the RecordRef retained for InvalidRequest, UnsupportedSchema and UnsupportedRuleVersion.
  • Regression coverage matches the accepted #599 clauses: registered replay, changed-digest conflict and a live in-progress claim never build a projection, recapture or start a worker (each monkeypatched to fail); late opt-in on a registered attempt returns the original checks; publication failure before and after publication keeps the released ref and never reruns; four candidate classes give distinct F/C/M; the flag is rejected on prepare/assess (exit 2).
  • Bookkeeping holds: production_capture.py and tests/test_apps_production_cli.py are registered in docs/apps-module-migrations.json, tests/check_installed.py pins the execute-only help flag, and the new contracts/p1-cpu-smoke.md link resolves (docs/contracts/p1-cpu-smoke.md exists on this head).
Not verified here, and scope limits
  • I did not execute the suite, the installed-package lanes, or read the check runs myself. The "233 focused tests" and all-green claims (both full-check lanes, installed packages, declarations, knowledge-model-policy, Ready run 45367280089) come from the seeded prior reviews and the author, not from my own run.
  • zengchuang-hw's #599 thread reports this head squashed as 69ccadc6; if that holds, this review is a record on the reviewed head only.
  • Scope is the P1 single-output CPU CLI composition. Generated-candidate lineage stays #621; merged three-host acceptance and any service/performance claim stay #371. Nothing here is a performance or acceptance claim.

No blocking findings, so no author push is requested.


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

Labels

area:apps Apps line: CLI, Python entrypoints, host inspection, workflows, views, and adapters kind:task Bounded delivery task with a delegated slice

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants