Skip to content

feat(pstack): give gh-stack inspect an ordered member list - #20

Open
shishiv wants to merge 3 commits into
feat/robust-port-feature-mapfrom
feat/robust-port-stack-members
Open

feat(pstack): give gh-stack inspect an ordered member list#20
shishiv wants to merge 3 commits into
feat/robust-port-feature-mapfrom
feat/robust-port-stack-members

Conversation

@shishiv

@shishiv shishiv commented Aug 26, 2026

Copy link
Copy Markdown
Owner

Why

Delivery treated stack membership as a JSON walk in the extension. inspect() copied the current branch and Graphite could invent a SHA from fake JSON. Auto-merge needs a parent-first chain of PR numbers and head SHAs. Graphite is not a delivery backend.

Scope

StackSnapshot is { kind: "proven", members } or { kind: "unproven" }. GhStackBackend.inspect() parses gh stack view --json with the same single-chain rules as stackPullRequestsThrough. membersThrough returns a prefix or undefined. StackBackendName is "gh-stack". GraphiteBackend and the gt probe are gone. Tools take backend: Type.Literal("gh-stack"). Orch Graphite scripts are untouched. stackPullRequestsThrough stays until phase 9.

Tradeoffs

pstack_delivery still calls execute({ kind: "inspect" }). Membership lives on inspect(). Phase 9 switches the tool. Empty members: [] is not the failure signal.

Blast Radius

Receipts, pstack_create_receipt, and pstack_delivery only accept gh-stack. Callers that passed "graphite" fail validation. Shipping skills describe one backend.

Verification

npm run verify:deterministic in /home/shiv/github/pi-pstack-robust-p8. 76 tests. Format, lint, and typecheck passed. Topology fixtures use six-character SHAs so fork and cycle walks run.

Made with Cursor

Delivery membership is proven parent-first tuples from gh stack view JSON.
Graphite is removed from delivery contracts so stack proof has one backend.
Short fixture SHAs never reached the fork and cycle walks. Drop the leftover availableCommands factory argument.
The phase 8 diff added no comments. These lines were narration on restore, preflight, a private helper, Benny speculation, and a types banner.
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