You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fix the retired digest import in the project-explanation recovery test on main #555
The Linux ready job for #541 tested the release change against main after #457 merged. Its only failing case was test_recovered_attempt_does_not_trust_a_rewritable_declaration. The test callback imports digest from the retired inferrsi.infra.artifacts before it can raise its intended interruption.
Use the current Harness artifact helper in this test and verify the original assertions on the current main source. This is a test-only integration correction for #457 and the package migration in #535. It allows #541 and other consumers of main to validate against the intended recovery test.
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).
Assessment: This is a small, well-scoped, test-only fix. On main, test_recovered_attempt_does_not_trust_a_rewritable_declaration fails because its callback imports digest from inferrsi.infra.artifacts, which no longer exists. The import error fires before the test raises its intended interruption. The failure is a stale import left over from the #457 and #535 migration. It is not a product regression. It is also the only failing case in the #541 Linux ready job, so it blocks #541 and anything else that validates against main.
I did not run the test or the CI job. The one test file I opened, tests/test_project_explanation.py, only showed its first 80 lines. I did not locate the failing test or its callback import, and I did not verify the current Harness helper.
Gaps and risks to close in the fix PR
Name the replacement helper. The issue says "the current Harness artifact helper" but not which one. The PR should state the exact module and function, for example whether it is the inferrsi.harness.* equivalent of digest. It should also say whether the hash input and encoding are the same. A different digest would make the "rewritable declaration" assertions pass or fail for the wrong reason.
The import runs inside a callback. A callback import error is easy to miss, because the test only breaks when the callback runs. Check the whole file and neighbouring recovery tests for other imports from inferrsi.infra.artifacts. Prefer a module-level import so a retired path fails at collection time instead of mid-test.
Keep the assertions unchanged. The diff should touch only the import and the call site. If the original assertions have to change, the retired helper's semantics changed in the migration, and that needs its own discussion.
Show the test reaches the interruption. It should fail on the intended interruption path, not pass because the callback is never reached. Include the test run output.
Consider a guard.tests/test_module_boundaries.py and tests/test_target_module_import_gate.py already exist. Check why they did not flag a retired-path import in a test callback. That would be a separate follow-up.
This is a clear, test-only integration fix. After #457 and #535, test_recovered_attempt_does_not_trust_a_rewritable_declaration imported digest from the retired inferrsi.infra.artifacts inside the interruption callback, so the import error fired before the intended KeyboardInterrupt. That matches the #541 Linux ready failure on a merge with current main.
The replacement should be inferrsi.harness.artifact_primitives.digest (sha256 of canonical JSON; the module header says the body is kept byte-identical to the apps copy). The recovery-path assertions should stay unchanged, and the import belongs at module level so a stale path fails at collection time.
#556 already makes that one-line change and reports the failing case now passing, with the full tests/test_project_explanation.py file at 33 passed. I will review the PR on that evidence. A short acceptance line here — the recovered-attempt test reaches the intended interruption on current main and still rejects a rewritable declaration — would be enough to close against.
#556 is MERGED with the Harness digest import fix for test_recovered_attempt_does_not_trust_a_rewritable_declaration. Acceptance for this issue looks complete.
Write+ steward ask: please close #555 (and re-queue Ready on open PRs still red on that test: #541 / #553 / #546 / #559 / #560 after they update onto main).
Activity
Dong1017 commentedon Nov 21, 2026
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).
Assessment: This is a small, well-scoped, test-only fix. On main,
test_recovered_attempt_does_not_trust_a_rewritable_declarationfails because its callback importsdigestfrominferrsi.infra.artifacts, which no longer exists. The import error fires before the test raises its intended interruption. The failure is a stale import left over from the #457 and #535 migration. It is not a product regression. It is also the only failing case in the #541 Linux ready job, so it blocks #541 and anything else that validates against main.I did not run the test or the CI job. The one test file I opened,
tests/test_project_explanation.py, only showed its first 80 lines. I did not locate the failing test or its callback import, and I did not verify the current Harness helper.Gaps and risks to close in the fix PR
inferrsi.harness.*equivalent ofdigest. It should also say whether the hash input and encoding are the same. A different digest would make the "rewritable declaration" assertions pass or fail for the wrong reason.inferrsi.infra.artifacts. Prefer a module-level import so a retired path fails at collection time instead of mid-test.tests/test_module_boundaries.pyandtests/test_target_module_import_gate.pyalready exist. Check why they did not flag a retired-path import in a test callback. That would be a separate follow-up.Suggested next steps
inferrsi.infra.artifactsimports in tests.No decision is requested from Dong1017 here.
amy-why-3459 commentedon Nov 21, 2026
This is a clear, test-only integration fix. After #457 and #535,
test_recovered_attempt_does_not_trust_a_rewritable_declarationimporteddigestfrom the retiredinferrsi.infra.artifactsinside the interruption callback, so the import error fired before the intendedKeyboardInterrupt. That matches the #541 Linux ready failure on a merge with current main.The replacement should be
inferrsi.harness.artifact_primitives.digest(sha256 of canonical JSON; the module header says the body is kept byte-identical to the apps copy). The recovery-path assertions should stay unchanged, and the import belongs at module level so a stale path fails at collection time.#556 already makes that one-line change and reports the failing case now passing, with the full
tests/test_project_explanation.pyfile at 33 passed. I will review the PR on that evidence. A short acceptance line here — the recovered-attempt test reaches the intended interruption on current main and still rejects a rewritable declaration — would be enough to close against.cursor commentedon Nov 21, 2026
Technical / third-party note (cursor[bot]; permission
none— cannot close issues).#556 is MERGED with the Harness
digestimport fix fortest_recovered_attempt_does_not_trust_a_rewritable_declaration. Acceptance for this issue looks complete.Write+ steward ask: please close #555 (and re-queue Ready on open PRs still red on that test: #541 / #553 / #546 / #559 / #560 after they update onto main).