51 lines
1.7 KiB
Python
51 lines
1.7 KiB
Python
"""The verdicts cycle.judge.verdict_from builds from the judge's reply. They sit outside cycle/, since routing reads them and cycle imports routing."""
|
|
import dataclasses
|
|
|
|
|
|
@dataclasses.dataclass(frozen=True)
|
|
class Interrupt:
|
|
evidence: str
|
|
question: str
|
|
# The judge's quote showing that the worker's cited escalation trigger fired; empty for none.
|
|
escalation: str = ""
|
|
# The highest L the judge saw the worker take into the chunk, 0 for none: an escalation steps up from the rung that L picks.
|
|
highest_likelihood_taken_in: int = 0
|
|
release_ready: bool = False
|
|
# How many transcript entries the judge read, which escalation_mark.stamped stamps. An escalation the verdict carries moves the route's mark there. None means it was never stamped, and then its escalation doesn't step the worker.
|
|
entries_read: int | None = None
|
|
|
|
|
|
@dataclasses.dataclass(frozen=True)
|
|
class QuotedAnswer:
|
|
"""The worker asked a question that README.md or the records answer. The answer field quotes the passage."""
|
|
evidence: str
|
|
question: str
|
|
answer: str
|
|
# As on Interrupt.
|
|
escalation: str = ""
|
|
highest_likelihood_taken_in: int = 0
|
|
entries_read: int | None = None
|
|
|
|
|
|
@dataclasses.dataclass(frozen=True)
|
|
class Finished:
|
|
evidence: str
|
|
|
|
|
|
@dataclasses.dataclass(frozen=True)
|
|
class Unfinished:
|
|
evidence: str
|
|
# As on Interrupt; the worker also rises to the rung that L picks.
|
|
highest_likelihood_taken_in: int = 0
|
|
# As on Interrupt.
|
|
escalation: str = ""
|
|
# The highest E + I the judge saw the worker take into the chunk, 0 for none.
|
|
highest_escape_and_impact_taken_in: int = 0
|
|
# As on Interrupt.
|
|
entries_read: int | None = None
|
|
|
|
|
|
Verdict = Interrupt | QuotedAnswer | Finished | Unfinished
|
|
# The verdicts that may carry an escalation.
|
|
Escalating = Interrupt | QuotedAnswer | Unfinished
|