[GH-ISSUE #4260] [Bug] ADB verifier suppresses provider cleanup failure and can report success #1681

Closed
opened 2026-10-16 21:09:00 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @morluto on GitHub (Oct 15, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/4260

Before submitting

  • Searched open and closed reports; #4227 is the broad parent, with no focused ADB verifier cleanup report found.
  • No credentials or sensitive target data included.

Area / interface / earliest failure stage

Other: real-provider verifier / Other / Cleanup, cancellation, or lifecycle.

Observed behavior

Source-only finding. scripts/verify-adb.mjs catches and discards every final provider.close() error, then can print all adb device checks passed. Its comment incorrectly says the provider owns nothing long-lived. The provider retains output-directory handles after failed cleanup. The verifier's main sequence also has no outer finally, so an unexpected exception skips that final close entirely.

Reproduction / relevant evidence

Read the final close block and the preceding top-level operation sequence. Close rejection is discarded unconditionally. This establishes control flow; a cleanup fault was not injected into the public verifier yet. Real-device reproduction is NOT_ENOUGH_INFO: no device was contacted.

Expected behavior / impact and scope

Always await provider cleanup after an attempted verification. A cleanup failure must prevent a passing verifier result and preserve any earlier failure. Otherwise verification evidence can claim success while local resource cleanup remains unresolved. Observed scope is source control flow only; actual frequency is unknown.

Version / runtime / target

REA source 0e1f0bf2d06943e59253b8a66923a1ae6005e81e; macOS arm64 source inspection. No Android device or emulator used.

Proposed verification

Exercise verifier orchestration with successful cleanup, failed cleanup, and an unexpected operation failure. Check that cleanup always runs and both earlier and cleanup failures remain visible. Parent audit: #4227.

Originally created by @morluto on GitHub (Oct 15, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/4260 ## Before submitting - [x] Searched open and closed reports; #4227 is the broad parent, with no focused ADB verifier cleanup report found. - [x] No credentials or sensitive target data included. ## Area / interface / earliest failure stage Other: real-provider verifier / Other / Cleanup, cancellation, or lifecycle. ## Observed behavior **Source-only finding.** `scripts/verify-adb.mjs` catches and discards every final `provider.close()` error, then can print `all adb device checks passed`. Its comment incorrectly says the provider owns nothing long-lived. The provider retains output-directory handles after failed cleanup. The verifier's main sequence also has no outer `finally`, so an unexpected exception skips that final close entirely. ## Reproduction / relevant evidence Read [the final close block](https://github.com/morluto/rea/blob/0e1f0bf2d06943e59253b8a66923a1ae6005e81e/scripts/verify-adb.mjs#L368) and the preceding top-level operation sequence. Close rejection is discarded unconditionally. This establishes control flow; a cleanup fault was not injected into the public verifier yet. Real-device reproduction is **NOT_ENOUGH_INFO**: no device was contacted. ## Expected behavior / impact and scope Always await provider cleanup after an attempted verification. A cleanup failure must prevent a passing verifier result and preserve any earlier failure. Otherwise verification evidence can claim success while local resource cleanup remains unresolved. Observed scope is source control flow only; actual frequency is unknown. ## Version / runtime / target REA source `0e1f0bf2d06943e59253b8a66923a1ae6005e81e`; macOS arm64 source inspection. No Android device or emulator used. ## Proposed verification Exercise verifier orchestration with successful cleanup, failed cleanup, and an unexpected operation failure. Check that cleanup always runs and both earlier and cleanup failures remain visible. Parent audit: #4227.
bsakaguchi 2026-10-16 21:09:00 +00:00
  • closed this issue
  • added the
    triage
    bug
    labels
Author
Owner

@morluto commented on GitHub (Oct 16, 2026):

Fixed on main in 139d86b05. The ADB verifier always reaches provider shutdown and reports cleanup failure before announcing success, preserving an operation failure when cleanup also fails.

Subprocess verifier controls cover success, cleanup failure and combined failures; no ADB device was contacted.

Hosted main CI is still pending; this closure is based on the implemented fix and the scoped regression evidence.

<!-- gh-comment-id:6206009555 --> @morluto commented on GitHub (Oct 16, 2026): Fixed on `main` in [139d86b05](https://github.com/morluto/rea/commit/139d86b05c4c03bf286f8237352a92e10816c66e). The ADB verifier always reaches provider shutdown and reports cleanup failure before announcing success, preserving an operation failure when cleanup also fails. Subprocess verifier controls cover success, cleanup failure and combined failures; no ADB device was contacted. Hosted main CI is still pending; this closure is based on the implemented fix and the scoped regression evidence.
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#1681
No description provided.