Skip to content

fix(gs): only open PRs block gs issue - #107

Merged
barbatdev merged 1 commit into
mainfrom
fix/gs-issue-open-prs-only
Oct 31, 2026
Merged

barbatdev merged 1 commit into
mainfrom
fix/gs-issue-open-prs-only

Conversation

@barbatdev

Copy link
Copy Markdown
Owner

Long issues ship in slices (e.g. gentle-shell #1064 has 20+ merged PRs), so gs issue refused them forever without GS_FORCE=1.

  • Only OPEN PRs that mention the issue block, and only they are named.
  • MERGED/CLOSED ones are listed on stderr as history and the worktree is created.
  • Tests: only merged/closed continues and lists them; an open PR still stops and names only the open ones.

@barbatdev
barbatdev merged commit 1f63445 into main Oct 31, 2026
1 check passed
@barbatdev
barbatdev deleted the fix/gs-issue-open-prs-only branch October 31, 2026 13:42
@barbatdev

Copy link
Copy Markdown
Owner Author

Post-merge QA (glm)

Lens: requirements + adversarial. Fixes gs issue so only OPEN PRs referencing the issue block worktree creation, while merged/closed ones are printed to stderr as history. The grep filters are anchored correctly: open_prs matches '^ *#[0-9]+ OPEN ' immediately after the number, so a title containing the word OPEN cannot fake an open state, and done_prs excludes both open lines and empty input, so the no-PRs case produces no spurious stderr message. GS_FORCE semantics and the die messages are preserved, and two new tests cover the both-merged-continues and open-still-stops paths, including asserting the merged line is absent from the die output.

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 gentle-shell #1064, 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 classification is correct: the regex ^ *#[0-9]+ OPEN matches the --jq ' #\(.number) \(.state) \(.title)' projection, an empty gh pr list yields one blank line that grep -vE drops, so both lists stay empty and a long issue with no PRs at all continues exactly as before. Open PRs still block and are the only ones named in the fatal message.

Suggestion (1)

  • Merged/closed case asserts the message but not that the worktree was actually created (tests/gs_test.sh): The new merged-only test checks that stdout omits GS_FORCE=1 to continue and mentions the history note with both PRs. It never asserts the exit code and never asserts that the branch and worktree exist afterwards, which is the outcome the change is about. A regression that prints the history note and then dies before creating the worktree would pass this check. Conditions worth adding: rc == 0 and the worktree/branch created for the issue.

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