fix: randomize the captured output delimiter - #415
Open
MikeeI wants to merge 1 commit into
Open
Conversation
A standalone EOF line is valid remote stdout, but the runner interprets it as the end of the captured multiline value. Generate one Bash-only randomized delimiter per capture and use it for both framing lines while preserving the streaming tee pipeline and its failure behavior.
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.
Summary
Captured stdout currently uses the fixed multiline delimiter
EOF, although a remote command may legitimately emitEOFon a line by itself.This change creates one randomized Bash-only delimiter per capture and uses it for both framing lines while retaining the streaming
teepath.Evidence
entrypoint.shon the current base frames every captured value with the literal lineEOF.vor\nEOF\nnach\nproduced static framing in which the firstEOFcloses the value beforenach.Changes
$RANDOMcomponents for each capture invocation.GITHUB_OUTPUTlines.drone-ssh | teepipeline, live logs, byte ordering, and publicstdoutoutput unchanged.Risks and boundaries
$RANDOMis seedable pseudo-randomness, not cryptographic entropy; this removes the deterministic collision but not every theoretical or adversarial collision.Verification
bash -n entrypoint.sh && shellcheck entrypoint.sh && git diff --check— passed.vor,EOF, andnach— one randomized framing pair encloses all three lines in order.pipefailpipeline still returns 17.I checked the relevant issues, comments, pull requests, discussions, releases, and capture history; this pull request is not a duplicate.
Disclosure
Investigated thoroughly with GPT-5.6 Codex (high reasoning effort), using Oh My Pi as the agent framework.
This report is not generic or unreviewed AI-generated output. Its claims were checked against the cited evidence, and it includes the relevant detail intended to help maintainers resolve the issue.
If reports like this are not useful to the project, please let me know and I will refrain from submitting similar ones. My intent is to help without wasting maintainer time or energy or discouraging their work.
Thank you for your work.