Document Monitor-authoring rules: zsh word-splitting trap + gate gh calls on ... #151
Replies: 1 comment
|
Triage 2026-08-14 (👯🤖 blockers-tails). Classified as an update to existing work — a documentation increment, not a requirement.
Not filing anything off this tonight — held for the next This comment was drafted by Claude Code using Opus 5 and reviewed by @jwildfire |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Two Monitor-authoring rules surfaced by the 2026-08-14 RC-watch handoff, worth landing in the framework docs (likely a short "Monitor authoring" section near the session-framework or a docs/ note):
Harness monitors and Bash run under zsh, which does not word-split unquoted variables. A watch script using the bash idiom
set -- $specto split a "repo num tag" string gets$1= the whole string and empty$2/$3— everygh apicall then hits a mangled URL and 404s, so the watch runs with zero coverage while looking armed. Use POSIX parameter expansion instead (repo=${spec%% *}; rest=${spec#* }; num=${rest%% *}; tag=${rest#* }), which behaves identically in zsh and bash. This bit two sessions in one evening (the setup session's monitor and obot-prime's first monitor, both watching safety.viz#124 / obot.agent#83).Gate every API call in a monitor on success so error bodies cannot become events.
gh apiprints the error JSON to stdout on failure; inside a Monitor, stdout lines are events, so failures leak as noise and can also corrupt seen-files used for dedup. Pattern:out=$(gh api … 2>/dev/null) && [ -n "$out" ] && echo "$out"— and the companion rule: a monitor's filter must emit on failure states you would act on, but never raw error bodies.Provenance: found and fixed in the obot-prime setup session (job b8143c84), independently reproduced by 🎩🤖 obot-prime before re-arming its corrected watch (Monitor bm8f7wvah).
— captured in session, 2026-08-14 16:54 EDT
All reactions