Repository navigation
fix(poteto-mode): observe current base branch targets - #245
Merged
michael-denyer merged 4 commits intoOct 9, 2026
Merged
Conversation
…vers GhGitHubReader reads every GraphQL envelope through one graphql() method, which checks errors and returns data.repository.pullRequest for all four queries. Before, only the PR facts query checked errors. An open PR's landing revision narrows the parsed facts with text() instead of re-parsing a copy of the raw response under the old baseRefOid key. ship-pr inspect builds its revision from the GraphQL fields directly. parseLandingRevision parses the saved record only, so its optional context parameter goes. The empty-string review decision came from gh pr view, which the facts reader no longer runs. GraphQL returns null, and an empty string is rejected like any other unknown value. The transport fake's pr view branch and the baseRefOid decoys in shared fixtures go with it.
Owner
|
Thank you for this, @mshk. The fix is right and the regression tests made it easy to build on. Reading I pushed one follow-up commit, e5cf03d, on top of your branch:
Verified in the scripts package with |
Merged
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.
Why
The watcher and shipping helper can miss a destination branch advance because
PullRequest.baseRefOidcan stay fixed. ReadbaseRef.target.oidwith the other PR facts so snapshot validation and cancellation compare the current destination.Closes #244.
What changed
Scope
This change covers the watcher and shipping readers. It keeps the landing record format and CLI behavior. A version bump and the disposable live merge test remain release work.
Tradeoffs
The watcher uses one GraphQL query for head and base facts. A separate query after
gh pr viewwould permit those facts to come from different observations.Blast Radius
PR monitoring and pending merge cancellation now observe destination branch movement. Missing base data produces an error instead of a valid landing record.
Verification
bun run test,bun run typecheck, andbunx prettier@3.6.2 --check .inplugins/pstack/skills/poteto-mode/scriptspassed with 232 tests.bun tools/generate.mjs --checkpassed.bun test tests/ --timeout 30000passed with 1,185 tests and 40 skips. The default five-second timeout expired in an existing worktree fixture; the longer run passed.Follow-up commit
e5cf03d reads every GraphQL envelope through one
graphql()method on the reader, so all four queries fail closed onerrors. The open-PR landing revision narrows the parsed facts instead of re-parsing a copy of the raw response,ship-pr inspectbuilds its revision from the GraphQL fields directly, and thegh pr viewempty-string review decision and its fixtures are removed.