Process all documents from stdin, not just the first - #49
Open
MPV wants to merge 1 commit into
Open
Conversation
This was referenced Jul 23, 2026
MPV
force-pushed
the
claude/stdin-multidoc
branch
from
July 23, 2026 07:10
7e2273e to
8f215aa
Compare
MPV
force-pushed
the
claude/approve-stdout-stderr
branch
from
July 23, 2026 08:17
929d8a3 to
a0611cd
Compare
MPV
force-pushed
the
claude/stdin-multidoc
branch
2 times, most recently
from
July 23, 2026 08:24
8696395 to
6e5fb8d
Compare
This was referenced Jul 23, 2026
ProcessStdin passed the entire stdin buffer to yamlparser.ProcessData, whose decoder only reads the first YAML document. Any multi-document stream piped in (e.g. `kubectl get ... -o yaml | kir -`) silently dropped every document after the first. Route stdin through the same document-splitting path already used for files so both handle multi-document input identically. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Pc6NAURAqjU4LYJx93tgSC
MPV
force-pushed
the
claude/stdin-multidoc
branch
from
July 24, 2026 06:45
6e5fb8d to
c2e30c5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Route the stdin path through the same document-splitting logic the file path already uses, so a multi-document stream piped into
kir -yields images from every document.Why
ProcessStdinpassed the entire stdin buffer toyamlparser.ProcessData, whose decoder only reads the first YAML document. Any multi-document stream piped in silently dropped every document after the first:Behavior change
kir -on a multi-document stream now emits images from all documents. The file path is unchanged.Testing
Added
TestProcessDocumentsMultiple, which exercises the shared multi-document path that stdin now uses.Stack
First of the parsing stack — merge order: this →
claude/skip-non-workloads→claude/robust-yaml-splitting. Base:master.🤖 Generated with Claude Code
https://claude.ai/code/session_01Pc6NAURAqjU4LYJx93tgSC
Generated by Claude Code