Skip to content

Sync pstack-claude 0.9.81 (t3-pstack 1.0.9) - #7

Merged
chhoumann merged 6 commits into
mainfrom
upstream-sync/24c96b1
Oct 10, 2026
Merged

chhoumann merged 6 commits into
mainfrom
upstream-sync/24c96b1

Conversation

@chhoumann

@chhoumann chhoumann commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner

Merges pstack-claude 0.9.80 and 0.9.81 (upstream 24c96b1) and releases t3-pstack 1.0.9. No new change from Lauren Tan's pstack this round, and models.json is unchanged.

What came in from upstream

  • 0.9.80 (pstack-claude#245): watch-pr and ship-pr read the base branch's current commit (baseRef { target { oid } }) instead of the PR's recorded baseRefOid, which GitHub does not always move when the base advances. The watcher's PR facts now come from one GraphQL query instead of gh pr view, and every GraphQL read goes through one graphql() method on the reader that fails closed when the response carries errors. The empty-string review decision handling for gh pr view is gone with that command.
  • 0.9.81 (pstack-claude#247): ship-pr inspect reads a closed or merged PR whose base branch was deleted, and Pi retries orphan cleanup. t3-pstack does not use Pi; it comes in as upstream ships it.

Adaptations

  • Merge conflicts: only the version lines (VERSION, package.json, the marketplace and three plugin manifests) and CHANGES.md. The manifests keep the t3-pstack overlay, and CHANGES.md keeps both sides.
  • Settle window overlay: github.ts auto-merged with the hook intact (GhGitHubReader.reviewActivity still delegates to readReviewActivity). The settle read is its own GraphQL call, and it cannot go through upstream's new graphql() method: that method returns only data.repository.pullRequest, and the settle query also reads the top-level viewer to exclude the gh viewer's own activity. Routing it through would mean changing upstream's method or adding a second API call per poll. Instead parseReviewActivity in settle.ts checks errors itself and throws the same retryable missing-key failure, so the settle read fails closed like every other watcher read. A new test in settle.test.ts covers it. The github.ts hook is unchanged, and settle behavior is otherwise unchanged.
  • Release: version 1.0.9 in all manifests, with a CHANGES.md entry.

Verification

  • bun test tests/ --timeout 30000: 1222 pass, 0 fail.
  • watch-pr suite (bun test in poteto-mode/scripts): 256 pass, 1 fail, the known local-only orch test on Graphite colour codes. bun run typecheck is clean.
  • bun tools/generate.mjs --check and t3-sheet.mjs against the local sheet and catalog pass.
  • Smoke: watch-pr --owner chhoumann --repo t3-pstack --pr 6 --status-only --settle 300 renders the merged PR in pretty and JSON modes with exit 0, with baseRefOid read as main's current tip.
  • Smoke on this open PR: watch-pr --pr 7 --status-only --settle 300 reads the settle state from GitHub and renders settling with the window starting at the PR's opening, exit 0.

mshk and others added 6 commits October 9, 2026 13:32
* test(poteto-mode): catch stale base ref OIDs

* fix(poteto-mode): read current base ref targets

* style(poteto-mode): format base ref regression

* refactor(watch-pr): unwrap GraphQL once and drop the gh pr view leftovers

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.

---------

Co-authored-by: mshk <29593+mshk@users.noreply.github.com>
Co-authored-by: Michael Denyer <97485362+michael-denyer@users.noreply.github.com>
* fix(shipping): inspect terminal PRs after base deletion

* fix(pi): retry orphan cleanup after inspection recovers
# Conflicts:
#	.claude-plugin/marketplace.json
#	CHANGES.md
#	VERSION
#	package.json
#	plugins/pstack/.claude-plugin/plugin.json
#	plugins/pstack/.codex-plugin/plugin.json
#	plugins/pstack/.github/plugin/plugin.json
The watcher's reads now fail closed on GraphQL errors through the
reader's graphql() method. The settle window's read cannot use it,
because it also reads the top-level viewer, so parseReviewActivity
checks errors itself and throws the same retryable failure.
@chhoumann
chhoumann merged commit 891b919 into main Oct 10, 2026
15 checks passed
@chhoumann
chhoumann deleted the upstream-sync/24c96b1 branch October 10, 2026 07:53
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.

3 participants