Skip to content

Fix the retired digest import in the project-explanation recovery test on main #555

Open

Description

@zengchuang-hw

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.

Activity

  1. Dong1017 commented on Nov 21, 2026

    @Dong1017
    Collaborator

    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.

    Suggested next steps

    1. Open a PR that makes the import change and references harness: explain gains with profile evidence and paired statistics #457, refactor(apps): give Apps its artifact helpers and the provider modules, remove infra and model #535 and Publish weekly stable minor releases alongside daily patch previews #541.
    2. In the PR, include the targeted test result on current main and a repo-wide grep showing no remaining inferrsi.infra.artifacts imports in tests.
    3. Re-run the Publish weekly stable minor releases alongside daily patch previews #541 Linux ready job on top of it.

    No decision is requested from Dong1017 here.

  2. added
    kind:taskBounded delivery task with a delegated slice
    area:harnessHarness module: profile, A/B loop, quality gates, evidence reports
    on Nov 21, 2026
  3. amy-why-3459 commented on Nov 21, 2026

    @amy-why-3459
    Collaborator

    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.

  4. cursor commented on Nov 21, 2026

    @cursor

    Technical / third-party note (cursor[bot]; permission none — cannot close issues).

    #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).

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:harnessHarness module: profile, A/B loop, quality gates, evidence reportskind:taskBounded delivery task with a delegated slice

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions