Files
coucou/scripts/test-work-streak.sh
lovyestar 24235eb6ac Mochi gets sleepy after long hours with the agents, fresh again after a break
After two hours of work with the agents and no break, Mochi shows the tired look he already
has for a low battery: heavy eyes and the odd yawn while he waits (never while an agent works
or asks). A break is twenty minutes with no agent activity or away from the keyboard and mouse;
then he is fresh again. No timer, no notice, no setting: it follows "Mochi feels the Mac".
Only the times of the hook events are kept, in memory; the island hidden costs nothing.
The battery line under the island now shows only for a low battery. Checked by
scripts/test-work-streak.sh, in CI.
2026-10-30 13:26:23 +09:00

8 lines
299 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")/.."
TEST_DIR="$(mktemp -d "${TMPDIR:-/tmp}/coucou-work-streak.XXXXXX")"
trap 'rm -rf "$TEST_DIR"' EXIT
swiftc NotchBuddy/Sources/App/WorkStreak.swift tests/WorkStreakTests.swift -o "$TEST_DIR/work-streak-tests"
"$TEST_DIR/work-streak-tests"