Document tea CI-status parsing pitfalls and idle-friendly loop polling #22

Merged
geusebio merged 1 commit from docs/ci-watch-idle-polling-and-status-parsing into main 2026-08-13 20:16:07 +00:00
Owner

Summary

Two things learned the hard way while babysitting a real PR's CI in a Claude Code session, written up so the next session doesn't re-derive them:

  • tea pulls <index> --fields ci is not fully authoritative. It has previously dropped a job's row entirely (a PR read all-green while a job had actually failed), and its OSC-8 hyperlink escapes wrap each job's link text — which itself contains a colon (https://…) — so a naive "match after the colon" parser silently grabs the URL instead of the job's status. Documents the escape-stripping needed and recommends cross-checking the commit statuses API (/repos/{owner}/{repo}/commits/<sha>/statuses, grouped by context, newest wins) before calling a PR green.
  • Watching CI shouldn't hold a session "busy" for the whole wait. A backgrounded shell loop or a persistent Monitor both keep a real process running the entire time, which looks identical to active work from the outside. Documents the alternative: /loop in dynamic mode with no Monitor armed — a single foreground check per iteration, then ScheduleWakeup ends the turn with nothing running until the next firing — plus adapting the delay each iteration to what was just observed instead of a fixed cadence.

Test plan

  • Docs-only change (docs/Topics/VCS.md) — no code/lint/CI surface in this repo.
  • Read through for consistency with the surrounding "Pull requests" section's style and terminology.
## Summary Two things learned the hard way while babysitting a real PR's CI in a Claude Code session, written up so the next session doesn't re-derive them: - **`tea pulls <index> --fields ci` is not fully authoritative.** It has previously dropped a job's row entirely (a PR read all-green while a job had actually failed), and its OSC-8 hyperlink escapes wrap each job's link text — which itself contains a colon (`https://…`) — so a naive "match after the colon" parser silently grabs the URL instead of the job's status. Documents the escape-stripping needed and recommends cross-checking the commit statuses API (`/repos/{owner}/{repo}/commits/<sha>/statuses`, grouped by context, newest wins) before calling a PR green. - **Watching CI shouldn't hold a session "busy" for the whole wait.** A backgrounded shell loop or a persistent `Monitor` both keep a real process running the entire time, which looks identical to active work from the outside. Documents the alternative: `/loop` in dynamic mode with no `Monitor` armed — a single foreground check per iteration, then `ScheduleWakeup` ends the turn with nothing running until the next firing — plus adapting the delay each iteration to what was just observed instead of a fixed cadence. ## Test plan - Docs-only change (`docs/Topics/VCS.md`) — no code/lint/CI surface in this repo. - Read through for consistency with the surrounding "Pull requests" section's style and terminology.
`tea pulls <index> --fields ci` silently drops job rows and its OSC-8 hyperlink
escapes break naive status-colon parsing; the commit statuses API is the
authoritative source. Separately, a backgrounded shell loop or a persistent
Monitor both hold a session "busy" for the whole CI wait — a plain /loop with
ScheduleWakeup and no Monitor, delay adapted each iteration to what was just
observed, is the way to poll without that.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Grey.ooo/agent-standards!22
No description provided.