Answer stability round 1: 1 🔴, 8 🟡 (0 misread); finish a release only once it holds no item, say no cut yet on an untagged branch, move tagged to ask.py, add three missing tests

This commit is contained in:
2026-10-30 13:01:58 +01:00
parent fd19b90f07
commit 10f10df3e9
13 changed files with 54 additions and 28 deletions
+10 -1
View File
@@ -1,12 +1,16 @@
"""An interrupt's question as loop-inbox lists it, and its file format.
"""An interrupt's question as loop-inbox lists it, and how its file is read; `tagged` writes the kind that `ask_state` reads.
The ask's state says whether the loop waits for an answer, or has claude open for it, on the loop's own terminal or in loop-inbox."""
import dataclasses
import json
import pathlib
import typing
from loop_claude.hand_over import ClaudeCommand
if typing.TYPE_CHECKING:
from _typeshed import DataclassInstance
@dataclasses.dataclass(frozen=True)
class Asking:
@@ -28,6 +32,11 @@ class OpenInInbox:
AskState = Asking | OpenOnTerminal | OpenInInbox
def tagged(value: "DataclassInstance") -> dict[str, object]:
"""value's fields, with its kind, which ask_state and answers.received read it back by."""
return dataclasses.asdict(value) | {"kind": type(value).__name__}
@dataclasses.dataclass(frozen=True)
class Ask:
"""An interrupt's question, as loop-inbox lists it."""