[PR #4579] [CLOSED] fix(adb): refuse push on ambiguous existence probe failure (#4574) #6319

Closed
opened 2026-10-31 01:13:32 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/4579
Author: @rudrakshagarwal4200-ai
Created: 10/16/2026
Status: ❌ Closed

Base: main ← Head: rudrakshagarwal4200-ai-patch-1fix/adb-probe-ambiguity-4574


📝 Commits (1)

  • 67c0ae1 Refactor error handling for adb path existence checkfix(adb): refuse push on ambiguous existence probe failure (#4574)

📊 Changes

1 file changed (+6 additions, -3 deletions)

View changed files

📝 src/adb/AdbProvider.ts (+6 -3)

📄 Description

Summary

Fixes #4574.

When push-adb-file runs without --overwrite, it checks destination existence using test -e. Previously, any AnalysisProtocolError was ignored under the assumption that nonzero exits always represent file absence. However, ambiguous probe failures (e.g., adb: error: closed or transport disconnects) also result in AnalysisProtocolError with stderr. This caused REA to misinterpret ambiguous errors as file absence and proceed with adb push, unintentionally overwriting existing destination files.

Fix

Only treat clean nonzero probe exits (default adb exited with code <N> message with empty stderr) as proof of absence. If the probe fails with diagnostic stderr, return existsProbe so the caller refuses the push unless explicit overwrite was requested.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/4579 **Author:** [@rudrakshagarwal4200-ai](https://github.com/rudrakshagarwal4200-ai) **Created:** 10/16/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `rudrakshagarwal4200-ai-patch-1fix/adb-probe-ambiguity-4574` --- ### 📝 Commits (1) - [`67c0ae1`](https://github.com/morluto/rea/commit/67c0ae13bdc8724162ed5f67a0e1b39d2c6c61af) Refactor error handling for adb path existence checkfix(adb): refuse push on ambiguous existence probe failure (#4574) ### 📊 Changes **1 file changed** (+6 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/adb/AdbProvider.ts` (+6 -3) </details> ### 📄 Description ### Summary Fixes #4574. When `push-adb-file` runs without `--overwrite`, it checks destination existence using `test -e`. Previously, any `AnalysisProtocolError` was ignored under the assumption that nonzero exits always represent file absence. However, ambiguous probe failures (e.g., `adb: error: closed` or transport disconnects) also result in `AnalysisProtocolError` with stderr. This caused REA to misinterpret ambiguous errors as file absence and proceed with `adb push`, unintentionally overwriting existing destination files. ### Fix Only treat clean nonzero probe exits (default `adb exited with code <N>` message with empty stderr) as proof of absence. If the probe fails with diagnostic stderr, return `existsProbe` so the caller refuses the push unless explicit overwrite was requested. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:13:32 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#6319
No description provided.