Repository navigation
feat(implement): split an issue that is too large into sub-issues (#68) - #94
Open
glennfaison wants to merge 1 commit into
Open
glennfaison wants to merge 1 commit into
glennfaison wants to merge 1 commit into
Conversation
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.
implement-github-issuecan now split an issue that is too large for one PR into linked sub-issues, bounded by a newmax_depthinput. Design and trade-offs are indocs/adr/0015-split-an-issue-that-is-too-large.md(ADR first, as the issue asked).Closes #68.
Summary
Size: large, separate areas, or a first read of the code). Rule in the newreferences/split.md. An issue with a branch already on origin is never split.max_depth(default1). Depth = number of ancestors, read from GitHub's native sub-issue links. Split only when depth <max_depth; with the default a sub-issue is never split again,0turns it off, an unreadable depth never splits. At the limit the issue goes toready-for-humanwith its proposed slices.file-github-issues(newparentinput: the parent is never a duplicate of a slice, bodies startPart of #N.), then linked withlink_sub_issue. Native links, not body text, because anyone can write body text.#N split into #A, #B. The parent stays open andready-for-agent, gets one trusted<!-- agent:split children=A,B -->comment, and noagent:pr-open. The marker is the commit point and a newrequires, so a split parent does not use up theimplement-github-issuesbatch. A split that died partway is finished from the sub-issues that exist.reconcile-github-issuescloses the parent when all sub-issues are closed as completed (#N closed: all sub-issues closed). Keep-open parents stay open. A sub-issue closed as not planned sends the parent toready-for-human, never back to an agent. Open sub-issues leave it alone.lease_held. Rule added under Leases in the protocol, and the scenario checker enforces it: only a skill that holds the lease passeslease_held=true, only for that item, only to an item skill that lists it; a group skill never does.parent_of,children_of,depth_of,link_sub_issue(lib.sh, with puredepthOf,canSplit,splitComment,splitChildreninhelpers.mjs), themax_depthdefault, the marker, prompts regenerated withnpm run sync, and a changeset.Acceptance criteria
implement-github-issue's contract has the new result,max_depth, and theotherwrite for new issues (andcalls: file-github-issues).lease_held=truefrom a caller that does not hold the lease (negative tests).Evidence / verification
HUSKY=0 npm run check(lint, validate, plugin version, tests): passes. 467 node tests, 186 shell checks (new stubgh apiendpoints for sub-issue links, covering no parent, link, idempotent link, grandchild depth, an unreadable parent being an error rather than "none", and cycles). Negative tests show the checker rejecting a split at or past the limit, an unreadable depth, unlinked or labelled sub-issues, a missing marker,agent:pr-openon a split parent, closing a parent with an open or rejected sub-issue, and badlease_helduse.ADR check
Consistent with ADR 0010 to 0014. It uses
lease_held(ADR 0011 gap 10) and extends the contract and scenario checker (0010, 0012). No existing decision is reversed.Out of scope / things to look at
/parent,/sub_issues, POST withsub_issue_id) are exercised only against the stub intests/lib.test.sh. Theghsimulator still listsapias planned, and its replay test does not model the link. Worth one manual run against a scratch repo.file-github-issuestakes no lease, solease_held=trueis enforced by the checker and negative tests rather than exercised by a golden scenario. The ADR says so.ready-for-agentrather than getting a newagent:splitstate label (a fifth mutex label across setup, repair and the diagram). Rationale and the alternative are in the ADR.max_item_failures.