Repository navigation
Use the Harness digest in the interrupted recovery test - #556
Conversation
Resolve the helper during test collection so import failures are visible outside the simulated interruption. Agent-assisted-by: Codex (integration test correction) Signed-off-by: Zeng Chuang <zengchuang1005@gmail.com>
Dong1017
left a comment
There was a problem hiding this comment.
LGTM
PR review verdict — PASS
Reviewed base 9466bc8 and head b2bf3dc (full diff, one file, +1/-1).
Verified:
tests/test_project_explanation.pynow importsdigestfrominferrsi.harness.artifact_primitivesat module level (line 12). It drops the function-localfrom inferrsi.infra.artifacts import digestinsideforge_then_crash.src/inferrsi/harness/artifact_primitives.pyat this head definesdigestas sha256 overjson.dumps(sort_keys=True, separators=(",", ":"), ensure_ascii=False, allow_nan=False). Its header says the body is byte-identical to the apps copy and is kept equal bytests/test_artifact_helper_copies.py. The forgedmechanism_sha256in the recovery test therefore uses the same digest the Harness computes, which is what the test's purpose depends on.src/inferrsi/infra/artifacts.pyis not present at this head, so the removed import was a stale path. The new import points at an existing module.- The test body is unchanged, so its assertions still cover recovery:
mechanism_unverified_after_recovery,not_declared,eligible is False, and a baseline best. - I saw no other local
digestname in the first 120 lines of the test file or in lines 470–520, so I found no shadowing. I did not read the rest of the file.
No formal reviews are seeded on this head and there is no outstanding CHANGES_REQUESTED, so this is the first review.
Not verified here: I did not run the test suite or CI. I did not read tests/test_artifact_helper_copies.py. I did not confirm that the Harness's own recovery code path uses the same digest.
This Approve is one vote. The merge ruleset still requires two qualifying approvals.
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).
There was a problem hiding this comment.
LGTM
PR review verdict — PASS
Reviewed base 9466bc8d910c9fef55d4a9e23ee1a82950280c30 and head b2bf3dcc6dac58ad0624e41e55347330d7c25a1b.
Technical / third-party verify only (cursor App collaborator permission none — not a write+ eligible Approver under docs/agent-collaboration.md; does not claim dual tip or merge-ready).
Verified:
- Single-file change in
tests/test_project_explanation.py: movesdigestimport from retiredinferrsi.infra.artifactstoinferrsi.harness.artifact_primitives.digestat module scope. - Confirmed
digeststill exists on main insrc/inferrsi/harness/artifact_primitives.py. - Matches the Ready failure on #541 (
test_recovered_attempt_does_not_trust_a_rewritable_declaration/DID NOT RAISE KeyboardInterruptfrom the failed lazy import). - Dong1017 always-on tip Approve present; lint/declarations/pr-references green (full-check still pending at review time).
Refs #555.
amy-why-3459
left a comment
There was a problem hiding this comment.
LGTM
PR review verdict — PASS
Reviewed base 9466bc8 and head b2bf3dc (full diff, one file, +1/−1).
Verified:
tests/test_project_explanation.pynow importsdigestfrominferrsi.harness.artifact_primitivesat module level and drops the function-localfrom inferrsi.infra.artifacts import digestinsideforge_then_crash.- At this head,
artifact_primitives.digestis sha256 over canonical JSON (sort_keys=True, compact separators,ensure_ascii=False,allow_nan=False). The module header says the body is kept equal to the apps copy bytests/test_artifact_helper_copies.py, so the forgedmechanism_sha256uses the same digest the Harness would compute. - The test body is otherwise unchanged: it still raises
KeyboardInterruptafter forging, then assertsmechanism_unverified_after_recovery,not_declared,eligible is False, and a baseline best. - Other
inferrsi.infra.artifactshits on this tree are historical or synthetic (changelog, isolation-policy counterexamples, retired-path checks intests/check_installed.py), not live test imports.
Accuracy/performance comparison evidence is not applicable (test-only import fix). Architecture and necessity: the change reuses the current Harness helper and is limited to the broken import; no extra test cases are needed.
On this head, pr-references, installed-package (3.10/3.11), dashboard-browser, and host-compatibility were green when I checked; knowledge declaration policy is green; full-check (3.10/3.11) in https://github.com/InferMatrixLab/InferRSI/actions/runs/44895392483 was still running. I did not rerun the test locally. @Dong1017 already approved this head; this is a second independent vote. No outstanding CHANGES_REQUESTED.
|
PR #553 is waiting on this fix as well. Its Python 3.10 and 3.11 Ready jobs hit the same I applied this PR’s patch locally to @Dong1017, could you merge #556 once you’ve confirmed the approvals and checks? I’ll run #553’s Ready checks against the updated |
|
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5). I can't merge from this queue because Dong-bot only has review and comment tools here. The approvals on #556 are in place, so the merge is ready for a human with merge rights once Approvals on head Diff, re-read against base
Checks:
I did not run the tests myself. The verdict above comes from the diff and the seeded reviews. Next step: once Dong-bot (authorized delegate). |
|
Both @jiangkuaixue123, could you merge this fix? Dong-bot confirmed that its queue can review and comment. Once the fix lands, I can start a fresh Ready run for #553 against the corrected |
Bring in InferMatrixLab#556, which restores the recovery test to the Harness digest. The five-file Windows session lock patch is identical to the reviewed change. Agent-assisted-by: Codex (author) Signed-off-by: Inference1 <3617237115@qq.com>
#556 fixed the same stale import in tests/test_project_explanation.py with a module-level import from harness.artifact_primitives. The merge keeps main's file, so this branch no longer changes that test and its diff is the docs and docstrings only. Agent-assisted-by: Claude Code / claude-opus-5-5 [effort=xhigh] (author) Signed-off-by: GUOGUO <xwdong1998@163.com>
The base branch merged main, which carries #556; this merge keeps main's tests/test_project_explanation.py, so the rename branch no longer changes that test. Agent-assisted-by: Claude Code / claude-opus-5-5 [effort=xhigh] (author) Signed-off-by: GUOGUO <xwdong1998@163.com>
Governing Issue and delivery slice
Refs #555. The release PR #541 exposed an integration failure when GitHub tested against main after #457. The recovery test imported a helper from the
inferrsi.infrapackage retired in #535.Change and verification
Import the existing Harness
digestat test collection time. The interrupted callback, recovery path and assertions are preserved. This change touches onlytests/test_project_explanation.py.9466bc8d: the recovery test failed withDID NOT RAISE KeyboardInterrupt.git diff --checkpassed.Once this lands, #541 can validate against the corrected main.