From 868169ccb694bebcf2a932e24c87074dbba2924f Mon Sep 17 00:00:00 2001 From: Lilleman Date: Fri, 20 Nov 2026 12:30:23 +0100 Subject: [PATCH] =?UTF-8?q?Answer=20stability=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=201=20=F0=9F=9F=A1=20(0=20misread);=20pin=20the?= =?UTF-8?q?=20sentence=20once=20at=20worked=5Fby,=20and=20the=20product-ow?= =?UTF-8?q?ner=20and=20prose=20fixes=20beside=20it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/do_epic/findings.py | 9 +++++---- bin/do_epic/test_findings.py | 22 +++++++++++++++------- bin/do_epic/test_finish.py | 3 +-- bin/do_epic/test_scheduler.py | 2 ++ 4 files changed, 23 insertions(+), 13 deletions(-) diff --git a/bin/do_epic/findings.py b/bin/do_epic/findings.py index 87182108..7a87bf2a 100644 --- a/bin/do_epic/findings.py +++ b/bin/do_epic/findings.py @@ -7,7 +7,7 @@ import fcntl import pathlib import typing -from do_epic.repo_pick import CLAUDE_LABEL, HUMAN_LABEL, LabelRepos, of_label, REPO_PREFIX, REVIEW_LABEL, team_label +from do_epic.repo_pick import CLAUDE_LABEL, HUMAN_LABEL, label_of, LabelRepos, of_label, REPO_PREFIX, REVIEW_LABEL, team_label from do_epic.backend.protocol import EpicIssue, EpicStore from do_epic.epic_record import EpicRecord from failure import Failure @@ -23,8 +23,8 @@ RECORD_DECISION = "--record-decision" def worked_by(team: LabelRepos) -> str: - """The labels that say where an issue is worked, as do-epic's scheduler reads them. Each repo the team's table names takes the team's label, and `repo:` stays for any other.""" - named = [f"`{label}` for the repo {name}" for name in dict.fromkeys(team.values()) if (label := team_label(name, team))] + """The labels that say where an issue is worked, as do-epic's scheduler reads them: for each repo the team's table names, the label on its first line for that repo, and `repo:` for any other repo.""" + named = [f"`{label}` for the repo {name}" for name in sorted(set(team.values())) if (label := team_label(name, team))] repos = ", ".join([*named, f"`{REPO_PREFIX}` for {'any other repo' if named else 'the repo'} that works it"]) return f"{repos}, `{CLAUDE_LABEL}` for work of Claude's that changes no repo, or `{HUMAN_LABEL}` for a task of the human's" @@ -48,7 +48,8 @@ def instructions(epic: str, launcher: pathlib.Path, language: str, team: LabelRe next_step = "" if issue: parent = f" {PARENT} {issue.parent}" if issue.parent != epic else "" - label = next((f" {LABEL} {each}" for each in issue.labels if of_label(each, team)), "") + pick = next((found for each in issue.labels if (found := of_label(each, team))), None) + label = f" {LABEL} {label_of(pick, team)}" if pick else "" next_step = f"Where the repo's rules ask for a change to ship as more than one pull request, finish only this issue's pull request, and file only the next one as an issue that waits for it, with `{launcher} {epic} {FILE} \"\" {BLOCKED_BY} {issue.key}{parent}{label}` and its detail on stdin. " return ( f"File a finding about one of the epic's goals in the epic, with `{launcher} {epic} {FILE} \"\" {LABEL}