Skip to content

feat(lib): add gh-stack as a stack provider - #66

Merged
lettertwo merged 7 commits into
stack-metadata-refactorfrom
gh-stack-read-path
Aug 30, 2026
Merged

feat(lib): add gh-stack as a stack provider#66
lettertwo merged 7 commits into
stack-metadata-refactorfrom
gh-stack-read-path

Conversation

@lettertwo

@lettertwo lettertwo commented Aug 28, 2026

Copy link
Copy Markdown
Owner

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.rs parses gh-stack's JSON into a StackMetadata.
StackModel::detect recognizes a gh-stack repo, and workon.stackModel accepts gh-stack.

Detection checks Graphite first. .graphite_repo_config comes from a deliberate repo-wide
gt init, while a gh-stack file can appear as a side effect of one gh stack add in a single
worktree.

Two read rules differ from Graphite's. A truncated read retries 3 times and then skips the file,
since upstream's os.WriteFile truncates in place and a partial file is the expected steady state
during a concurrent gh stack run. schemaVersion > 1 is a hard error and is never retried. Both
in docs/adr/028-provider-neutral-stack-metadata.md.

Reads never invoke gh. Changeset.title is None under gh-stack as a result.

git-workon-fixture/src/fixture_builder.rs gains gh_stack, gh_stack_at, raw_gh_stack, and
four predicates. Worth reading first, since the gh-stack tests are written against them.

Testing: 607 tests, clippy clean.


Stack created with GitHub Stacks CLIGive Feedback 💬

@lettertwo lettertwo changed the title gh stack read path feat(lib): add gh-stack as a stack provider Aug 28, 2026
@lettertwo
lettertwo merged commit c868a88 into main Aug 30, 2026
25 checks passed
@lettertwo
lettertwo deleted the gh-stack-read-path branch August 30, 2026 00:23
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