Skip to main content

long-task-watcher

Reliable progress watching for long-running background commands (training runs, live audits, batch jobs, CI) without losing output to stdout buffering. Prefer post-completion cat-and-grep over tail -F.

설치로 이동

소스 정보

저장소
mangowhoiscloud/geode
최근 소스 활동
2026년 7월 3일 20:05
감지된 SKILL.md 언어
영어
스타
15
포크
2

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
long-task-watcher
visibility
public
triggers
monitor, tail, progress, background, long task, watch, 진행 상황, 백그라운드, 모니터링
description
Reliable progress watching for long-running background commands (training runs, live audits, batch jobs, CI) without losing output to stdout buffering. Prefer post-completion cat-and-grep over tail -F.
# Long-Task Watcher Patterns for tracking a long-running background command and surfacing its events without the classic `tail -F | grep` buffering trap: matching lines can sit in a 4KB stdout block buffer and never emit within the watch window, so a watcher waits forever on output that is already on disk. ## Pattern selection | Situation | Pattern | Why | |-----------|---------|-----| | Task finishes within minutes | Wait for completion, then `cat <logfile> \| grep -E "<filter>"` | No inotify/buffering dependency; no lost lines. Default choice. | | Long task, frequent progress lines | `stdbuf -oL tail -F <logfile> \| stdbuf -oL grep --line-buffered "<filter>"` | Forces line-buffering at every pipe stage (macOS: needs coreutils). | | External state (CI, deploy, queue) | Polling loop: `while true; do <one-shot status call>; sleep 30; done` | The external status API is the truth; tailing local output adds nothing. | | Task should stop the watch when it dies | Add `kill -0 $PID 2>/dev/null \|\| break` to the polling loop | Breaks immediately on process exit instead of waiting for a timeout. | ## Rules - Redirect long-run stdout/stderr to a file from the start (`... > run.log 2>&1`); never rely on scrollback. - After the task exits, one `cat`-and-`grep` pass over the log is more reliable than any live tail. - Watch loops need a hard timeout; a watcher without one outlives dead tasks. - Archive logs to a stable location (`.audit/` convention) before summarizing, so the evidence survives the session.
GitHub에서 보기