Skip to content

feat: add --log=interleaved|labeled|grouped modes#266

Draft
branchseer wants to merge 5 commits intomainfrom
log-modes
Draft

feat: add --log=interleaved|labeled|grouped modes#266
branchseer wants to merge 5 commits intomainfrom
log-modes

Conversation

@branchseer
Copy link
Member

@branchseer branchseer commented Mar 18, 2026

Summary

  • Add --log flag with three output modes: interleaved (default), labeled, grouped
  • Refactor reporter system into three mode reporters + a SummaryReporter decorator
  • Remove all_ancestors_single_node graph topology tracking — stdio inheritance is now mode-based
  • Add E2E snapshot tests covering all stdio cases for each mode

--log=interleaved (default)

Streams output directly. Uncached tasks inherit stdio (TTY), cached tasks pipe for capture/replay.

--log=labeled

Prefixes each output line with [pkg#task]. Always piped.

--log=grouped

Buffers all output per task and prints as a block on completion. Always piped.

Test plan

  • 27 unit tests (reporters, writers)
  • E2E snapshot tests: interleaved-stdio (8 cases), labeled-stdio (7 cases), grouped-stdio (7 cases)
  • Cross-platform clippy (just lint-linux, just lint-windows)

🤖 Generated with Claude Code

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@branchseer branchseer changed the title docs: add stdio plan for --log flag feat: three --log modes Mar 18, 2026
branchseer and others added 4 commits March 19, 2026 09:46
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove stdio-detection, stdin-inheritance, and stdio-graph-criteria
fixtures. Replace with interleaved-stdio, labeled-stdio, and
grouped-stdio fixtures that systematically cover all stdio cases
for each --log mode.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add three output modes controlled by the --log flag:
- interleaved (default): streams output directly, inherits stdio for uncached tasks
- labeled: prefixes each line with [pkg#task], always piped
- grouped: buffers output per task, prints as a block on completion

Refactor reporter system:
- Remove all_ancestors_single_node from reporter traits and execution
- Rename LabeledReporter to InterleavedReporter (it was always interleaved)
- Add new LabeledReporter with line-prefixing LabeledWriter
- Add GroupedReporter with buffering GroupedWriter
- Extract SummaryReporter as a decorator that wraps any mode reporter
- Add Clone to CacheStatus and related types for summary tracking

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@branchseer branchseer changed the title feat: three --log modes feat: add --log=interleaved|labeled|grouped modes Mar 19, 2026
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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