fix(sftp): treat stat-less SCP remotes as unknown size instead of failing upload - #3402
Conversation
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 86393cd4e8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 847a377f2a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 718ece9a45
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Codex reported no major issues. This PR is marked ready for human review/merge. |
Summary
When an SCP-only endpoint cannot run either supported
statcommand, Netcatty previously treated an unknown file size as zero. A nonempty staged upload then failed size verification and its stage was removed before the destination was published. This explains how this software defect can produce both the reported mismatch and an absent target file. The reporter's exact device/tool availability has not been established, so this is a proven reproduction of the defect, not confirmation of that device's configuration.Unknown sizes now remain unknown for backend verification. A numeric placeholder plus
sizeKnown: falsepreserves the renderer contract without allowing skip-unchanged or resume checks to mistake it for a real empty file. Real zero-byte sizes remain valid.Type of Change
Related Issue (optional)
Closes #3399
Changes Made
Screenshots / Demo
No visual layout changes. Local reproduction used the shipped SCP backend and upload transaction with real OpenSSH
scp -t, real shell commands, and real disk files. A shell function madestatunavailable; GNU chmod supplied Linux-compatible command behavior on the macOS test host. Before-change size semantics reproducedexpected 17000 bytes, got 0and an absent destination. Current behavior successfully created and replaced files with byte-identical contents and uploaded an empty file. This validates the local protocol/filesystem path, not a remote SSH connection or the reporter's hardware.Testing
npm run dev)npm run lint)npm test)npm run generate:capability-tools)The focused run completed 360 tests: 358 passed and two timing assertions failed. These tests cover the SCP backend/protocol/session operations, fallback, file operations, staged upload, transfer bridge, dedicated resume, and transfer history. Two wall-clock performance assertions initially exceeded their thresholds during parallel execution; the affected resume/history suites passed all 59 tests when rerun sequentially. Full-suite and platform-build evidence is provided by the successful checks on commit
2218c252c23384e7b75f0c33c5ed57d6653f0079; the full suite was not rerun locally. No capability catalog change applies.Two independent read-only reviewers returned CLEAN on that same commit. No additional source changes were needed in this review pass.
Checklist