A zero SSH exit status currently allows an incomplete SCP receive state to succeed. The close handler trusts status 0 without proving that buffered directives, data or responses reached :finish or a terminal empty-stack :next_item state.
A release-compatible correction gives the final buffered state one processing pass, then raises the existing early-close error unless the protocol is complete. This refines merged #71, which covered missing exit status rather than a successful status with incomplete protocol state.
External verification on Ruby 4.0.6 and 3.2.11 reproduces silent acceptance before and the existing error after. The unchanged suite passes 36 tests /70 assertions on both Rubies. This is an issue-first report because the README requests regression tests while the consumer audit explicitly forbids modifying repository tests.
A zero SSH exit status currently allows an incomplete SCP receive state to succeed. The close handler trusts status 0 without proving that buffered directives, data or responses reached
:finishor a terminal empty-stack:next_itemstate.A release-compatible correction gives the final buffered state one processing pass, then raises the existing early-close error unless the protocol is complete. This refines merged #71, which covered missing exit status rather than a successful status with incomplete protocol state.
External verification on Ruby 4.0.6 and 3.2.11 reproduces silent acceptance before and the existing error after. The unchanged suite passes 36 tests /70 assertions on both Rubies. This is an issue-first report because the README requests regression tests while the consumer audit explicitly forbids modifying repository tests.