Answer stability round 1: 0 🔴, 6 🟡 (1 misread); name a checkout by its real path, pick a chunk's repo once, test the step line, the repo's model and ladder, and a clone
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
"""A Jira epic's description as the record of do-epic, the tool that will drive one epic.
|
||||
"""A Jira epic's description as the record of do-epic, the tool that drives one epic.
|
||||
|
||||
The description holds a language line, a line that caps the chunks running at once, and the sections Goals, Audience, Scoring (the formula and the bar) and Decisions. They are read and written one at a time through `EpicDescription`, and a write leaves every other line of the markdown as it was. Goals and Audience change only where the human approved in an interrupt, which `write_section` takes as `approved`; `EpicDescription` refuses the change otherwise."""
|
||||
import dataclasses
|
||||
@@ -16,6 +16,8 @@ LANGUAGE_LINE = re.compile(r"^\*\*Language:\*\* (.*?)\s*$")
|
||||
# The line that caps how many of the epic's chunks run at once. Three readers, seated as the human who writes an epic's description, picked this spelling from four candidates, 2-1 over `**Parallel chunks:**`, which reads as a count of what runs now.
|
||||
CAP = "**Max parallel chunks:**"
|
||||
CAP_LINE = re.compile(rf"^{re.escape(CAP)}(.*?)\s*$")
|
||||
# A line that opens with CAP's words in another spelling. It is refused, since the epic would otherwise run on the cap of 1 without a word.
|
||||
NEAR_CAP_LINE = re.compile(r"^[\s*_>#-]*max parallel chunks", re.IGNORECASE)
|
||||
|
||||
|
||||
def read_section(text: str, name: str) -> str | Failure:
|
||||
@@ -70,6 +72,8 @@ def parallel_chunks_in(text: str) -> int | Failure:
|
||||
if re.fullmatch(r"[1-9][0-9]*", value):
|
||||
return int(value)
|
||||
return Failure(f"the epic's description caps its chunks with `{CAP} {value}`, which is not a whole number of 1 or more, such as `{CAP} 2`")
|
||||
if not fenced and NEAR_CAP_LINE.match(line):
|
||||
return Failure(f"the epic's description holds the line `{line.strip()}`, which do-epic doesn't read as the epic's cap: write it as a line of its own, spelt `{CAP} 2`")
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user