Skip to content

work-items GitHub adapter: an outranked release strands its assignee and a hand-back removes a live holder's #16599

Closed

Description

@kyle-sexton

Two defects in the work-item tracker's GitHub adapter lease protocol (plugins/work-items/tools/work-item-tracker/adapters/github/). The formal-verification claim-protocol model (TLA+) on pull request #16458 found both as counterexamples; #16515 fixed them and replays each as a stub test. Filed after the fix, as the record #15648 asks for; closed on filing.

Steps to reproduce

Defect 1, an outranked release strands its assignee (rule NoStrandedAssignee):

  1. Session A holds the item with lease comment 1, inside 300 s of expiry.
  2. Claimant B judges lease 1 expired, posts lease comment 2 and wins.
  3. A's renew lands, so lease 1 is live again and outranks lease 2.
  4. B finishes and runs release with lease comment 2.

Defect 2, a hand-back removes a live holder's assignee (rule HolderAssigned), two sessions on one login:

  1. Session A holds the item with lease comment 2, inside 300 s of expiry. Session B, same login, releases lease comment 1.
  2. B's hand-back removes the login and re-lists the leases; the list returns lease 2's old body.
  3. A's renew of lease 2 lands, and the clock passes lease 2's old expiry.
  4. B's hand-back judges the listed body.

Expected behavior

  1. B's release hands the item back: its login is unassigned once no live lease of that login holds the item.
  2. The hand-back puts the login back, because session A still holds the item.

Actual behavior

  1. release.sh refused with exit 7 ("a live handle an earlier live lease outranks") and wrote nothing, so B's login stayed assigned beside its live lease until the TTL, with no session behind it.
  2. wit_hand_back_assignee judged the listed body with a clock read taken after the list, found it expired and did not put the login back. Session A worked the item unassigned.

Severity

medium

Severity justification

Each needs a renew racing a second claimant inside the 300 s margin; defect 1 keeps an item off the frontier until the lease's TTL, and defect 2 leaves a working session unassigned, with no data lost in either.

Suggested fix location

plugins/work-items/tools/work-item-tracker/adapters/github/release.sh (the outranked refusal) and plugins/work-items/tools/work-item-tracker/adapters/github/common.sh wit_hand_back_assignee.

Environment

Before merge commit a548b3a (#16515). Regression tests in adapters/github/lease-coordination.test.sh: [outranked live release], [hand-back clock], [hand-back clock, later lists], [hand-back clock, fast holder].

Notes

Fixed by #16515: an outranked release supersedes its own lease (two tries) and hands back only after a supersede succeeded; the hand-back reads its clock before each lease list and counts a lease live at that read or at one after the list. The earlier three defects from the same model are in #16472.

Activity

  1. added theissue type on Nov 16, 2026
  2. kyle-sexton commented on Nov 16, 2026

    @kyle-sexton
    MemberAuthor

    Fixed by #16515 (a548b3a) before this report was filed.

  3. added
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Nov 16, 2026
  4. github-actions commented on Nov 16, 2026

    @github-actions
    Contributor

    Size: Small
    Complexity: Medium
    Uncertainty: Known
    Flags: none
    Blocked by: none

    Understood: two race defects in the work-items GitHub adapter lease protocol. (1) An outranked release exits 7 and leaves the login assigned with no session behind it. (2) wit_hand_back_assignee judges the listed lease body with a clock read taken after the list, so it fails to put back a live holder's assignee. Both need a renew racing a second claimant inside the 300 s margin, with no data lost, so I rated this medium.

    The report says #16515 already fixed both and was filed afterward as a record. I couldn't check that #16515 is merged, because it isn't in the recent merged-PR list I was given. Please confirm and close if it is. Related earlier report: #16472.

    Automated triage. A maintainer reviews it.

  5. removed
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Nov 16, 2026
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

    Fields

    Priority

    medium

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions