Answer stability round 1: 0 🔴, 6 🟡 (0 misread); share the finish settings' checks with the project config, and test the finishing chunk's language, unread issues, cap, lock and backend

This commit is contained in:
2026-11-19 00:44:07 +01:00
parent 9b47b76f52
commit d99345fb8a
14 changed files with 106 additions and 29 deletions
+2 -2
View File
@@ -132,7 +132,7 @@ class JiraEpic:
def close(self, summary: str) -> None | Failure:
if self.finish is None:
return Failure(f"do-epic's settings name no transition to close an epic by: set `{JIRA_FINISH_TRANSITION}` and `{JIRA_FINISH_STATUS}`, as config.py's docstring shows")
return Failure(f"do-epic's settings name no transition to close an epic by: set `{JIRA_FINISH_TRANSITION}` and `{JIRA_FINISH_STATUS}` in ~/.claude-projects/do-epic/config.toml, to the names Jira shows, such as \"Mark as done\" and \"Done\"")
authorization = basic_auth(self.env_file)
if isinstance(authorization, Failure):
return authorization
@@ -141,7 +141,7 @@ class JiraEpic:
body = self.to_adf(summary)
if isinstance(body, Failure):
return Failure(f"cannot convert the summary to a Jira comment: {body.reason}")
# Read before the comment is posted, so that an epic that cannot move gets no summary, and a second try posts no second one.
# The transition is read before the comment is posted, so an epic that cannot move gets no summary.
transition = finishing_transition(self.epic.site, self.epic_key, self.finish, authorization, self.http)
if isinstance(transition, Failure):
return transition
+1 -1
View File
@@ -68,7 +68,7 @@ class EpicStore(typing.Protocol):
"""Whether the epic itself is in a status the tracker counts as done."""
def close(self, summary: str) -> None | Failure:
"""Posts summary, markdown, as a comment on the epic, then moves the epic to a status the tracker counts as done. A blank summary is refused, and so is an epic the tracker cannot move so, before anything is posted. Where the move fails after the comment is posted, the Failure says so."""
"""Posts summary, markdown, as a comment on the epic, then moves the epic to a status the tracker counts as done. Before anything is posted, it refuses a blank summary, and an epic the tracker cannot move to such a status. Where the move fails after the comment is posted, the Failure says so."""
def unfit(summary: str, labels: tuple[str, ...]) -> Failure | None:
+1 -1
View File
@@ -181,7 +181,7 @@ class Jira(Case):
no_such = JiraEpic(EPIC, self.env_file, self.jira, to_markdown, to_adf, Finish("Close", "Done"))
unconverted = JiraEpic(EPIC, self.env_file, self.jira, to_markdown, lambda markdown: Failure("adf-codec refused it"), Finish("Mark as done", "Done"))
for store, reason in (
(unnamed, "do-epic's settings name no transition to close an epic by: set `jira-finish-transition` and `jira-finish-status`, as config.py's docstring shows"),
(unnamed, "do-epic's settings name no transition to close an epic by: set `jira-finish-transition` and `jira-finish-status` in ~/.claude-projects/do-epic/config.toml, to the names Jira shows, such as \"Mark as done\" and \"Done\""),
(wrong_status, "ABC-12's transition 'Start' leads to the status 'In Progress', not to 'Done', which `jira-finish-status` names"),
(unconverted, "cannot convert the summary to a Jira comment: adf-codec refused it"),
):