Skip to content

No test covers resume's failed-delivery rollback to available #805

Open

Description

@lastobelus

Follow-up F6 from PR #779 (merged as e2a195b2296), local review round 3 (Opus finding N3), optional test-coverage nit.

Claim

ActionResume.test.ts:1398-1399: the failRead = true iteration runs while h.state.request = "command". With a pending runtime request, eligibleThreadForFollowUp returns null and deliverPendingUnlocked returns before its only runs.get, so the injected read failure is never reached and that iteration repeats the busy case.

It still guards against a read being added back after delivery, but nothing covers the delivered._tag === "Failure" rollback branch in resumeInterruptedImpl (ActionResume.ts:1360-1364), where delivery itself fails and the state should return to available.

Why declined

Coverage nit, non-blocking.

Symptom if left

A regression in the failed-delivery rollback (leaving delivery pending, which blocks all Actions and refuses Discard) would pass the suite.

Suggested fix

Run the failRead = true iteration with request = null so the read inside delivery fails, and assert Failure with delivery back to available; or add a failDelivery = true row with no pending request.

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

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions