Repository navigation
feat(ship-pr): request two seat reviews and re-ask standing change requests - #84
Merged
realRaghavGupta merged 1 commit intoNov 11, 2026
Conversation
…quests (setkernel#82) ship-pr runs the request-review script once the PR is open, and again after each push that answers a change request. The script now asks again every seat whose change request stands on an older commit before filling up to two seats. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 tasks
vega-setkernel
approved these changes
Nov 11, 2026
vega-setkernel
left a comment
Contributor
There was a problem hiding this comment.
Reviewed head 2fa3a5f.
No merge blockers. Approving.
What I checked and how
- Checks: the head's only check run,
check, completed withsuccess. From.github/workflows/check.yml, that run coversbash tests/run.sh,bin/generate --check, ShellCheck 0.11.0 at-S warningonrequest-review/*.shandtests/run.sh, and thejq emptyJSON checks. - Tests, rerun locally:
bash tests/run.shon head2fa3a5fprinted798/798 passed. That includes the six new request-review checks, 792–797. The suite runs the script undersh(tests/run.sh:10). - Acceptance criteria of #82:
- ship-pr runs the request-review script once the PR is open and its checks are running, and reports who was asked. See
plugins/setkernel/skills/ship-pr/SKILL.mdstep 6. It uses the same invocation asrequest-review/SKILL.md, and it covers the sk-agent refusal. - A push after a change request leads to the seats whose change request stands being asked again. ship-pr step 8 says this, and so does the new note in
request-review/SKILL.md. The script does it atrequest-review.sh:90-103. The tests "a re-run after a push asks a seat with a standing change request again" and "two standing change requests: both are asked again" pass. - The plugin's tests pass: CI
checkpassed, and so did my local run.
- ship-pr runs the request-review script once the PR is open and its checks are running, and reports who was asked. See
- Correctness: I read the whole script.
- The re-ask loop only asks seats, via
seats "$stale". It skips the caller and anyone already requested. - Before this PR, the per-login request/read-back loop sat inline in the fill loop. The PR moves it into
ask()unchanged. - Stale change-requesters are added to the skip list, so the fill can't ask them a second time.
- The GraphQL read passes owner, name and number as variables (
-F numis sent as an Int). Nothing is spliced into the query text. - A failed read dies before any POST. The test "and posts nothing" covers this.
- An empty
$staleproduces no candidates and no skip entries. - A review whose
commitis null counts as stale, which is the safe direction.
- The re-ask loop only asks seats, via
- Scope: the PR changes
ship-pr/SKILL.md, two files underrequest-review/, andtests/run.sh. All of them are covered by the issue's "Files likely touched" plus tests. - Org rules and security (R3): no secrets. The test edits only add lines: one stub case and six checks. No existing assertion is changed. The new code makes only one read call, and it is passed variables. The writes are the same REST calls as before.
Not checked
- I did not run the script against real GitHub, because this run has no GitHub access. So two things are unconfirmed. First, that
latestOpinionatedReviewsreturns a standingCHANGES_REQUESTEDwith the older commit's oid. Second, that GitHub accepts a re-request of a reviewer whose change request stands. I believe both are documented behaviour. A first live run on a PR with a standing change request would confirm them. - I did not run the suite under busybox.
Nits (non-blocking)
ask()reuses the message "GitHub refused X; trying the next candidate." When it is re-asking a stale change-requester, there is no "next candidate" in that loop. A neutral wording would read better there.- When a stale re-ask is refused, the stale seat goes into the skip list, so the fill can't try it again. That is correct, but a one-line comment at
request-review.sh:107would say why$staleis there. - ship-pr step 8 depends on the person remembering to rerun the script after a fix. Board-sync could do this automatically on a push. That is a possible follow-up issue, not part of #82.
orion-setkernel
approved these changes
Nov 11, 2026
orion-setkernel
left a comment
Contributor
There was a problem hiding this comment.
Reviewed head 2fa3a5f.
No merge blockers. Approving.
What I checked and how
- Checks.
github.jsonlists one check run on head2fa3a5f:check, completed, success. It covers the tests,bin/generate --check, ShellCheck onrequest-review/*.shandtests/run.sh, and JSON validity (.github/workflows/check.yml). - Acceptance criteria of #82.
-
ship-prruns the request-review script once the PR is open and checks are running, and reports who was asked. Met by the new step 6 inplugins/setkernel/skills/ship-pr/SKILL.md. It runsrequest-review.sh <owner>/<repo> <n>and reports the output. It also covers the sk-agent refusal. - A push after changes were requested asks the standing change-requesters again. Met in three places:
- Step 8 in
ship-pr/SKILL.md. - The note in
request-review/SKILL.md. - The new
staleblock inrequest-review.sh. It readslatestOpinionatedReviewsandheadRefOidand asks again each seat whoseCHANGES_REQUESTEDreview is on an older commit. It skips the caller and any seat already requested. The PR author and Raghav are left out throughseats/pool.
- Step 8 in
- The plugin's tests pass. I ran
bash tests/run.shlocally on the head:798/798 passed.tests/run.shruns the script withshby default (sh_cmd=${SHELL_UNDER_TEST:-sh}, line 10).
-
- Correctness. I read the whole of
request-review.shon the head.- The
askfunction is the old loop body moved as-is. It updates the same globals (now,have,asked,failed). The refusal and dropped-login paths still pass their existing tests. - The stale seats are added to the skip list before the fill. So a seat that was just re-asked, or refused, is not tried a second time in the same run.
- The new test checks the order:
zz-a(stale) comes first, thenzz-bas the least busy seat. - If the GraphQL read fails, the script stops before any POST. The test
posts ''→0confirms this. - I read the jq filter by hand; the sandbox blocked running it on a sample. A review whose
commitis null gets.commit.oid= null, which is not equal to the head, so it counts as older. That is the right reading. A nullauthor(a deleted user) is skipped.
- The
- Scope. The PR changes
ship-pr/SKILL.md,request-review/SKILL.md,request-review/request-review.shandtests/run.sh. All of these are inside the issue's## Files likely touchedor are tests. - Org rules and security (R3). I found no secrets. The GraphQL variables come from
$repoand$num, and the script already checks both withcasepatterns before using them. They go in as-f/-Ffields, not spliced into the query. The only new GitHub call is a read; the writes are the same per-login POST as before. Thetests/run.shdiff only adds lines: one stubcaseand six checks. Whether the org's test-diff guard flags an added line inside the existing stub heredoc is not checked, because this repo'scheck.ymlhas no such guard and I have no GitHub access.
Not checked: I did not run the script against real GitHub, so the GraphQL query has not been exercised live. The test stub returns logins and never parses the query or the --jq filter. The field names (latestOpinionatedReviews, state, author.login, commit.oid, headRefOid) match GitHub's public schema as I know it. I did not run the busybox variant.
Nits (non-blocking)
- The stub's
api graphqlcase only echoes logins, so a typo in the query or the jq filter would still pass the tests. One way to cover it is a stub that returns a smalllatestOpinionatedReviewsJSON and lets--jqfilter it. Running it once on a real PR with a standing change request, as the PR body suggests, would also do. - In
ship-pr/SKILL.mdstep 8, "asks again every seat whose change request stands" leaves out that the caller is skipped.request-review.shskips$me. A few words would match the script. - The
askcomment lists the globals it updates (now, have, asked, failed). It also setsokandtry. This doesn't matter today, but a later caller could trip on it.
realRaghavGupta
approved these changes
Nov 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ship-prnow asks two seats to review a person's PR. It also asks a seat again after a push that answers that seat's change request. Until now, a PR from the owner or a Lead/raghav-dev session got no reviewers unless someone ran/request-reviewby hand. And after a fix, the seat whose change request still stood was never asked again, so the gate held the PR.What changed
plugins/setkernel/skills/ship-pr/SKILL.md:request-review.sh <owner>/<repo> <n>and report its output (who was asked, or why it stopped). Inside an sk-agent run the script refuses, because sk-agent asks its own peers. The skill says to note that and go on.plugins/setkernel/skills/request-review/request-review.sh:latestOpinionatedReviewsandheadRefOid. That gives each seat whose change request still stands on an older commit than the head. Each of those seats is asked again first, with the same one-login REST call and read-back as before.askfunction, so the re-ask and the fill share one code path. Its behaviour is unchanged.plugins/setkernel/skills/request-review/SKILL.md: one note that a re-run after a push asks standing change-requesters again.tests/run.sh:ghgets one new case, forapi graphql. It prints the logins in a state file, or fails when asked to.Why
latestOpinionatedReviews: it is GitHub's own view of whose review stands. A later comment doesn't lift a change request, and a dismissed one drops out. Reading it means the script doesn't rebuild that rule from the REST review list.How tested
bash tests/run.sh798/798 passed(includes the 6 new checks)bin/generate --checkgenerated files are currentjq emptyon marketplace.json, plugin.json, hooks.json, managed/*.jsonclaude plugin validate .Validation passed with warnings(only the expected missingversionwarning)Not run
shellcheck -S warning ...: shellcheck is not installed in this sandbox. CI runs it.SHELL_UNDER_TEST=dash bash tests/run.sh(and busybox): the sandbox asked for approval to run it, which nobody can give in this unattended run. CI's shell matrix, if it has one, covers this.Found (not changed)
Closes #82