Skip to content

fix(gs): let gs issue start an issue assigned to you - #105

Merged
barbatdev merged 1 commit into
mainfrom
fix/gs-issue-self-assigned
Oct 31, 2026
Merged

barbatdev merged 1 commit into
mainfrom
fix/gs-issue-self-assigned

Conversation

@barbatdev

Copy link
Copy Markdown
Owner

gs issue refused any assigned issue, including one assigned to the current gh user (gs: ...#1064 is assigned to barbatdev). Your own assignment is your claim, not a race.

  • Race check ignores the current gh api user login; anyone else still blocks and is the only name reported.
  • If gh api user fails, every assignee still blocks (fail-closed).
  • Tests: assigned only to you passes; someone else stops; shared assignment stops and names only the other person.

@barbatdev
barbatdev merged commit aca7643 into main Oct 31, 2026
1 check passed
@barbatdev
barbatdev deleted the fix/gs-issue-self-assigned branch October 31, 2026 13:36
@barbatdev

Copy link
Copy Markdown
Owner Author

Post-merge QA (glm)

Lens: requirements + adversarial. Fixes gs issue so an issue assigned to the current gh user no longer blocks worktree creation. The filtering is fail-closed as documented: if 'gh api user' fails, me is empty and no assignee is filtered out, so everyone still blocks; shared assignments keep only the other login in the message. tr/grep -vxF/paste handle the comma-separated assignee list and the empty-assignees case produces an empty others value, preserving the original behavior. Three new tests cover self-only passes, other-still-stops, and shared-names-only-the-other.

No findings.

Verdict: clean

@barbatdev

Copy link
Copy Markdown
Owner Author

Post-merge QA (deepseek)

Lens: evidence + test design. Context extraction failed for this PR: its body quotes gs: ...#1064 is assigned to barbatdev, and that cross-repository reference was resolved as a local issue of barbatdev/cortex-dotfiles, which does not exist, so context aborted before printing the diff. I reviewed the merged bin/gs and tests/gs_test.sh at the merge commit directly. The race check itself is sound: only assignees other than the authenticated login block, an empty $me degenerates to grep -vxF -- "", which matches only empty lines and therefore leaves every assignee in place (the documented fail-closed behavior), and || true keeps a failed gh api user from aborting the script.

Suggestion (2)

  • The fail-closed branch for a failing gh api user is claimed but not tested (tests/gs_test.sh): The PR body states 'If gh api user fails, every assignee still blocks (fail-closed)'. No test exercises it: race_stub always answers api user with me. The behavior looks right by inspection, but it is the safety property of the change, so it deserves the same coverage as the other three cases. Condition: gh api user exits non-zero, assignees = barbatdev, expected stop with #9 is assigned to barbatdev (GS_FORCE=1 to continue).
  • Login comparison is case-sensitive while GitHub logins are not (bin/gs): grep -vxF -- "${me:-}" compares assignee logins byte for byte against gh api user --jq .login. GitHub treats logins case-insensitively, so if the two surfaces ever disagree on casing (an assignee rendered as BarbatDev), the user's own claim is reported as someone else's and gs issue refuses. Low likelihood because the API usually returns canonical casing; grep -vixF would remove the class of failure entirely.

Verdict: clean

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant