feat(lib): add gh-stack as a stack provider - #66
Merged
Conversation
lettertwo
force-pushed
the
gh-stack-read-path
branch
from
August 28, 2026 03:13
961bca3 to
f95c5e4
Compare
lettertwo
force-pushed
the
gh-stack-read-path
branch
from
August 29, 2026 23:35
f95c5e4 to
3458eb0
Compare
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.
This PR adds gh-stack as a provider that
list,find, routing, and changeset assembly can read.Read-only: nothing here writes a gh-stack file or links a worktree.
git-workon-lib/src/stack/gh_stack.rsparses gh-stack's JSON into aStackMetadata.StackModel::detectrecognizes a gh-stack repo, andworkon.stackModelacceptsgh-stack.Detection checks Graphite first.
.graphite_repo_configcomes from a deliberate repo-widegt init, while agh-stackfile can appear as a side effect of onegh stack addin a singleworktree.
Two read rules differ from Graphite's. A truncated read retries 3 times and then skips the file,
since upstream's
os.WriteFiletruncates in place and a partial file is the expected steady stateduring a concurrent
gh stackrun.schemaVersion > 1is a hard error and is never retried. Bothin
docs/adr/028-provider-neutral-stack-metadata.md.Reads never invoke
gh.Changeset.titleisNoneunder gh-stack as a result.git-workon-fixture/src/fixture_builder.rsgainsgh_stack,gh_stack_at,raw_gh_stack, andfour predicates. Worth reading first, since the gh-stack tests are written against them.
Testing: 607 tests, clippy clean.
Stack created with GitHub Stacks CLI • Give Feedback 💬