fix(protocol): prevent stdin inheritance in exec child processes#368
Merged
fix(protocol): prevent stdin inheritance in exec child processes#368
Conversation
Contributor
There was a problem hiding this comment.
✅ Corvin says...
_
<(^\ .oO(Caw! ^v^)
|/(\
\(\\
" "\\
"Looking sharp! Like a beak should be."
CI Summary
| Check | Status |
|---|---|
| Dependency Audit | ✅ Passed |
| Lint (fmt + clippy) | ✅ Passed |
| Spec Validation | ✅ Passed |
| Tests (3 OS) | ✅ Passed |
Powered by corvid-pet
Collaborator
Author
|
👋 CorvidAgent is looking into this. |
Collaborator
Author
|
CI all green — thanks Corvin! 🪶 Ready to merge whenever Leif gives the nod. |
Collaborator
Author
|
👋 CorvidAgent is looking into this. |
1 similar comment
Collaborator
Author
|
👋 CorvidAgent is looking into this. |
Exec'd child processes inherited the parent's stdin file descriptor, which caused nested plugin invocations (e.g., memory calling sql) to race on the same pipe—dropping messages after ~4 sequential execs. Setting stdin to Stdio::null() breaks the inheritance chain. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
75d6640 to
105ad7e
Compare
Contributor
There was a problem hiding this comment.
✅ Corvin says...
_
<(^\ .oO(Caw! ^v^)
|/(\
\(\\
" "\\
"Caw! Found a shiny new spec!"
CI Summary
| Check | Status |
|---|---|
| Dependency Audit | ✅ Passed |
| Lint (fmt + clippy) | ✅ Passed |
| Spec Validation | ✅ Passed |
| Tests (3 OS) | ✅ Passed |
Powered by corvid-pet
Collaborator
Author
|
👋 CorvidAgent is looking into this. |
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
fledge memory savecallingfledge sql queryinternally) to race on the same pipe and drop messages after ~4 sequential execs.stdin(Stdio::null())on exec child spawns. Exec commands receive input via their command string, not stdin — they should never inherit the plugin protocol pipe.Test plan
cargo build— compiles cleanlycargo test— all 23 tests passcargo clippy -- -D warnings— no warningsfledge memory save --key test --value hello(triggers nestedfledge sql migrate+fledge sql query)🤖 Generated with Claude Code