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:
@@ -20,8 +20,9 @@ def listed(label: str, touches: Touches | None) -> str:
|
||||
|
||||
def append(store: RecordStore, items: list[int], text: str) -> Failure | None:
|
||||
"""Appends text, the entry of the chunk that took items, in place of each entry the record holds for the same items: a fix after the first entry changes what the chunk touched."""
|
||||
held = store.read()
|
||||
held = store.held()
|
||||
if isinstance(held, Failure):
|
||||
return held
|
||||
kept = re.sub(rf"^## Chunk {', '.join(map(str, items))}, {STAMPED},.*?(?=^## |\Z)", "", held, flags=re.M | re.S)
|
||||
return store.write(f"{kept.rstrip() or TITLE}\n\n{text}")
|
||||
kept = re.sub(rf"^## Chunk {', '.join(map(str, items))}, {STAMPED},.*?(?=^## |\Z)", "", held.text, flags=re.M | re.S)
|
||||
written = store.write(f"{kept.rstrip() or TITLE}\n\n{text}", held.version)
|
||||
return written if isinstance(written, Failure) else None
|
||||
|
||||
Reference in New Issue
Block a user