Answer principles round 1: 2 🔴, 9 🟡 (0 misread); explicit record versions in place of the Confluence store's hidden state, the routing ruling filed as item 393 for 0.12.0, rule-hook catching heavy runs through uv, poetry, sudo and doas, one unreleased heading, one owner of the no-item message, typed Jira issues, a turn that gives its failure as a value, outcome tests for the Atlassian client, an Emptied reason type, an injected clock and git in touch-predictions, and paired record names
This commit is contained in:
@@ -73,11 +73,11 @@ def main(argv: list[str]) -> int:
|
||||
|
||||
|
||||
def update(record: RecordStore, archive: pathlib.Path, checkout: Checkout, home: str, reset_at: str | None) -> Updated | Failure:
|
||||
text = record.read()
|
||||
if isinstance(text, Failure):
|
||||
return text
|
||||
held = record.held()
|
||||
if isinstance(held, Failure):
|
||||
return held
|
||||
# An empty record starts with its title.
|
||||
text = text or "# Reading cost\n"
|
||||
text = held.text or "# Reading cost\n"
|
||||
figures = new_figures(text, archive, checkout, home)
|
||||
if isinstance(figures, Failure):
|
||||
return figures
|
||||
@@ -86,9 +86,8 @@ def update(record: RecordStore, archive: pathlib.Path, checkout: Checkout, home:
|
||||
readings = readings_of(text)
|
||||
if isinstance(readings, Failure):
|
||||
return readings
|
||||
if marks and (unwritten := record.write(text)):
|
||||
return unwritten
|
||||
return Updated(len(figures), readings)
|
||||
written = record.write(text, held.version) if marks else None
|
||||
return written if isinstance(written, Failure) else Updated(len(figures), readings)
|
||||
|
||||
|
||||
def new_figures(record: str, archive: pathlib.Path, checkout: Checkout, home: str) -> list[str] | Failure:
|
||||
|
||||
Reference in New Issue
Block a user