Repository navigation
Backlog
Description
Goal
Close the remaining test and wording gaps from the bounded remote file read work.
Context
Follow-up of #1714 (PR #1728): the review listed small leftovers.
Requirements
- Test: a failing write of the empty backup of an empty source file leaves no partial backup.
- Test: a source whose reported size is exactly 256 KiB (one chunk) but which yields more: partial copy, probe byte, backup removed, write fails.
- Guard test
crates/app-logic/tests/no_unbounded_read_file.rs:43also matches::read_file((UFCS calls); the existing allowed file stays allowed. - Spec 0086 §1: say precisely that at most the limit plus one byte is read, also when the size query fails or understates (A1.2 is already correct).
- A confirmed AI write to a pseudo file whose
statsize is 0 but which has content (e.g. under/proc) fails at the backup step with the message "larger than its reported size; backup aborted". Make that message clear for users (text via the locale mechanism if it reaches the UI; seedocs/recipes/README.md).
Acceptance Criteria
- Both new tests exist and fail when the corresponding cleanup/bound is removed.
- The guard test fails on a planted
Trait::read_file(call in production code of app-logic/app-shell. - Spec 0086 §1 matches A1.2.
- The pseudo-file failure shows a message that names the cause and that the file was not changed.
- Relevant automated tests pass
Technical Notes
Test and docs work; only the last requirement changes a (failure) text. Spec 0020 mention optional.
Files: crates/app-logic/src/orchestration/action_exec/tests_activity.rs, crates/app-logic/tests/no_unbounded_read_file.rs, crates/app-logic/src/orchestration/remote_files.rs, docs/specs/0086-sftp-limits-and-session-pairing.md
Spec impact: update 0086
Open questions
- Refactor of
write_via_sudo_fallback/write_via_sftp_with_backup(old_size: Option<u64>instead ofexisted+old_size, renamecreated): optional, only if it stays small.
Activity
smart-ssh-coder commentedon Dec 4, 2026
Needs maintainer: The issue waits for #1733, but "blocked by" could not be set. Set it on the issue (Relationships), then remove needs-maintainer: The code this issue extends (bounded remote file reads from #1728, incl. crates/app-logic/tests/no_unbounded_read_file.rs) is only on release/0.8.0; it is not on develop yet. Waiting for the back-merge of release/0.8.0 into develop (#1733).