Answer stability round 2: 0 🔴, 1 🟡 (0 misread); record why one repo stays unsplit, and fix the docstring on when the comment is posted
CI / tests (pull_request) Has been cancelled

This commit is contained in:
2026-11-18 19:34:20 +01:00
parent 860ff80973
commit 508c82de66
+2 -1
View File
@@ -1,6 +1,6 @@
"""Splits an epic item that changes several repos into one sub-task per repo (docs/decisions.md → `do-epic: drives one Jira epic …`).
A headless claude call with a JSON schema, as repo_pick makes, predicts from the code which repos the item changes and what changes in each. Where that is more than one repo, `split` files a sub-task under the item for each, labelled for its repo as repo_pick labels an item, and then labels the item SPLIT_LABEL. The item stays the issue that tracks the whole change: `finished` says it is done once every sub-task is. An item a person filed, as against one do-epic filed, gets a comment for the team first, in the epic's language."""
A headless claude call with a JSON schema, as repo_pick makes, predicts from the code which repos the item changes and what changes in each. Where that is more than one repo, `split` files a sub-task under the item for each, labelled for its repo as repo_pick labels an item, and then labels the item SPLIT_LABEL. The item stays the issue that tracks the whole change: `finished` says it is done once every sub-task is. An item a person filed, as against one do-epic filed, gets a comment for the team, in the epic's language, once its sub-tasks are filed."""
import dataclasses
import json
@@ -74,6 +74,7 @@ def split(store: EpicStore, issue: EpicIssue, by_person: bool, rule: str, langua
have = {pick.name for task in read if task.parent == issue.key for label in task.labels if isinstance(pick := of_label(label), Repo)}
repos = tuple(dict.fromkeys([*sorted(have), *(part.repo for part in predicted.parts)]))
if len(repos) < 2:
# Left as it is even where an earlier, failed run filed one sub-task and this prediction names only that repo: marking the item split would make a person's own sub-task for one repo turn their ordinary issue into a tracking parent. The stray sub-task is labelled for its repo and harmless.
return Split((), ())
if by_person and not predicted.comment:
return Failure("the repo split gave no comment for the team on a person's issue")