Answer stability round 1: 0 🔴, 4 🟡 (0 misread); type each backend's config, pass the notifier table in place of an http override, type the notifier setting, list notifier/ among the shared packages
CI / tests (pull_request) Successful in 2m36s

This commit is contained in:
2026-11-15 00:33:09 +01:00
parent eb692daee2
commit dd1a8fc203
6 changed files with 59 additions and 37 deletions
+5 -3
View File
@@ -12,10 +12,11 @@ import termios
import time
import typing
from notifier.notify import Backend, BACKENDS, notify
from failure import Failure
from git_cli import git_repo
from machine_load.memory import Memory, read_memory
from notifier.notify import notify
from project_config.settings import Notifier
# Seconds before a Python script loop-claude runs is stopped, so a hung one, such as chunk-preflight, cannot hold the loop.
PYTHON_TIMEOUT = 600
@@ -64,12 +65,13 @@ class StreamingClaude:
return self.proc.wait()
def system_effects() -> Effects:
def system_effects(backends: typing.Mapping[Notifier, Backend[typing.Any]] = BACKENDS) -> Effects:
"""The effects on this machine; `backends` are the notifiers loop-claude's DM can go through, where a test swaps in one that sends nowhere."""
return 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=lambda text: notify(text, None, pathlib.Path.home()),
dm=lambda text: notify(text, None, pathlib.Path.home(), backends),
execv=os.execv,
git=git_repo.git,
input=input,