Answer stability round 1: 1 🔴, 5 🟡 (0 misread); catch a broken HTTP answer, drop typed keys before the DM, DM every stop but Ctrl-C and a crash, inject home and http, and test the gaps

This commit is contained in:
2026-11-11 22:37:52 +01:00
parent f10170bf8b
commit 23af106b47
11 changed files with 131 additions and 46 deletions
+3 -2
View File
@@ -4,6 +4,7 @@ A change here, such as to how input reads a line, changes every tool that runs o
"""
import dataclasses
import os
import pathlib
import select
import signal
import subprocess
@@ -13,7 +14,7 @@ import time
import typing
import uuid
from mattermost_dm.dm import dm
from mattermost_dm.dm import dm, http_json
from failure import Failure
from git_cli import git_repo
from machine_load.memory import Memory, read_memory
@@ -84,7 +85,7 @@ def system_effects() -> Effects:
claude=lambda args, cwd, stdin: subprocess.run(["claude", *args], capture_output=True, cwd=cwd, input=stdin, text=True),
claude_on_terminal=claude_on_terminal,
discard_typed=lambda: termios.tcflush(sys.stdin, termios.TCIFLUSH),
dm=dm,
dm=lambda text: dm(text, pathlib.Path.home(), http_json),
execv=os.execv,
git=git_repo.git,
input=input,