Skip to content

test(purchase): TestManager_RecoverStrandedApprovals_LateCompletionNotClobbered panics on unstubbed mock #657

Description

@cristim

Summary

TestManager_RecoverStrandedApprovals_LateCompletionNotClobbered panics on an unstubbed mock call at internal/purchase/mocks_test.go:277 on the clean origin tree (feat/multicloud-web-frontend), unrelated to any specific feature PR.

Surfaced by

The CodeRabbit-resolution loop on PR #650 (credential-resolution fix). The resolving agent ran the purchase test suite on a clean checkout and hit the panic; it is not introduced by #650's diff.

Repro

Run the internal/purchase test suite on a clean checkout of the base branch. The test panics rather than failing cleanly, which indicates a mock expectation is missing for a call path the test exercises.

Fix direction

Add the missing mock stub/expectation for the call at internal/purchase/mocks_test.go:277 so the test exercises the late-completion-not-clobbered path without panicking. Confirm the assertion (a late-completing original run is not clobbered by the recovery sweep) still holds.

Triage note: filed from the main session because the resolving subagent's sandbox denied issue-create. Severity/medium because it is a broken test on the base branch (masks regressions in the strand-recovery path) but not a production defect. Please confirm the panic reproduces before fixing.

No activity

Activity on this issue will appear here.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions