Skip to content

run/logs: tail single-job follow via resolog#14

Merged
tawAsh1 merged 1 commit into
mainfrom
feat/resolog-tailer
Jun 14, 2026
Merged

run/logs: tail single-job follow via resolog#14
tawAsh1 merged 1 commit into
mainfrom
feat/resolog-tailer

Conversation

@tawAsh1

@tawAsh1 tawAsh1 commented Jun 14, 2026

Copy link
Copy Markdown
Owner

First step of the batchkoi → resolog integration (PR-2 of the plan).

What changes

The single-job --follow path (run, and logs --follow) now tails CloudWatch through resolog@v0.1.1 instead of the home-grown GetLogEvents loop.

  • waitAndTailresolog.Tail + resolver/batch + backend/poll, with a custom childSink that reuses childPrefix for byte-identical output (single job = no prefix).
  • batchkoi keeps a parallel status poll (waitForTerminal) for the [STATUS] lines, final JobDetail, and exit-on-FAILED. resolog owns tail shutdown via its Done signal + grace window, so batchkoi never cancels the tail itself (only Ctrl-C does).
  • batchAPI gains ListJobs, logsAPI gains FilterLogEvents to satisfy resolog's narrow interfaces (real clients already have them; fakes get stubs).
  • Dependency hygiene CI gate: fails the build if resolog's SFn/Lambda SDKs ever leak into go.mod. Verified they don't (only service/batch + service/cloudwatchlogs come in). config bumps v1.32.24 → v1.32.25 (benign MVS).

What stays home-grown (by design, for now)

  • The array >32 paging path (migrating it would lose the 25-TPS quota protection).
  • The logs no-follow one-shot dump (preserves its specific error messages).

Tests

  • New: single-job follow success (no prefix, ordered) + FAILED-exits (logs flushed, non-zero).
  • Existing array-follow / logs tests unchanged and green.

🤖 Generated with Claude Code

First step of the batchkoi -> resolog integration. The single-job --follow
path (run, and logs --follow) now tails CloudWatch through resolog instead of
the home-grown GetLogEvents loop:

- waitAndTail uses resolog.Tail + resolver/batch + backend/poll, with a custom
  childSink that reuses childPrefix for byte-identical output (single job = no
  prefix). batchkoi keeps a parallel status poll (waitForTerminal) for the
  [STATUS] lines, final JobDetail and exit-on-FAILED — resolog owns tail
  shutdown via its Done signal + grace, so batchkoi never cancels the tail.
- batchAPI gains ListJobs and logsAPI gains FilterLogEvents to satisfy resolog's
  narrow interfaces (real clients already have them; fakes get stubs).
- CI gate fails the build if resolog's SFn/Lambda SDKs ever leak into go.mod.

The array path (>32 paging) and the logs no-follow dump stay home-grown for
now. Tests: single-job follow success + FAILED-exits; existing array-follow and
logs tests unchanged and green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@tawAsh1 tawAsh1 self-assigned this Jun 14, 2026
@tawAsh1 tawAsh1 merged commit 266447d into main Jun 14, 2026
4 checks passed
@tawAsh1 tawAsh1 deleted the feat/resolog-tailer branch June 14, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant