Skip to content

fix(benchmark): require successful P1 measurement checks - #649

Merged
Dong1017 merged 2 commits into
InferMatrixLab:mainfrom
Inference1:p1-measurement-check-status
Nov 25, 2026
Merged

Dong1017 merged 2 commits into
InferMatrixLab:mainfrom
Inference1:p1-measurement-check-status

Conversation

@Inference1

@Inference1 Inference1 commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Governing Issue and delivery slice

Refs #595

Group 5 / B1 updates the offline fixture-assessor@1 evidence gate under the accepted scope and delegation.

Anchors touched: none.

Problem

A fixed record can report a failed samples or cleanup check while retaining a complete sample sequence or confirmed: true. The assessor validates those payloads and currently admits them as positive evidence. Claim M can incorrectly become PASS, making the assessment eligible.

What changed

Require a successful record check for positive samples and cleanup evidence. When an otherwise valid record contains this mismatch, M is INCONCLUSIVE, eligibility is unknown, and inferrsi evaluate assess returns exit 9 with M as the primary claim. An out-of-enum recorded status follows the existing incomplete-check path, including when the retained value is a JSON array or object.

Why needed

Eligibility is used to decide whether a retained measurement can support a comparison. A failed producer check leaves an unresolved measurement condition even when the retained bytes are readable and well formed.

Design and implementation

The existing Benchmark proof loop now checks the recorded status after validating the payload. It uses the existing invalid-evidence path and keeps the artifact available for audit. Matching negative F and C proofs still support their own FAIL results. Unconfirmed cleanup remains visible to the missing-evidence and conflict rules. The saved-request CLI retains the original record and a stable reassessment identity.

Cleanup conflict detection compares admissible proofs. When a failed check retains confirmed: true alongside a valid confirmed: false proof, the failed positive is rejected. M is INCONCLUSIVE, cleanup is missing and P1 eligibility is unknown. A positive proof from a passed check paired with a valid unconfirmed proof still produces conflicting_evidence and ineligible. Review follow-up

Knowledge authorship declaration

{
  "schema_version": 1,
  "head_sha": "8cc88e9c85372b732fe9d80a878e38bea854a843",
  "human_only": false,
  "material_ai_authors": [
    {"tool": "OpenAI Codex", "model_id": "gpt-6.2-sol", "effort": "max", "role": "author"}
  ]
}

Changed artifacts and evidence

Artifact Coverage
src/inferrsi/benchmark/assessment.py Require a successful check for positive P1 measurement evidence.
tests/benchmark/test_benchmark_assessment.py Verify both check types, duplicate checks in either order, cleanup conflicts, and independent F/C verdicts.
tests/apps/test_apps_evaluate_cli.py Verify exit 9, assessment archival, stable reassessment identity, and read-only replay.

Checks and dependencies

  • Synced the two commits onto upstream main 68d71c53c1b4 and applied the test changes at their paths after #630. The resulting diff contains three files.
  • All 12 selected regressions failed against the unpatched base and passed with the candidate. Linux CPython 3.13 passed 238 tests and 43 subtests covering assessment, the Apps CLI, production CPU capture, module boundaries and architecture anchors. Ruff and git diff --check passed.
  • The full Linux CPython 3.13 source suite passed 7,494 tests and 675 subtests, with 86 skips. A focused baseline/candidate probe verified both cleanup proof combinations.
  • A wheel built from the signed candidate passed the clean-install check outside the checkout on Linux CPython 3.13.
  • Upstream's Windows verification passed 139 cases on the preceding trial merge.
  • The Group 5 prerequisite #575 is merged. #693 confirms that benchmark/assessment.py is outside the session runtime import closure, so the B1 change requires no additional session fixture or paired-wheel record.

Remaining work and Issue closure

This change delivers B1. #595 remains open for its other groups. Integration requires green checks, a clean merge and two independent write-access Approves on the same head.

@Dong1017 Dong1017 added kind:task Bounded delivery task with a delegated slice area:benchmark Benchmark line: preparation ports, metric contracts, validators, and isolated workers labels Nov 25, 2026
@Dong1017

Copy link
Copy Markdown
Collaborator

Codex, acting for @Dong1017.

@Inference1, the accepted B1 scope is ready for your draft to be refreshed. #630 has merged. GitHub currently reports #649 as conflicting, and the two tests you changed now live at tests/apps/test_apps_evaluate_cli.py and tests/benchmark/test_benchmark_assessment.py. Could you bring the draft onto current main, rerun those suites, and request reviews on the updated head?

The Group 1 worktree's derived runtime closure excludes benchmark/assessment.py. With the current three-file B1 scope, #649 does not require a separate session fixture or paired-wheel check. We will recheck that against the Group 1 PR's published closure.

@Dong1017

Copy link
Copy Markdown
Collaborator

Codex, acting for @Dong1017. @Inference1, I checked the draft against the live main at fbddabaa85166d695ab3d08ff5a6231d576bbd51. The exact draft head cacfa0d68b0fddcbbba95e33e48facd5607c9930 merges cleanly locally, including both test-file moves. The three-file merge tree is 9c72568a39af951a3bf6154baef5b2232f3be547. GitHub's earlier DIRTY result was based on the older reported base c159b9ca.

  • Both Windows source suites on that merge: 139 passed (tests/apps/test_apps_evaluate_cli.py and tests/benchmark/test_benchmark_assessment.py).
  • The 12 selected new cases reproduced on the live main source: failed measurement evidence was accepted, or a malformed check raised TypeError.

Please use this result when syncing the existing draft and requesting review.

Use a successful recorded check to admit positive sample and cleanup proof.
Keep evidence gaps, independent claim verdicts, and CLI archival auditable.

Agent-assisted-by: OpenAI Codex (implementation and regression tests)
Signed-off-by: Inference1 <3617237115@qq.com>
Treat malformed recorded check statuses as an evidence gap during offline assessment.
Cover arrays and objects at the saved-request CLI, including archival and replay.

Agent-assisted-by: OpenAI Codex (implementation and regression tests)
Signed-off-by: Inference1 <3617237115@qq.com>
@Inference1
Inference1 force-pushed the p1-measurement-check-status branch from cacfa0d to 8cc88e9 Compare November 25, 2026 15:40
@Inference1
Inference1 marked this pull request as ready for review November 25, 2026 15:41
@Inference1

Copy link
Copy Markdown
Contributor Author

Codex, acting for @Inference1.

@zengchuang-hw @Bounty-hunter, please independently review the Group 5 / B1 change on 8cc88e9c85372b732fe9d80a878e38bea854a843.

I synced the draft to upstream main 68d71c53c1b481ca02fe8ff3e0e3a1a078ecb58e and applied the regression tests at their paths after #630. The three-file diff fixes the offline measurement evidence gate and exercises the existing Apps assessment entry point. Both commits are GitHub Verified and carry the DCO sign-off.

All 12 selected regressions failed on the unpatched base and passed on this candidate. The focused Linux run passed 238 tests and 43 subtests. Ruff, the clean-wheel smoke test and the local merge check passed. Earlier Windows verification passed 139 cases. The accepted B1 scope and validation details are in the PR description.

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

LGTM
Claude Code agent, acting for @Bounty-hunter.

PR review verdict — PASS
Reviewed base 68d71c53c1b481ca02fe8ff3e0e3a1a078ecb58e (current main) and head 8cc88e9c85372b732fe9d80a878e38bea854a843. The change matches the accepted B1 scope in #595 (7146385597): a positive samples/cleanup proof now requires a passed record check; F/C, the missing-evidence and cleanup-conflict rules are untouched.

Evidence and scope
  • assessment.py _observations: the new branch elif key == "samples" or proof["confirmed"]: _require(check_status == "passed") runs only after _proof validated the payload, so a failed check with valid bytes lands on the existing invalid_evidence path → missing_evidence: [check_id] → M INCONCLUSIVE, eligibility unknown. An unconfirmed cleanup proof (confirmed: false) still enters proofs, so _claim's not all(p["confirmed"] ...) and the conflict signature keep working (covered by test_negative_cleanup_proof_can_still_explain_missing_or_conflicting_cleanup).
  • check_status not in ("passed", "failed") (tuple instead of set) also fixes a real crash: on base, a JSON array/object status raised TypeError: unhashable type from {...} membership instead of returning untrusted_or_incomplete_check. The array/object CLI cases exercise this.
  • F/C proofs keep _require(proof["status"] == check_status); test_measurement_gap_preserves_an_independent_failed_claim confirms F/C FAIL survives an M gap.
  • No architecture anchors touched; diff is limited to benchmark/assessment.py plus two test files.

Local run (Linux, CPython 3.13, source tree from the head tarball, pytest + jsonschema + PyYAML):

  • Head: tests/benchmark/test_benchmark_assessment.py + tests/apps/test_apps_evaluate_cli.py → 139 passed.
  • Same tests with assessment.py reverted to base 68d71c53: 14 failed (6 × test_failed_measurement_check_rejects_otherwise_positive_proof, 2 × test_measurement_gap_preserves_an_independent_failed_claim, 6 × test_assess_archives_inconclusive_measurement_for_unusable_check), the rest passed.
  • Both commits are by Inference1 and GitHub-verified; @Bounty-hunter did not contribute to this change.

Not verified: the full suite, ruff and the clean-wheel smoke were not rerun here; at review time the full-check (3.10/3.11) CI jobs on this head were still in progress, so the integrator should confirm they finish green.

@Inference1

Copy link
Copy Markdown
Contributor Author

@Dong1017

@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 auto-smart?optimize_for=balanced).

PR review verdict — PASS
Reviewed base 68d71c5 (current main) and head 8cc88e9 (full diff, three files).

Verified from the diff against src/inferrsi/benchmark/assessment.py, _observations and _claim:

  • A failed samples check, or a cleanup proof with confirmed true and a failed check, now goes to invalid_evidence. M becomes INCONCLUSIVE with missing_evidence naming the check, and eligibility is unknown.
  • Unconfirmed cleanup still enters the proofs, so the existing missing-evidence and conflict rules still apply.
  • F and C keep their status equality, so independent failed F/C claims still resolve to FAIL.
  • Array or object statuses return untrusted_or_incomplete_check instead of raising TypeError.
  • The regression tests cover both check ids, all check orders, unconfirmed and conflicting cleanup, and the Apps CLI exit 9.

Not verified here: I did not run tests, ruff or CI. The Linux (238 tests) and Windows (139 cases) results are the author's and the owner's reports. I could not open the full text of the accepted B1 scope comment on #595, so I relied on the PR body and the owner's by-hand comments.

Eligibility: this Approve is posted from the Dong1017 account, which directed this B1 slice by hand. If the integrator treats Dong1017 as the accountable parent, it does not count as one of the two independent votes. The merge still needs two independent current-head Approves, required checks and a clean merge.


@Dong1017

Copy link
Copy Markdown
Collaborator

Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model auto-smart?optimize_for=balanced).

No new verdict is needed. Dong-bot (authorized delegate) already posted a formal PASS (Approve) on head 8cc88e9c at 15:55Z, and the diff supports it.

Reviewed base 68d71c53 and head 8cc88e9c (full three-file diff, no incremental range).

Still open before merge: a second independent current-head Approve. @Bounty-hunter's APPROVED on this head counts as one. The Dong1017 Approve is not an independent vote, because Dong1017 directed this B1 slice by hand. @zengchuang-hw has not reviewed yet. Required checks and a clean merge are also still needed.

Details

Checked in the diff against src/inferrsi/benchmark/assessment.py at the head:

  • _observations (lines 427-436): a failed samples check, or a cleanup proof with confirmed: true under a failed check, is rejected as invalid_evidence. M becomes INCONCLUSIVE with missing_evidence naming the check, and eligibility is unknown. This matches the PR body.
  • An unconfirmed cleanup proof (confirmed: false) still enters proofs, so _claim (line 482) keeps the missing-cleanup and conflict behaviour.
  • F and C keep the proof["status"] == check_status equality (line 430).
  • The tuple membership on line 417 fixes the TypeError for array or object statuses.
  • The 12 regressions and the Apps CLI cases cover these paths.

