Skip to content

feat(benchmark): deliver the pinned CPU evidence smoke task - #618

Merged
zengchuang-hw merged 1 commit into
mainfrom
codex/cpu-565-evidence-smoke-main
Nov 24, 2026
Merged

zengchuang-hw merged 1 commit into
mainfrom
codex/cpu-565-evidence-smoke-main

Conversation

@zengchuang-hw

Copy link
Copy Markdown
Contributor

Refs #565
Refs #371
Refs #434
Refs #569

This is the CPU-only actual-main replacement for #575. #575 was squash-merged into the temporary review branch codex/review-base-575-apps-b6904e24, not main, so that merge is retained as review history and is not treated as delivery.

Final source recorded before executing new cases: head 8c65d9e40f04ece06437271866c367e343d4a982 is one commit directly on actual main 6e7210ba31fadf0959848f570f0eeee6ababcbd8. That main contains Harness #567, Apps-only #609 (9fa32b44d51d8daedf305f033cbe8af7bfef0698) and #576. The native increment is exactly 10 CPU files, +509/−7. Nine files are byte-identical to #575's frozen CPU increment; docs/operations.md preserves current main and adds only the accepted CPU task row.

Frozen source and inputs

These pins are recorded before any final-head worker/acceptance execution:

Item SHA-256 Size
Worker and baseline-code, identical full source 0f17b902c3b90b1a75321ecc2181019a5c3084ca2bffeee775ce86aabe019903 2264 bytes
Embedded public INPUT_BYTES cca2fa85fcc1ad89b23d709ecc809786766da48cc95b5f931826ec986f0f6597 33 bytes
Correct-answer candidate b6899661828d50335325d289b9cedccdb3dbcbf5b64f094e14896c734bd9c39b 5 bytes
Wrong-answer candidate 543df89fec85b1c280e5be7bc6a33e31203503cd6edb3084312de4db5a9b436c 6 bytes
Invalid-UTF-8 candidate e4688624e5f1ad0629505e6768e3bb36244f2f3e33e751215afa820334a76ed3 2 bytes

No workload, AB/BA order, timing validity rule, threshold or claim criterion changed. Revision 1's coarse-clock correct-case samples=null result and revision 2's omitted result-validator failure remain failures in the record; neither is relabelled PASS. Historical #575/#569 approvals and temporary-branch CI do not transfer.

Scope

The standalone p1-cpu-smoke@1 worker checks exact candidate bytes against the public byte-sum reference. F is UTF-8 validity, C is exact answer equality, and M is four actual perf_counter_ns operations A1/B1/B2/A2 regardless of C, with no fill, clamp, retry, re-measure, threshold, performance-gain or model-quality claim. The task/grader pair is explicitly registered while the historical fixture path stays supported.

Final integration conditions

Run final-head tests, bare-wheel installed-package validation and Ready CI only after the pins above are on record. Resolve concrete findings. Then require the two eligible independent current-head formal Approves under #565: Amy and David by default; David is requested first, and only the recorded per-head substitute path applies if he does not review. Amy remains required unless she personally records exact-head unavailability, activating the separately accepted conditional substitution. Author, accountable owner/parent, technical-only comments and old-head reviews do not count. Required CI must remain green before squash merge to actual main.

Agent-assisted implementation preserves the commit's DCO and contributor attribution.

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>
@Dong1017 Dong1017 added area:benchmark Benchmark line: preparation ports, metric contracts, validators, and isolated workers 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

CPU 冒烟任务的审阅依据

核对了 base 6e7210ba31fadf0959848f570f0eeee6ababcbd8 到 head 8c65d9e40f04ece06437271866c367e343d4a982 的十文件差异。独立复算了 worker 源码、内嵌输入及三种候选的 SHA-256 和字节数,均与事前公布值一致。worker 按 A1/B1/B2/A2 采样;错误答案仍采样,无效时钟不会补值或重试。端到端测试分别核验格式、正确性和测量结论,也核验发布失败后保留 RecordRef,以及重放不再启动 worker。

当前提交的八项 Ready CI 检查均通过,包括两项安装包检查。本票是 Amy 席位对本次 CPU 交付的独立批准;共享生产验收与另一独立审阅席位按 #565 单独核对。

Copy link
Copy Markdown
Contributor Author

@hsliuustc0106 请按 #565 的候补决定 独立检视当前头 8c65d9e40f04ece06437271866c367e343d4a982 的 CPU worker、冻结输入、负例和安装验证。David 已先收到本头请求,目前尚未提交评审,因此本头仅请求你作为 David 席位的候补。Amy 已正式批准,Ready CI 已通过。发现问题请直接指出;独立检视通过请提交第一行为 LGTM 的正式 Approve。若 David 先完成,按原席位办理,并处理双方提出的问题。

@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 8c65d9e40f04ece06437271866c367e343d4a982, for the CPU smoke task only and for David's named #565 review seat. I reviewed the ten-file increment on actual main and independently recomputed the SHA-256 and byte counts for the worker, embedded input and all three candidates. The worker measures A1/B1/B2/A2 even when the answer is wrong; invalid timing stays incomplete rather than being filled or retried. The existing fixture pair remains supported, and the integration tests exercise separate F/C/M verdicts, failed publication with a retained reference and replay without a new worker start.

Verified all eight Ready checks, including both installed-package jobs, and the required knowledge policy on this head. I did not rerun the full suite locally. This review does not close #565, attest #609's pre-merge review, or establish production acceptance or a performance gain.

@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 6e7210ba31fadf0959848f570f0eeee6ababcbd8 and head 8c65d9e40f04ece06437271866c367e343d4a982 (first review on opened, full ten-file diff, diffComplete: true, no previous head). No blockers found. Note for the record: this head already carries two independent formal Approves — @amy-why-3459 (pullrequestreview-6036184961) and @david6666666 (pullrequestreview-6036759138) — so the seat count does not depend on this review, and Dong-bot's Approve is not an independent vote (consistent with #566 7093090941, #576 7119624655, #615 7129011872).

What I traced outside the diff
  • Accepted-pair gate is centralised, and the import exists. preparation._supported_task (src/inferrsi/benchmark/preparation.py:216-219) is the single gate used at :227 (_protocol), :286 (_prepared) and assessment.validate_assessment (src/inferrsi/benchmark/assessment.py:121); assessment.py:16 already imports preparation, so the new call site needs no new import. Unknown revisions and mixed pairs stay rejected — covered by test_unknown_or_mixed_task_versions_are_not_guessed and the mixed-pair / assessor cases.
  • The cpu-smoke protocol is accepted by the frozen P1 shape, not just by its name. _requirements (preparation.py:186-213) still demands the same four check ids with their phases and producer kinds, _recipe (:159-183) the same entrypoint fixture_worker, args, roles, capabilities and single required grader output, and _protocol (:237-259) sampling == {"order": ["AB","BA"], "repetitions": 2}, feedback_visibility == ["format"], metric_definitions == [], and the F/C/M claim rules with requires_completed_measurement/cleanup true only for M. cpu_smoke.protocol supplies exactly those; the baseline and resources pins reuse the _RESOURCE shape and _closure (:105-114) rejects duplicate roles.
  • Worker output is compatible with the existing report codec. fixture_worker.main writes json.dumps(..., ensure_ascii=False, allow_nan=False), and proofs.decode_report (src/inferrsi/benchmark/proofs.py:96-100) explicitly permits raw report whitespace, so non-canonical worker bytes are not rejected. _milliseconds output satisfies proofs._samples (proofs.py:71-79: _DECIMAL full match and Decimal(value) > 0) for every reachable value, including whole-millisecond values, because the trailing-zero strip stops at the . separator.
  • No fill, clamp or retry path. _samples times A1/B1/B2/A2 in that order — round 1 is A→B, round 2 is B→A, matching the frozen ["AB","BA"] — rejects non-int or end <= start pairs (type(...) is int also rejects bool), and returns None instead of a partial family. The single C comparison runs before the four timed operations, so a failed C never skips sampling, and an unreadable candidate yields grader: None with no C proof rather than a mathematical failure.
  • Packaging and module hygiene. The new inferrsi.benchmark.workers subpackage has __init__.py and is collected by [tool.setuptools.packages.find] where = ["src"] (pyproject.toml:21-23), so worker_source()'s files(...) read and the new tests/check_installed.py probe (unpacks prepare(...), compares recipe.code_sha256 to sha256(source), re-reads baseline-code) are reachable from the wheel. docs/apps-module-migrations.json lists the new test under both affected canonical modules (:43, :73).
Non-blocking follow-ups (no author push requested)
  1. Pin label vs delivered path. The frozen artifact location is tasks/p1-cpu-smoke/fixture_worker.py (src/inferrsi/benchmark/cpu_smoke.py:23) while the bytes actually ship at src/inferrsi/benchmark/workers/fixture_worker.py. location is excluded from protocol_digest/prepared_id (preparation.py:117-132) and _verify_resource checks size + SHA-256 only, so identity and integrity are unaffected — but [tool.setuptools.package-data] "inferrsi.benchmark" = ["tasks/**/*.py", ...] (pyproject.toml:41) makes the task path look resolvable when it is not. Aligning the label or the worker location before the acceptance pins are frozen would keep the pin self-locating.
  2. Partial-measurement semantics worth one doc sentence. _samples returns None for the whole M family when any one operation is invalid (src/inferrsi/benchmark/workers/fixture_worker.py:37). That is consistent with no-fill/no-retry and M→INCONCLUSIVE, but "makes that family incomplete" in docs/contracts/p1-cpu-smoke.md could also be read as retaining the valid rows; stating the intended choice keeps the acceptance matrix unambiguous.

Not verified here: I did not execute pytest, ruff, or either installed-package job, and I did not re-read the CI runs the two Approves cite (45355959545 / 45355958848). The PR body was not seeded in this review, so the "record exact worker/source/input pins before running acceptance cases" requirement in docs/contracts/p1-cpu-smoke.md is taken from the reviewers' checks, not mine. Nothing here establishes shared production acceptance, closes #565, or supports a performance/model-quality claim.


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

Labels

area:benchmark Benchmark line: preparation ports, metric contracts, validators, and isolated workers kind:task Bounded delivery task with a delegated slice

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants