Files
VolcanicSecretary/docs/superpowers
EugeneTes 9cf6f7385e Cap captured script output, scrub the bot token, and speed up scheduler tests (Group C)
- runner.ts: cap captured stdout/stderr at 64 KiB per stream via a new
  Capture helper, keeping the first 48 KiB and last 16 KiB once a stream
  exceeds the cap, joined by "\n...(truncated)...\n". Prevents a runaway
  watcher script from ballooning memory or a Telegram message.
- runner.ts runScript: delete TELEGRAM_BOT_TOKEN from the child environment
  before spawning, since model-written scripts must never be able to read
  and exfiltrate it. Spec section 6.2 updated to describe the exclusion.
- scheduler.test.ts: the "drain() gives up after its timeout" test no longer
  calls s.stop() at the end -- no timer is armed after the at job fires, and
  its delivery never resolves, so stop()'s 10s grace period would run out
  for nothing. Full suite now runs in ~1.5s.
- runner.test.ts: relax the timeout-kill elapsed-time assertion from 3000ms
  to 4000ms to reduce flakiness, per the review.

Claude-Session: https://claude.ai/code/session_01JtuZTCMW9TyogEmBgGf8JT
2026-09-06 18:07:12 +02:00
..
2026-09-06 14:17:09 +02:00