Skip to content

run/logs: tail array (<=32) follow via resolog#15

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

run/logs: tail array (<=32) follow via resolog#15
tawAsh1 merged 1 commit into
mainfrom
feat/resolog-array-tailer

Conversation

@tawAsh1

@tawAsh1 tawAsh1 commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Second step of the batchkoi → resolog integration (PR-3).

What changes

Array jobs within the tail cap (size <= 32) now tail through resolog:

  • waitAndTailArray dispatches size <= maxTailedChildren to a new tailArrayViaResolog (resolog.Tail + resolver/batch's array expansion + backend/poll + childSink with width+color). Output is byte-identical to the home-grown tailer (childSink reuses childPrefix).
  • batchkoi keeps a parallel status poll (waitForArrayTerminal) for the [STATUS] lines, the progress bar, the final JobDetail, and exit-on-FAILED. resolog owns tail shutdown (Done + grace); batchkoi never cancels the tail.

What stays home-grown

  • Arrays > 32 keep the interactive TPS-bounded childPager path, unchanged (migrating it would lose the 25-TPS quota protection — that's a future resolog enhancement: multi-stream sources).

Tests

  • New TestChildSink: label→index→prefix mapping incl. width alignment and single-job (no prefix).
  • Existing TestLogsArrayFollow now runs through the resolog path and stays green.
  • fakeLogs.calls made atomic (children tail concurrently); full -race suite green.

🤖 Generated with Claude Code

Second integration step. Array jobs within the tail cap now tail through
resolog: the batch resolver expands the array into one Source per child
("batch[N]"), and childSink renders each behind its colored, width-aligned
prefix — byte-identical to the home-grown output. batchkoi keeps a parallel
status poll (waitForArrayTerminal) for [STATUS], the progress bar, the final
JobDetail and exit-on-FAILED; resolog owns tail shutdown via Done + grace.

Arrays larger than maxTailedChildren (32) keep the home-grown TPS-bounded
pager — that path is unchanged.

Tests: TestChildSink (prefix/width/single-vs-array mapping) and the existing
TestLogsArrayFollow (now exercises the resolog path) are green; fakeLogs.calls
is now atomic since children tail concurrently.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@tawAsh1 tawAsh1 merged commit a148a72 into main Jun 14, 2026
4 checks passed
@tawAsh1 tawAsh1 deleted the feat/resolog-array-tailer branch June 14, 2026 15:46
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