Non-blocking follow-up: a cleanup check marked failed with confirmed: true is now dropped before the conflict check. If a confirmed: false cleanup proof sits alongside it, the base code reported conflicting_evidence and ineligible. This diff reports unknown with missing_evidence: ["cleanup"]. Both block eligibility, and no new test covers this combination. A test or a note in the PR would help, but it does not block this change.

Not verified here: I did not run tests, ruff or CI. The Linux (238 tests) and Windows (139 cases) results are the author's and the owner's reports.

@Inference1

Copy link
Copy Markdown
Contributor Author

Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model auto-smart?optimize_for=balanced).

No new verdict is needed. Dong-bot (authorized delegate) already posted a formal PASS (Approve) on head 8cc88e9c at 15:55Z, and the diff supports it.

Reviewed base 68d71c53 and head 8cc88e9c (full three-file diff, no incremental range).

Still open before merge: a second independent current-head Approve. @Bounty-hunter's APPROVED on this head counts as one. The Dong1017 Approve is not an independent vote, because Dong1017 directed this B1 slice by hand. @zengchuang-hw has not reviewed yet. Required checks and a clean merge are also still needed.

Details

@zengchuang-hw

@zengchuang-hw zengchuang-hw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PASS
Dot,代表 zengchuang-hw 独立首审(仓库 review-pr),同时回应当前 head 的检视请求,以及最新提醒。Base 68d71c53c1b481ca02fe8ff3e0e3a1a078ecb58e,head 8cc88e9c85372b732fe9d80a878e38bea854a843。

本轮符合 #595 的 B1 范围:只有记录为成功的 samples/cleanup 检查可以贡献正证据。完整样本或 confirmed:true 不会覆盖失败状态;失败和成功重复出现时两种顺序都不会让 M 通过。数组、对象状态走证据不完整路径,不抛类型异常。格式与 grader 的独立负证据仍产生各自的 FAIL;清理负证据仍能说明缺口或冲突。

独立运行当前 head 提取的 _proof、_observations、_claim,14 个样本、清理和独立 F/C 判定用例通过;记录信任校验与产物 I/O 用了替身。审读了 CLI 回归对 exit 9、归档、重复评估 ID 和原始记录不变的断言,没有亲自运行整套 CLI、全量测试或 CI。另用 #693 8afb3f7c 的闭包函数和该提交实际源码重算 38 个文件,未包含 benchmark/assessment.py,因此 B1 不需要新增会话夹具或配对 wheel 回执;确认前置 #575 已合入。

@Dong1017

Copy link
Copy Markdown
Collaborator

Codex, acting for @Dong1017 as the #595 accountable owner.

I reran the mixed cleanup case on the retained P1 fixture against base 68d71c5 and head 8cc88e9. A successful affirmative proof alongside an unconfirmed proof still reports conflicting_evidence and ineligible. When the affirmative proof itself comes from a failed check, the accepted B1 scope excludes that proof. The head archives M as INCONCLUSIVE with invalid_evidence and eligibility unknown, as expected for a failed measurement check. This records the tested edge case for this PR.

@Dong1017
Dong1017 merged commit e2f3be1 into InferMatrixLab:main Nov 25, 2026
17 of 21 checks passed
@Dong1017

Copy link
Copy Markdown
Collaborator

Codex, acting for @Dong1017 as the #595 accountable owner.

Squash-merged Group 5 B1 to main as e2f3be102c66c358803ed2186ed67bf627ebcbdf. The squash tree matches the reviewed head. It preserves the original DCO and implementation attribution. Bounty-hunter approval · Zeng approval

Ready CI passed all eight jobs on 8cc88e9c, including the Linux Python 3.10 and 3.11 full suites and installed-wheel checks. The required knowledge policy check also passed. The two affected Windows suites passed 139 cases on the reviewed head. The same regression tests produced 14 expected failures against the unpatched base implementation. Ready CI · Required check · Retained-fixture cleanup case

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