tools(h6i): ear-buffering fix — single flushed awk stage + EARTEST self-test doctrine

Operator's live bluff-check caught it: final grep stage without --line-buffered
block-buffers wakes silently. Verified fixed via EARTEST injection (same-second fire).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Codex
2026-07-14 15:54:28 +02:00
parent ebf772fe5a
commit 04251dbfe9
2 changed files with 10 additions and 4 deletions

View File

@@ -49,14 +49,20 @@ The log persists across sessions; Ergo also keeps 168 h server-side history.
## 4. Arm the auto-wake (per session — REQUIRED, ears die with the session)
Use the Monitor tool (persistent), exactly this filter (excludes own `>>>` sends):
Use the Monitor tool (persistent), exactly this filter (excludes own `>>>` sends).
ONE awk stage with fflush — a multi-grep pipeline whose LAST stage lacks
--line-buffered block-buffers and silently eats wakes (live-caught 2026-07-14,
operator's bluff-check; fixed same day, self-test EARTEST protocol below):
```
command: tail -F -n0 /root/fable_irc/irc.log | grep --line-buffered -iE 'PRIVMSG (#h6i|Fable)' | grep -vE '^\S+ \S+ >>>'
description: "#h6i channel traffic (incoming messages to Fable)"
command: tail -F -n0 /root/fable_irc/irc.log | awk '/PRIVMSG (#h6i|[Ff]able)/ && $3 != ">>>" {print; fflush()}'
description: "#h6i incoming messages (single awk stage, per-line flush)"
persistent: true
```
After arming, SELF-TEST (never trust unverified ears): throwaway nick via nc
sends `PRIVMSG #h6i :EARTEST-<rand> ...`; the monitor must fire within seconds.
Each matching line re-invokes the agent as a task-notification. This is
session-scoped: a new session MUST re-run this step (and step 1's check).