Answer product-owner round 1: 0 🔴, 1 🟡 (0 misread); stop loop-claude where every item left awaits a person's merge
CI / tests (pull_request) Successful in 3m23s
CI / tests (pull_request) Successful in 3m23s
This commit is contained in:
@@ -40,6 +40,8 @@ class NextChunk:
|
||||
class NoItem:
|
||||
"""Why the plan names no item for the next chunk, as a sentence the worker reads."""
|
||||
why: str
|
||||
# Whether why names pull requests that await a person's merge, so that no chunk starts until one is merged.
|
||||
awaits_merge: bool = False
|
||||
|
||||
|
||||
def cut_name(cut: LastCut) -> str | None:
|
||||
@@ -81,8 +83,11 @@ def planned(read: Plan | Failure, cut: LastCut, default: str, branch: str, outsi
|
||||
return NoItem(f"{where} holds no item for {upcoming}, and changes are unreleased, and its release review has landed, so that release is finished and ready to cut. The working loop stops here. If todo.md renamed that release instead, add `- <old release> renamed to <new release>` to todo.md's `## Renamed` section.")
|
||||
return NoItem(f"{where} holds no item for {upcoming}, and no change is unreleased, so that release is to be planned first.")
|
||||
first = pick.item
|
||||
if first is None and pick.release is not None:
|
||||
merges = awaited_merges(weighed.carried, pick.release)
|
||||
return NoItem(f"every item of release {version(pick.release)} in {where} waits.{merges}", bool(merges))
|
||||
if first is None:
|
||||
return NoItem(f"every item of release {version(pick.release)} in {where} waits.{awaited_merges(weighed.carried, pick.release)}" if pick.release is not None else f"{where}'s items table holds no item.")
|
||||
return NoItem(f"{where}'s items table holds no item.")
|
||||
held = weighed.carried
|
||||
# Every carried item takes one release, the next.
|
||||
over = CarriedOver(next(item.release for item in held if item.id == weighed.moved[0]), weighed.moved) if weighed.moved else None
|
||||
@@ -90,6 +95,8 @@ def planned(read: Plan | Failure, cut: LastCut, default: str, branch: str, outsi
|
||||
first = next((item for item in held if item.id == item_id), None)
|
||||
if first is None:
|
||||
return NoItem(f"{where} holds no item {item_id}, the one --item names; it may have shipped.")
|
||||
if first.awaits_merge:
|
||||
return NoItem(f"item {item_id}, the one --item names, is finished on the branch of pull request {first.awaits_merge}, which awaits a person's merge.")
|
||||
return NextChunk(held, first, f"{first.tagline}\n\n{first.detail}".strip(), branch, over, item_id is not None)
|
||||
|
||||
|
||||
@@ -101,5 +108,5 @@ def awaited_merges(found: list[Item], release: Release) -> str:
|
||||
pulls.setdefault(item.awaits_merge, []).append(str(item.id))
|
||||
if not pulls:
|
||||
return ""
|
||||
named = listed([f"{pull}, which finishes item{'s' if len(ids) > 1 else ''} {listed(ids, 'and')}" for pull, ids in pulls.items()], "and")
|
||||
return f" Under `merge = \"human\"`, a person's merge is awaited of pull request {named}. The working loop stops here until one is merged."
|
||||
named = "; ".join(f"{pull}, which finishes item{'s' if len(ids) > 1 else ''} {listed(ids, 'and')}" for pull, ids in pulls.items())
|
||||
return f" Under `merge = \"human\"`, these pull requests await a person's merge: {named}. The working loop stops here. Once a person has merged one, or turned one back into a draft, run loop-claude again."
|
||||
|
||||
Reference in New Issue
Block a user