Skip to content

Collaborator invitations blocked: expired GitHub invite leaves user recorded as collaborator, re-invite returns 409, no access #2196

Open

Description

@bruAristimunha

Summary

A misconfiguration is blocking collaborator invitations. Once a user's first GitHub invitation to a private dataset expires (GitHub's 7-day limit), NEMAR still records them as a collaborator. It then refuses every new invitation with 409 "already has access", and no GitHub invitation is re-sent. The user can never read the dataset, and the owner has no CLI command to repair it.

Impact

One collaborator, hbanville (GitHub hubertjb), is blocked on 322 private fNIRS datasets (nm000637–nm000964, plus nm000745 and nm000758).

Reproduction (nemar-cli 0.10.22)

  1. nemar dataset invite hbanville <id> for a set of private datasets on 6 Nov 2026. The command succeeds.
  2. The invitee does not accept within 7 days. GitHub expires the invitations on 13 Nov.
  3. Re-invite on 16–17 Nov. NEMAR updates its collaborator records: nemar dataset collaborators <id> --json shows access_type: invited with a 16–17 Nov granted_at. No usable GitHub invitation reaches the user.
  4. Invite again today:
    $ nemar --debug dataset invite hbanville nm000637
    POST https://api.nemar.org/datasets/nm000637/invite -> 409
    {"error":"User 'hbanville' already has access to this dataset"}
    
  5. GitHub: GET /repos/nemarDatasets/nm000637/collaborators/hubertjb returns 404. The user has no access.

Evidence that the expired first invitation causes this

GitHub collaborator status for hubertjb on all 329 datasets (checked 17 Nov 2026, 19:42 UTC), grouped by whether the dataset existed when the 6 Nov invitations were sent:

Datasets Had a 6 Nov invitation GitHub access now
nm000965–nm000970 (created 8–9 Nov) no, first invited 16–17 Nov 6 / 6
nm000673 no, first invited 17 Nov 13:00 UTC 1 / 1, accepted within hours
all other 322 yes, expired 13 Nov 0 / 322

Wherever the user received a valid invitation, they accepted it. A second collaborator, jgadonneix, had no earlier invitations. They were invited the same afternoon and have access to the 311 they accepted.

What is missing

  • The invite endpoint treats a NEMAR collaborator record as "has access", without checking that the GitHub invitation is still pending or was accepted.
  • An expired GitHub invitation is never re-created.
  • The owner cannot remove a collaborator or re-send an invitation from the CLI. Listing or re-sending repository invitations needs GitHub admin rights, and owners have the maintain role.

Requested

  1. Re-issue the GitHub invitations for hubertjb on the affected datasets, or clear the stale collaborator records so the invites can be sent again.
  2. In POST /datasets/<id>/invite, re-send the GitHub invitation when the existing one is expired or missing, instead of returning 409.
  3. Make nemar dataset collaborators show the GitHub state (pending, accepted or expired), and add a way to remove a collaborator.
  4. Related: invited users have no CLI step that accepts their invitations. Dataset creation accepts the owner's own invitation ("Accepting GitHub repository invitation..."), but nothing does this for invitees.

The full per-dataset table is available on 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