Answer architecture round 4: count a repeated round number, move larv-review's record commands to record.py, give the UTC stamp and the blockquote one home each, check the history's sample entry, and state why a split and a fall call more seats
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import re
|
||||
import time
|
||||
|
||||
from markdown_text import quoted
|
||||
from utc_stamp import STAMPED
|
||||
|
||||
FINISHED = "Verdict: finished"
|
||||
STAMP = "%Y-%m-%dT%H:%M:%SZ"
|
||||
STAMPED = r"\d{4}-\d\d-\d\dT\d\d:\d\d:\d\dZ"
|
||||
FINISHED_AT = re.compile(rf"^({STAMPED}) {re.escape(FINISHED)}$", re.MULTILINE)
|
||||
|
||||
|
||||
@@ -25,12 +25,3 @@ def answered(question: str, sources: str, answer: str, evidence: str) -> str:
|
||||
|
||||
def stopped(why: str) -> str:
|
||||
return f"Stopped: {why}"
|
||||
|
||||
|
||||
# Blockquoted, so evidence holding blank lines still ends visibly where the text after it starts.
|
||||
def quoted(passage: str) -> str:
|
||||
return "\n".join(f"> {line}" for line in passage.splitlines())
|
||||
|
||||
|
||||
def utc(at: float) -> str:
|
||||
return time.strftime(STAMP, time.gmtime(at))
|
||||
|
||||
@@ -11,6 +11,7 @@ sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
|
||||
from transcript_archive import outcomes, write
|
||||
from transcript_archive.location import project_archive
|
||||
from project_key import project_key
|
||||
from utc_stamp import utc
|
||||
|
||||
NOW = 1790000000
|
||||
|
||||
@@ -43,10 +44,7 @@ class CopyFor(unittest.TestCase):
|
||||
|
||||
class Outcomes(unittest.TestCase):
|
||||
def test_the_archive_stamps_what_it_reads_back(self):
|
||||
self.assertRegex(f"{outcomes.utc(NOW)} {outcomes.finished('merged')}", outcomes.FINISHED_AT)
|
||||
|
||||
def test_quotes_every_line_of_a_passage_blank_ones_included(self):
|
||||
self.assertEqual(outcomes.quoted("merged\n\nPR #1"), "> merged\n> \n> PR #1")
|
||||
self.assertRegex(f"{utc(NOW)} {outcomes.finished('merged')}", outcomes.FINISHED_AT)
|
||||
|
||||
|
||||
class Location(unittest.TestCase):
|
||||
|
||||
@@ -7,7 +7,7 @@ from failure import Failure
|
||||
from claude_code.transcript import first_timestamped_line
|
||||
from file_writes import make_private, replace_file
|
||||
from claude_code.session import session_files
|
||||
from transcript_archive.outcomes import utc
|
||||
from utc_stamp import utc
|
||||
|
||||
|
||||
# <project archive>/<chunk>/<sha256 of the transcript>.jsonl, its .outcomes.md beside it, and the session's other files under <chunk>/session/
|
||||
|
||||
Reference in New Issue
Block a user