Bundle every unblocked item of a release that fires the same review passes, whatever its purpose, and ship each item above R 5 alone
This commit is contained in:
+6
-2
@@ -10,6 +10,8 @@ TOP_SCORE = 10
|
||||
LEVELS = {"L": 4, "E": 3, "I": 5}
|
||||
# The least R each impact level I allows, since a severe enough consequence outranks how unlikely it is.
|
||||
RISK_FLOOR = {4: 5, 5: 7}
|
||||
# The highest R an item may have and still share a chunk; `docs/decisions.md` → `chunks:` says why 5.
|
||||
BUNDLE_MAX_R = 5
|
||||
EXEMPTIONS = ("", "decision", "defect", "owner", "principle", "question", "security")
|
||||
# The column naming the items that block an item: each must be done before the item starts.
|
||||
BLOCKED_BY = "Blocked by"
|
||||
@@ -201,8 +203,10 @@ def renames(todo: str) -> set[tuple[int, int, int]] | Failure:
|
||||
|
||||
|
||||
def bundle_candidates(found: list[Item], first: Item) -> list[Item]:
|
||||
"""The items of first's release, in the table's order, that a chunk taking first may take too: those that do not wait once the chunk's own items count as done."""
|
||||
chunk = {item.id for item in found if item.release == first.release}
|
||||
"""The items of first's release, in the table's order, that a chunk taking first may take too: those that do not wait once the chunk's own items count as done. An item above BUNDLE_MAX_R ships alone."""
|
||||
if first.scores.get("R", 0) > BUNDLE_MAX_R:
|
||||
return []
|
||||
chunk = {item.id for item in found if item.release == first.release and item.scores.get("R", 0) <= BUNDLE_MAX_R}
|
||||
# Dropping an item that waits may make another wait on it, so drop until none waits.
|
||||
while waits := waiting(found, chunk) & chunk:
|
||||
chunk -= waits
|
||||
|
||||
Reference in New Issue
Block a user