mirror of
https://github.com/Louis-CFM/coucou.git
synced 2026-12-06 23:24:20 +09:00
A tool past its time limit was only sent SIGTERM. One that takes its time
to quit, or never gets the signal (a process started from a dispatch
thread can inherit it blocked: on Linux Foundation, `exec sleep 30` ran
its 30 s), kept the caller waiting. It is now killed a second later, and
the run counts as timed out whatever its exit status.
CLIRequest.thinking: false runs Claude Code with MAX_THINKING_TOKENS=0
(CLIRelay.environment, pure), for short rewrites with nothing to think
about. The chat keeps Claude Code's own default.
CLIRelay.ask(_:_:exe:workdir:) runs a given executable, so
scripts/test-cli-relay-run.sh runs stand-in tools: the prompt on stdin,
thinking off, Coucou's folder, no tools; Claude Code 2.1's real
signed-out answer ("Failed to authenticate: OAuth session expired…")
reads as "not signed in" with the command to sign in; a tool that
ignores SIGTERM is gone a second past its limit. Added to CI.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
10 lines
415 B
Bash
Executable File
10 lines
415 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
TEST_DIR="$(mktemp -d "${TMPDIR:-/tmp}/coucou-cli-relay-run.XXXXXX")"
|
|
trap 'rm -rf "$TEST_DIR"' EXIT
|
|
swiftc -swift-version 6 -strict-concurrency=complete \
|
|
NotchBuddy/Sources/App/CLIRelay.swift NotchBuddy/Sources/App/CLIRelayRun.swift tests/CLIRelayRunTests.swift \
|
|
-o "$TEST_DIR/cli-relay-run-tests"
|
|
"$TEST_DIR/cli-relay-run-tests" "$TEST_DIR"
|