1.2 KiB
1.2 KiB
Agent rule: no hanging around (Castopod session lessons)
When automating on koopa (or any remote), never leave a command without a deadline.
Required patterns
- HTTP: always
curl --connect-timeout 10 --max-time 120(adjust intentionally). - Long jobs: wrap with
timeout --kill-after=15s 600s <cmd>
(image pulls, compose up, big uploads). - Interactive CLIs: do not pipe blindly and hope. Prefer:
- non-interactive flags, or
- direct SQL / API, or
printf 'y\n'/yes y | headwith a known prompt count.
- Poll loops: max tries + sleep; exit non-zero on give-up (print last status).
- Background only after starting with timeout/logging; never “wait forever” on silent pull.
Castopod-specific
shield:user activateprompts → use SQL activate (scripts/castopod/lib.sh→cp_activate_users).- Episode create: empty
transcript_file/chapters_filefail validation;location_namemust be''or a string (null crashes). custom_rssmust be a string (empty" "/""), not omitted → null TypeError.
Scripts
See scripts/castopod/ (lib.sh, up.sh, status.sh).