refactor(lib)!: lift stack graph algorithms onto StackMetadata - #65
Open
lettertwo wants to merge 2 commits into
Open
refactor(lib)!: lift stack graph algorithms onto StackMetadata#65lettertwo wants to merge 2 commits into
lettertwo wants to merge 2 commits into
Conversation
lettertwo
force-pushed
the
stack-metadata-refactor
branch
from
August 28, 2026 03:13
dc5b4a5 to
220c65c
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 is the refactor that makes room for
gh stack(github/gh-stack) as a second stackprovider alongside Graphite. No provider yet, and no CLI change.
git-workon-lib/src/stack/metadata.rsis new: aStackMetadatastruct plusenumerate,current,and
changeset_walk.graphite.rsshrinks toread_metadata.Stackgainsnumber: Option<u64>,keyed by every member branch rather than by the stack root.
Only
enumeratetakes a&Repository, so onlyenumeratecan prune ghost branches.currentandchangeset_walkmust not prune, since routing needs a deleted stack node visible to tell it from atypo, and changeset assembly walks through a ghost to reach live descendants.
refactor(lib)!because theworkonlibrary surface moves.Design notes in
docs/adr/028-provider-neutral-stack-metadata.md, section 1.Testing: zero test edits. The existing Graphite suites are the safety net. 585 tests, clippy clean.
Stack created with GitHub Stacks CLI • Give Feedback 💬