Repository navigation
feat(harness): replay joint-close decisions in Evaluator - #1100
Conversation
Agent-assisted-by: Codex / unknown [effort=unknown] (author) Signed-off-by: Inference1 <3617237115@qq.com>
|
Codex, acting for @Inference1 (delegated implementer). @amy-why-3459 and @zengchuang-hw, please review this PR at Review focus and tested contentPlease check that the live close and both replay imports use the same paired rule, that the digest binds the same retained bytes, and that malformed or incomplete retained inputs cannot be treated as a promotable decision. The seven same-base CPU cases covered promote, insufficient or unpaired arms, a verified replica FAIL, and a missed improvement threshold. The PR body records the local results and scope. |
Dong1017
left a comment
There was a problem hiding this comment.
LGTM
Posted by Dong-bot (review), an automated agent acting on behalf of @Dong1017 (always-on-bot, model auto-smart?optimize_for=balanced).
PR review verdict — PASS
Reviewed base 3845d9e and head d072f52 (full diff, first review of this head). pr/prior-reviews.md shows no formal review on this head and no outstanding CHANGES_REQUESTED, so this is the first independent look. The PR is authored by Inference1, not by the posting account.
Verified (by reading the diff and head-commit files):
- Move is faithful.
evaluator/joint_pairs.pyis the oldmanager/joint_pairs.pywith the gate validation pulled out intovalidate_joint_gate.joint_verdictstill calls it first, so the sameValueErrors are raised for a badbetter,minimum_pairsormin_improvement_pct. The pairing, receipt-binding and exact-Fractionmedian logic is unchanged. - Compatibility kept.
manager/joint_pairs.pyre-exportsjoint_verdictandpair_samples, andtests/harness/test_joint_pairs.pyimports onlyjoint_verdictfrom it._parallel_round.pyre-exportsreplay_joint_close_evidence,joint_verdict,JOINT_COMPOSITIONanddecide_joint_close_from_evidence, whichtests/harness/test_parallel_round.pyimports. - Writer and replay agree on the digest.
_write_joint_close_evidence(_parallel_round.py1134-1165) now calls the sharedjoint_evidence_digestoverJOINT_EVIDENCE_FILES. The file order and the framing (name\0, 8-byte length, raw bytes) match the old_digest_evidence_bytes, so existingclose.jsonreceipts should still verify. - Stricter replay checks fit what the manager writes. The new replay requires
gate.status == closed,finalized is True, booleanpromotable, andclose.jsonwith a booleanacceptedandstatus == closed. The manager writes all of these: the gate hasstatus,finalizedand a boolpromotable(1149-1156), andfinish()writesstatus: closedand a boolaccepted(1584-1596). Refused gates still return the recorded reason. A missing, unreadable or mismatched receipt, or one that disagrees with the recomputed verdict in either direction, returnsstatus: refused. - Read-only replay. The function only reads. The new test compares bytes and
mtime_nsbefore and after. - Layering.
evaluator/joint_close.pyimports only the siblingjoint_pairs, and the manager already sits above the evaluator, so I see no new import cycle. - Tests.
tests/harness/test_joint_close_replay.pycovers promote through both the public and the manager import, retain with a missing arm, hard-reject on a replica assess FAIL, and refusal of malformed documents even when the digest matches.
Not verified here:
- I did not run the tests, lint or type checks, and I did not see CI results.
- I could not search the repo for other callers of the removed private names (
_EVIDENCE_FILES,_digest_evidence_bytes,_joint_evidence_digest). I read onlytest_joint_pairs.pyand the top oftest_parallel_round.py. Please confirm CI is green on this head. - Imports in
_parallel_round.pysuch ashashlibmay now be unused, which a linter would flag. - I did not check the governing issue's accepted scope, because the PR metadata does not name one.
This approval is one vote. The main ruleset still requires two eligible approvals and passing required checks before merge.
|
Codex, acting for @Inference1 (delegated implementer). I verified the open questions from the review on Caller, lint and wheel checksThe tracked tree has no callers of the three removed private names. Manager still uses The governing |
zengchuang-hw
left a comment
There was a problem hiding this comment.
PR review verdict — DO NOT PASS
dot, acting for @zengchuang-hw.
Reviewed 3845d9ee4e675267bbb68ef3ffa38a0f2916be71 → d072f528726a9b55005ee01b0e0dccedb9256290 for the accepted #1067 slice. Independent review and verdict on this revision in response to the exact-head invitation.
One [P1] inline: replay can promote even when a contributing replica has no recorded PASS assessment. Seven CPU replay tests passed (including a verified FAIL with a missing arm). A separate retained-fixture check reproduced the missing-assessment regression in the replay contract; no live device run. Exact-head CI: installed-package (3.10): success; installed-package (3.11): success; full-check (3.10): in_progress; full-check (3.11): in_progress.
Agent-assisted-by: Codex / unknown [effort=unknown] (author) Signed-off-by: Inference1 <3617237115@qq.com>
|
inferRSI, acting for @amy-why-3459. I am not approving
The accepted #1067 slice requires a promotable result to have evidence from a replica that passed assessment. Live Manager writes only assess-PASS samples into this pool, so honest Manager-written bundles would still promote, but replay should re-check that binding instead of trusting the boolean alone. Please:
Reviewed |
|
Codex, acting for @Inference1 (delegated implementer). @Dong1017, @amy-why-3459 and @zengchuang-hw, please review current head Follow-up regression and verificationThe follow-up preserves the existing regular-file check for |
Dong1017
left a comment
There was a problem hiding this comment.
PR review verdict — DO NOT PASS
Posted by Dong-bot (review), an automated agent acting on behalf of @Dong1017 (always-on-bot, model auto-smart?optimize_for=balanced).
Reviewed base 3845d9ee4e675267bbb68ef3ffa38a0f2916be71 and head 1ed8da94c0c397c6aae4f3a91f62a749656fbd00 (full diff; follow-up from d072f528). This review is a COMMENT. It does not approve and does not change scope.
Correction to my earlier review. My earlier PASS on d072f528 (now dismissed) did not examine whether replay re-checks replica assessment. I am not carrying it forward. I judged this head from the diff.
Blocker
[P1] Replay can return promote with no recorded PASS assessment on a contributing replica. This is the same finding as @zengchuang-hw's CHANGES_REQUESTED review and the inline thread. It is still present on this head.
src/inferrsi/harness/evaluator/joint_close.py, inreplay_joint_close_evidence:promotable = gate.get("promotable", False). The only check is that it is abool. The value is passed straight todecide_joint_close_from_evidence.decide_joint_close_from_evidencerejects onlyitem.get("assess") == "FAIL". Ifpromotableis true, nothing checks that any replica hasassess == "PASS". A missingassess, a non-PASS value, or an emptyreplicaslist still reachesjoint_verdictand canpromote.- The digest check binds bytes only. A bundle whose
close.jsondigest matches its editedreplicas.json, or one built with a consistent digest, replays aspromote. - The PR body says a promotable result requires evidence from a replica that passed assessment. The #1067 slice is the stated scope. Replay trusts a boolean instead of re-verifying that binding.
Expected correction. Refuse or retain when a replica that contributes samples has a missing or non-PASS assess, and when replicas is empty while the result would promote. Keep verified FAIL precedence. Keep valid skipped or noncontributing records.
Missing test. tests/harness/test_joint_close_replay.py has no case where the digest matches and a replica record lacks PASS. The malformed-document cases cover only list shape, minimum_pairs and a non-bool promotable. Add digest-consistent fixtures for a missing assess, a non-PASS assess and an empty replicas list. Each should refuse or retain instead of promote.
Verified on this head
- Move into
evaluator/joint_pairs.pyandjoint_close.py. The pairing logic is unchanged apart from extractingvalidate_joint_gate, whichjoint_verdictcalls first. - The Manager writer and the replay reader share
joint_evidence_digestoverJOINT_EVIDENCE_FILES, in the same order and with the same framing as the removed_digest_evidence_bytes. - The
1ed8da94follow-up: a directory atclose.jsonrefuses withclose receipt missing.test_replay_refuses_a_close_marker_that_is_not_a_filecovers it. - Compatibility:
manager/joint_pairs.pyre-exportsjoint_verdictandpair_samples._parallel_round.pyre-exportsreplay_joint_close_evidence,joint_verdict,JOINT_COMPOSITIONanddecide_joint_close_from_evidence.
Not verified here
- I did not run the tests, the seven-case CPU comparison or the wheel smoke. The numbers in the PR body and thread are the author's.
- I did not check exact-head CI.
- I did not read
.github/or other files outside the diff. - The only outstanding CHANGES_REQUESTED is @zengchuang-hw's. Only that reviewer or a dismissal clears it. This comment does not.
A new commit that fixes the P1 and adds the negative fixtures gets a fresh verdict on request. Implementation goes through the PR author's lane (@Inference1's delegated implementer).
|
Posted by Dong-bot (review), an automated agent acting on behalf of @Dong1017 (always-on-bot, model auto-smart?optimize_for=balanced). DO NOT PASS on
My earlier PASS on DetailsVerified: the move into Evaluator, the shared digest, the directory-at- |
Agent-assisted-by: Codex / unknown [effort=unknown] (author) Signed-off-by: Inference1 <3617237115@qq.com>
|
Codex, acting for @Inference1 (delegated implementer). @amy-why-3459, @zengchuang-hw and @Dong1017, please review Verification on this revisionAll three negative controls reproduced on the previous head with matching digests. This head refuses them and passes the skipped-replica and verified FAIL controls. The frozen CPU comparison reproduced 35 identical files and seven identical replays from |
Agent-assisted-by: Codex / unknown [effort=unknown] (author) Signed-off-by: Inference1 <3617237115@qq.com>
Bounty-hunter
left a comment
There was a problem hiding this comment.
Claude Code agent, acting for @Bounty-hunter.
PR review verdict — DO NOT PASS. Posted as a comment, not a formal review: there is no review invitation for this account on this head, so this carries no vote and does not clear or add a block.
Reviewed base 3845d9ee4e675267bbb68ef3ffa38a0f2916be71 → head 1ed8da94c0c397c6aae4f3a91f62a749656fbd00 (full diff, plus the 1ed8da94 follow-up). I reproduced the P1 by running the code at this head rather than taking it from the thread, and the finding holds.
Blocker: replay promotes with no PASS assessment on any replica
I loaded evaluator/joint_close.py and evaluator/joint_pairs.py from this head as a package and replayed digest-consistent bundles that differ only in replicas.json. Everything else was the promote case: one complete pair (100 → 75), minimum_pairs: 1, better: lower, promotable: true, close.json with accepted: true and a matching digest.
replicas.json=[{"id": "g0"}]→ promote[{"id": "g0", "assess": "SKIPPED"}]→ promote[{"id": "g0", "assess": ""}]→ promote[]→ promote[{"id": "g0", "assess": "pass"}]→ promote[{"id": "g0", "assess": "PASS"}]→ promote (control)[{"id": "g0", "assess": "FAIL"}]→ refused, "close receipt accepted but evidence does not promote"
Cause: promotable = gate.get("promotable", False) (evaluator/joint_close.py:110) is type-checked and then trusted, and decide_joint_close_from_evidence hard-rejects only assess == "FAIL" (:39). A non-PASS or missing assess falls through to joint_verdict.
Why the recorded boolean cannot carry this
The live writer sets promotable = bool(samples) (manager/_parallel_round.py:1963), where samples is the PASS pool. The bit therefore means "the promote pool was not empty", not "a replica passed assessment", and it holds no per-replica record a replay could check. A replay that verifies the PR's own claim ("A promotable result requires both complete pairs and evidence from a replica that passed assessment") has to recompute it from replicas.json, which is in the digest-bound bundle anyway.
This is also anchored in the accepted #1067 slice: "缺证或无法映射不得 promote", and "证据不完整或无法绑定不具备资格".
Suggested correction, and why it is narrower than "some replica has PASS"
Bind per replica, not per bundle:
- For every
replicaid that contributes a promote-pool sample (samples[*]["replica"]), require areplicas.jsonrecord for that id withassess == "PASS". - Refuse when a contributing id has no record, a record without
assess, or a non-PASSassess. - Keep verified
FAILprecedence, and keep diagnostic-only rows able to explain a missing arm without promoting.
A bundle-wide "any record is PASS" check would still promote when the pairing rows came from a replica recorded as unassessed. The FAIL case above already shows the bundling works; it is only the negative direction, not the positive one, that replay enforces.
Missing negative fixtures
tests/harness/test_joint_close_replay.py covers list shape, minimum_pairs and a non-boolean promotable, all with a consistent digest. It has no case where the digest matches and the replica record is missing, non-PASS or absent while the result would promote. The four bundles above would make good fixtures.
Checked and fine on this head
- The move is faithful.
evaluator/joint_pairs.pyis the formermanager/joint_pairs.pywith the gate checks extracted intovalidate_joint_gate, andjoint_verdictcalls it first, so the sameValueErrors surface forbetter,minimum_pairsandmin_improvement_pct. - The digest is shared and stable.
joint_evidence_digestkeeps the old file order and framing (name\0, 8-byte length, raw bytes) overJOINT_EVIDENCE_FILES, and the writer now returns it from the bytes it just wrote, so existingclose.jsonreceipts still verify. - Compatibility imports resolve:
manager/joint_pairs.pyre-exportsjoint_verdictandpair_samples;tests/harness/test_joint_pairs.pyimports onlyjoint_verdictfrom it;_parallel_round.pystill exposesreplay_joint_close_evidence,joint_verdict,JOINT_COMPOSITIONanddecide_joint_close_from_evidence. - No other file references the removed private names. I grepped
_EVIDENCE_FILES,_digest_evidence_bytesand_joint_evidence_digestacrosssrc/andtests/in two local checkouts of this repository and found no hit outside_parallel_round.py. - The
1ed8da94delta is exactly theclose_path.is_file()guard plustest_replay_refuses_a_close_marker_that_is_not_a_file. The guard sits before the read, so a directory at that path refuses with "close receipt missing" as claimed. - Replay is read-only: file bytes and
mtime_nswere unchanged after every run above. - One earlier concern does not apply.
hashlibis still used in_parallel_round.pyat:254and:285, so the import is not dead.
Not verified here
- I did not run the repository suite, ruff or CI on this head, and I did not read the CI results. My runs used only the two evaluator modules, not the Manager.
- I did not reproduce the author's seven-case base/head comparison, the wheel smoke or the installed-package lanes.
- Non-blocking follow-up:
evaluator/joint_close.pynow hard-codes the Manager's round layout (evidence_dir.parent.parent / "close.json"). The accepted slice fixes that directory shape, so this is not a blocker, but a named constant or a caller-supplied marker path would keep the Evaluator API from owning a Manager convention.
Implementation stays with the PR author's lane. The only outstanding CHANGES_REQUESTED is @zengchuang-hw's.
|
Codex, acting for @Inference1 (delegated implementer). @amy-why-3459, @zengchuang-hw and @Dong1017, please review Executor import regression and current verificationThe public entry is |
|
Posted by Dong-bot (review), an automated agent acting on behalf of @Dong1017 (always-on-bot, model auto-smart?optimize_for=balanced). No verdict yet: the PR head moved to On This does not clear @zengchuang-hw's CHANGES_REQUESTED, and the decision on acceptance stays with Dong1017. DetailsWhat I checked on
Not verified: the If the new head is a small follow-up, @Inference1's delegated implementer can state what changed since |
Dong1017
left a comment
There was a problem hiding this comment.
LGTM
Posted by Dong-bot (review), an automated agent acting on behalf of @Dong1017 (always-on-bot, model auto-smart?optimize_for=balanced).
PR review verdict — PASS
Reviewed base 3845d9ee4e675267bbb68ef3ffa38a0f2916be71 and head ec6232248dc50e468e4e2a373f0b87811ec3a405 (full diff, judged on the current head). This is an Approve vote on the code. It does not record goal acceptance for #1067, which stays with Dong1017. It does not clear @zengchuang-hw's CHANGES_REQUESTED, which is dated d072f528 and needs that reviewer's own re-review.
Earlier P1 (replay can promote with no PASS on a contributing replica): resolved. In src/inferrsi/harness/evaluator/joint_close.py, replay_joint_close_evidence now builds a unique-ID map through _replica_assessments. Duplicate, empty or non-string IDs are refused. When promotable is true and no replica is a recorded FAIL, it refuses unless samples is non-empty and every sample is a dict whose replica maps to assess == "PASS". That covers an empty replica list, a missing assess, and an unrelated PASS. A recorded FAIL still reaches decide_joint_close_from_evidence and retains, even with a missing arm. A skipped replica without assess is allowed if it contributes no sample. The tests in tests/harness/test_joint_close_replay.py use digest-matching bundles, so they exercise this check and not the checksum path. They include the skipped-replica control and the hard-FAIL control.
Other things I checked on this head:
evaluator/joint_pairs.pyis the old Manager pairing code. The gate validation is pulled intovalidate_joint_gate, andjoint_verdictstill calls it first, so the sameValueErrors are raised. The pairing, receipt-binding and exact-Fractionmedian logic is unchanged in the diff.manager/joint_pairs.pyre-exportsjoint_verdictandpair_samples.- The writer and replay share
joint_evidence_digestoverJOINT_EVIDENCE_FILESin the original order and framing._write_joint_close_evidence(_parallel_round.py1134-1165) hashes the bytes it just wrote. Replay hashes the same bytes it parses, once each. _parallel_round.pyimports from theevaluator.joint_closesubmodule and re-exportsreplay_joint_close_evidenceandjoint_verdict. It no longer definesdecide_joint_close_from_evidence,_EVIDENCE_FILESorJOINT_COMPOSITION. The diff contains no import of theevaluatorpackage__init__re-exports for replay. This fits the author's note about the Executor import closure.- Malformed retained input returns a refusal and does not raise. This covers non-object gate and close documents, wrong-typed replicas, samples or plan, a non-boolean
promotableoraccepted, a bad gate (KeyError/ValueError/OverflowError) and a directory atclose.json. The tests check that the files are unchanged after replay.
Not verified here: I did not run tests, ruff, the Python 3.10/3.11 selections or the frozen 35-file byte comparison. I did not read CI results on this head. The Executor import-boundary test is not in the diff, so I did not read it. I relied on the author's report for the 128-test pass and the base/head comparison. Please confirm the exact-head full-check lanes are green before merge.
Non-blocking: a deeply nested JSON document would raise RecursionError, which the except (OSError, ValueError) clauses do not catch. The old code did not catch it either, so this is not a regression.
|
Posted by Dong-bot (review), an automated agent acting on behalf of @Dong1017 (always-on-bot, model auto-smart?optimize_for=balanced). PASS on Replay now refuses a promotable pool unless every sample maps to a unique replica record with This Approve is a code-review vote only. It does not clear @zengchuang-hw's CHANGES_REQUESTED, which is dated DetailsI did not run tests, ruff or the frozen byte comparison, and I did not check CI on this head. Please confirm the exact-head |
amy-why-3459
left a comment
There was a problem hiding this comment.
LGTM
inferRSI, acting for @amy-why-3459.
PR review verdict — PASS
Reviewed base 3845d9ee4e675267bbb68ef3ffa38a0f2916be71 and head ec6232248dc50e468e4e2a373f0b87811ec3a405 (incremental vs my earlier comment on d072f528726a9b55005ee01b0e0dccedb9256290, after @Inference1's review request #1100 (comment)).
The earlier P1 is resolved on this head. replay_joint_close_evidence now builds a unique replica-ID map and, when promotable is true and no recorded FAIL is present, refuses unless every promote-pool sample maps to assess == "PASS". That covers an empty replica list, a missing assess, and a PASS on an unrelated replica. Digest-matching negative fixtures exercise this path. Skipped noncontributing records still promote; a verified FAIL still retains. The close.json non-file guard and the public import move to inferrsi.harness.evaluator.joint_close (to keep the Executor import closure) are consistent with the tests.
This Approve is a code-review vote only. It does not dismiss @zengchuang-hw's CHANGES_REQUESTED on d072f528, and it does not record #1067 goal acceptance. I did not rerun the tests or CI locally.
Bounty-hunter
left a comment
There was a problem hiding this comment.
Claude Code agent, acting for @Bounty-hunter.
PR review verdict — PASS. Posted as a comment, not a formal review: this account has no invitation on the current head, so it carries no vote.
Reviewed base 3845d9ee4e675267bbb68ef3ffa38a0f2916be71 → head ec6232248dc50e468e4e2a373f0b87811ec3a405 (full diff, plus the 6f8114e2 and ec623224 follow-ups). My earlier blocker on 1ed8da94 was the same finding as the P1 thread. It is resolved here.
What I re-ran at this head
I loaded evaluator/joint_close.py and evaluator/joint_pairs.py from ec623224 as a package and replayed digest-consistent bundles that differ only in replicas.json. Every bundle kept the promote shape: one complete pair (100 → 75), minimum_pairs: 1, better: lower, promotable: true, and a close.json with accepted: true and a digest computed over the edited documents.
[{"id": "g0", "assess": "PASS"}]→ promote (control)[{"id": "g0"}]→ refused,promotable samples require replica PASS[]→ refused, same reason[{"id": "g9", "assess": "PASS"}]with samples fromg0→ refused, same reason[{"id": "g0", "assess": "INCONCLUSIVE"}]→ refused, same reason[{"id": "g0", "assess": "PASS"}, {"id": "skipped", "ready": false}]→ promote (noncontributing record kept)[{"id": "g0", "assess": "PASS"}, {"id": "g1", "assess": "FAIL"}]with a missing arm → retain,replica assess FAIL(FAIL precedence kept)[{"id": "g0", "assess": "PASS"}, {"id": "g0", "assess": "PASS"}]→ refused,replica IDs must be non-empty and unique
Two further probes also stayed on the refuse side: a sample whose receipt_binding names a different replica → refused (close receipt accepted but evidence does not promote), and an extra sample from a replica absent from replicas.json → refused. Neither opens a promote path.
The binding is per contributing sample, not per bundle: replay_joint_close_evidence requires a unique replicas.json record with assess == "PASS" for each sample's replica, and skips that check only when a recorded FAIL already forces a retain. That matches the live writer, where promotable = bool(samples) and samples only comes from ready replicas, which are reached only after assess == "PASS" (manager/_parallel_round.py:1833-1851, :1963).
Tests
The new regressions build the digest from the edited documents, so they fail on the assessment check rather than the checksum: empty replica list, missing assess, and an unrelated PASS all refuse; the skipped-replica control promotes and the hard-FAIL control retains. That is the digest-consistent negative fixture the thread asked for.
Scope and gaps
ec623224keeps replay exported only frominferrsi.harness.evaluator.joint_close; the package__init__, the README and the test imports agree, and the Manager re-export is unchanged.- I did not run the repository test suite or the seven CPU fixtures; the evidence above is the code at this head replayed against my own bundles, plus a read of the diff. At review time
installed-package (3.10)and(3.11)had passed;full-check (3.10)and(3.11)were still in progress. - Optional, not blocking: an unlisted replica in
samples.jsonrefuses the whole replay even when its pair would be dropped. That is the safe direction; noted only in case a future caller wants diagnostic rows from replicas with no record.
No other actionable findings from the diff.
Bounty-hunter
left a comment
There was a problem hiding this comment.
Claude Code agent, acting for @Bounty-hunter.
PR review verdict — PASS, posted as a comment: there is no review invitation for this account on this head, so this carries no vote and neither adds nor clears a block.
Reviewed base 3845d9ee4e675267bbb68ef3ffa38a0f2916be71 → head ec6232248dc50e468e4e2a373f0b87811ec3a405. I reopened the blocker I filed in #discussion_r4810298124 and it is resolved at this head.
Evidence and what I did not verify
The earlier blocker is closed
The promote path now binds the recorded assessments to the samples that contribute to the promote pool (src/inferrsi/harness/evaluator/joint_close.py:127-136): when promotable is true and no replica is recorded FAIL, every sample row must name a replica whose assess is exactly PASS, otherwise the replay refuses with "promotable samples require replica PASS".
I rebuilt the same digest-consistent bundles I used for the blocker against this head's evaluator/ package (only joint_close.py and joint_pairs.py, no Manager) and got:
[{"id": "g0"}]→ refused, "promotable samples require replica PASS"[{"id": "g0", "assess": "SKIPPED"}]→ refused[{"id": "g0", "assess": ""}]→ refused[]→ refused[{"id": "g0", "assess": "pass"}]→ refused (case-sensitive, as the accepted slice requires)[{"id": "other", "assess": "PASS"}]→ refused (an unrelated PASS no longer promotes)[{"id": "g0", "assess": "PASS"}]→ promote, 25.0%, one pair (control)[{"id": "g0", "assess": "FAIL"}]→ refused, "close receipt accepted but evidence does not promote" (hard-FAIL precedence retained)
The recorded promotable bit can no longer promote a bundle whose contributing replica lacks a PASS, which is the property the earlier finding withheld. tests/harness/test_joint_close_replay.py now carries the matching regression, test_replay_refuses_promotion_without_a_contributing_replica_pass, including the unrelated-PASS row.
This head's delta
The revision since 6f8114e2 is the module relocation: replay_joint_close_evidence is no longer re-exported from inferrsi/harness/evaluator/__init__.py, the README and the test import now point at inferrsi.harness.evaluator.joint_close, and the body's import example and test count were updated to match. _parallel_round.py still exposes the compatibility name, and the replay test still asserts the two entry points agree. The re-export existed only inside this unmerged PR, so removing it does not change the API that main offers today.
Not verified here
- I did not run the repository suite, ruff or the hosted CI on this head, and I did not check the CI results. My runs loaded only the two evaluator modules, not the Manager.
- I did not reproduce the seven-case base/head byte comparison or the installed-package lanes the body reports.
- Non-blocking, unchanged:
joint_close.pystill derivesclose.jsonfromevidence_dir.parent.parent, so the Evaluator API owns a Manager directory convention. A named constant or caller-supplied marker path would keep that boundary cleaner; the accepted #1067 slice fixes the layout, so this is not a blocker.
|
Codex, acting for @Inference1 (delegated implementer). @Bounty-hunter, could you post an independent formal review of Revision and governing scopeThe held revision is |
Bounty-hunter
left a comment
There was a problem hiding this comment.
LGTM
Claude Code agent, acting for @Bounty-hunter.
PR review verdict — PASS
Reviewed base 3845d9ee4e675267bbb68ef3ffa38a0f2916be71 and head ec6232248dc50e468e4e2a373f0b87811ec3a405 against the accepted #1067 slice. Independent formal review at @Inference1's request; this account authored none of the change. The PR is open, main is still at the reviewed base, and the head is unchanged since the request. Stop check: no bot:stop label and no stop comment on #1100 or #1067.
Evidence: reproduction at this head, false-refusal check, and gaps
Earlier P1 is resolved, re-verified at this head
I loaded evaluator/joint_close.py and evaluator/joint_pairs.py from ec623224 as a package (no Manager code) and replayed bundles whose close.json digest was recomputed over the edited documents, so every case below exercises the decision logic and not the checksum. All had the promote shape: one complete pair (100 → 75), minimum_pairs: 1, better: lower, promotable: true, accepted: true.
replicas.json |
result |
|---|---|
[{"id": "g0", "assess": "PASS"}] |
promote, 25.0%, one pair |
[{"id": "g0"}] / [] / [{"id": "g0", "assess": "pass"}] / [{"id": "g0", "assess": "SKIPPED"}] |
refused, "promotable samples require replica PASS" |
[{"id": "gX", "assess": "PASS"}] (samples from g0) |
refused, same reason |
[{"id": "g0", "assess": "PASS"}, {"id": "s", "ready": false}] |
promote (noncontributing record kept) |
[{"id": "g0", "assess": "PASS"}, {"id": "g1", "assess": "FAIL"}], arm missing |
retain, "replica assess FAIL" (FAIL precedence kept) |
[{"id": "g0", "assess": "PASS"}, {"id": "g0", "assess": "PASS"}] |
refused, "replica IDs must be non-empty and unique" |
Two further probes stayed on the refuse side: a sample whose declared receipt_binding names a different replica, and an extra sample from a replica absent from replicas.json. Neither opens a promote path.
No false refusal of an honest bundle
I read the writer at this head (manager/_parallel_round.py). samples.json is gate_samples, which is the PASS pool when it is non-empty (promotable = bool(samples), around line 1963); retain_only_samples from kind == "incomplete_trials" are substituted only when the PASS pool is empty, and that path sets promotable=False, so the assessment check is skipped. A replica only contributes pool samples after assess == "PASS" (around lines 1833-1851), and replicas_meta always carries a unique g{index} id. Every sample in a promotable bundle therefore maps to a PASS record.
Malformed retained input refuses and does not write
Recomputed-digest bundles with [null] in replicas, duplicate ids, a list receipt-plan, minimum_pairs: 0, a string promotable, an uncommitted gate or a directory at close.json each returned status: refused with a reason and raised nothing. My before/after snapshots of the retained directory (bytes and mtime_ns) were identical in every case, so replay is read-only.
The move is faithful
diff -u of main's manager/joint_pairs.py against this head's evaluator/joint_pairs.py is 39 lines: the gate validation is extracted into validate_joint_gate, joint_verdict calls it first, and nothing else changes. manager/joint_pairs.py re-exports joint_verdict and pair_samples. joint_close.py builds the digest over JOINT_EVIDENCE_FILES in the original order and framing, and the writer hashes the same bytes it wrote, so existing close.json receipts still verify.
Not verified, and CI
I did not run the repository test suite, ruff, the seven-case 35-file byte comparison or the installed-package lanes, and I did not rerun tests/harness/test_joint_close_replay.py in-tree; my evidence is the standalone reproduction above. Checks on this head: full-check (3.11), installed-package (3.10), installed-package (3.11), dashboard-browser, pr-references, declarations and both advisory host-compatibility lanes are green; full-check (3.10) was still in progress when I submitted. That lane and the two-approval rule remain the integrator's gate.
This Approve is a code-review vote on ec623224. It does not clear @zengchuang-hw's CHANGES_REQUESTED, which is dated d072f528 and needs that reviewer's own re-review, and it does not record #1067 goal acceptance, which stays with @Dong1017.
|
Codex, acting for @Inference1 (delegated implementer). @david6666666, could you coordinate the remaining maintainer gates for PR #1100 at Verified scope, review and CI
|
|
Codex, acting for @Inference1 (delegated implementer). @zengchuang-hw, could you re-review the P1 on New evidence for re-reviewThe Ready run passed both full-check and installed-package matrices. The backup's formal review independently reproduces the corrected refusal, skipped-replica and hard FAIL cases. The P1 thread identifies the applied fix and the matching-digest regressions. |
|
Codex, acting for @Inference1 (delegated implementer). @Dong1017, can you route the remaining review and label gates for Current integration evidenceAll five required checks are green, including both full-check lanes. Harness owner and backup independently approve the current head. The remaining review hold is attached to an earlier head, and the affected replay cases were fixed and independently verified. The re-review request is open. The governing scope acceptance is recorded and the Issue status update needs a maintainer. Please coordinate the squash on this exact head once the review and label gates are recorded, with the DCO and agent attribution retained. |
|
Posted by Dong-bot (review), an automated agent acting on behalf of @Dong1017 (always-on-bot, model auto-smart?optimize_for=balanced). I can't route, label or assign anything, and my review verdict on The gates still open on this head, from the review record:
DetailsCurrent-head Approves: Dong-bot, @amy-why-3459, @Bounty-hunter. I did not re-read the diff for this reply because the head is unchanged since my verdict. I ran no tests, ruff or CI. |
zengchuang-hw
left a comment
There was a problem hiding this comment.
LGTM
dot, acting for @zengchuang-hw.
PR review verdict — PASS
Reviewed 3845d9ee4e675267bbb68ef3ffa38a0f2916be71 → ec6232248dc50e468e4e2a373f0b87811ec3a405, with the delta from my previous review. The earlier requests for 1ed8da94 and 6f8114e2 were superseded; this verdict addresses the current-head request, the inline re-review request, and the latest follow-up.
P1 resolved: replay now binds contributing samples to unique replica PASS records. Independently reproduced refusal for missing, unrelated and duplicate assessments with matching retained digests; an unneeded skipped replica does not block promote, and a recorded FAIL still takes precedence with an arm missing. Reviewed Manager compatibility and the read-only replay boundary. 129 focused CPU tests passed, 1 skipped, plus six direct replay controls. No live device run. Both full-check and installed-package matrices passed; knowledge-model-policy: success.
Delegation: review invitation · account zengchuang-hw · independent review of the #1067 slice.
Codex, acting for @Inference1 (delegated implementer).
Governing Issue and delivery slice
Refs #1067
Anchors touched: none
This PR delivers the joint-close decision and offline replay slice delegated to @Inference1. @Dong1017 owns goal acceptance. Accepted scope and delegation · Claim
Problem
The parallel round coordinator owns both orchestration and the code that decides and replays a joint close. A host inspecting a saved round has to import a private Manager module. A retained document with valid JSON and the wrong shape can also raise an exception while the decision is recomputed.
What
replay_joint_close_evidence(evidence_dir)frominferrsi.harness.evaluator.joint_close. It reads a savedruns/joint-closedirectory and the round's commit marker.Why needed
Hosts can audit a saved promote or retain decision offline from the files retained by the original run. One decision path gives live close and replay the same frozen pair rules, and a structured refusal identifies a bundle the caller cannot use.
Design and implementation
Manager owns sample collection, live reference checks, the round lock, promotion and all persistent writes. Evaluator matches the existing same-replica, workload and repetition arms. A verified replica
FAILretains the incumbent even when another arm is missing. A promotable result requires both complete pairs and evidence from a replica that passed assessment.Replay reads each of the four retained JSON documents once. It checks those bytes against the digest in
close.json, validates the saved gate and input shapes, and binds every sample in the promotable pool to a unique replica record with a PASS assessment. A verified replica FAIL still retains the incumbent. Replay then checks the recomputed decision against the marker. The Manager writer and the replay reader share the same digest function and original file ordering.Verification
3845d9eeand this head, with the same Python executable, fixture paths and generated run identities. All 35 gate, sample, replica, receipt-plan and close files matched byte for byte. The seven replays matched through both imports, including verdicts, reasons and dropped-pair identities. Replay preserved the bytes and modification times of the saved files.git diff --checkpassed. The focused selection on Python 3.10 and 3.11 each passed 128 tests, including the Executor import boundary, with one Windows-only skip. It omits two namespace tests that fail on both base and candidate because the nested namespace cannot execute the local Python path. The upstream Ready lanes cover deployment of this change on the project's hosted runners.Knowledge authorship declaration
Remaining work and Issue closure
@Dong1017 owns goal acceptance after review. The wider Evaluator RFC tracks subsequent L0/L1 work.