Skip to content

feat: add public Linux probe receipt verifier - #719

Open
enaboapps wants to merge 1 commit into
linux-supportfrom
feat/718-linux-probe-roundtrip
Open

enaboapps wants to merge 1 commit into
linux-supportfrom
feat/718-linux-probe-roundtrip

Conversation

@enaboapps

@enaboapps enaboapps commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Closes #718

Summary

Add opt-in --verify mode for a separate Linux adapter/host: validate probe status, receive and reassemble only the fixed public response, then send a fixed harmless receipt. Server counts exact receipts without retaining contents. No pairing, credentials, input, radio-power changes or arbitrary writes. Setup/exchange/cleanup are bounded and already-connected targets rejected. Record S26 evidence and remaining linux-support sequence.

Validation

  • Probe formatting, Clippy with warnings denied, and 15 tests passed with vendored D-Bus.
  • Frontend lint, 114 tests, 5 updater tests and build passed.
  • Native formatting passed. Local full native Clippy/tests blocked by absent GLib development packages; Linux native CI passed.
  • CI 34614297370 and CodeQL 34614297413: all green, including Linux, Windows and macOS native jobs.
  • Independent latest-head review of a4e8f0c: no findings; 15 tests independently passed.
  • --help checked without Bluetooth access. No live verifier test performed.

Remaining gates

User cannot currently provide a second adapter/host and independent second client. Physical round-trip and subscriber isolation remain unqualified. Fixed receipts are spoofable cooperative markers, not authentication or isolation proofs. Android notification receipt remains a separate test. Secure pairing must remain disabled until the security gate passes. Further runtime/storage development can proceed with fakes and disabled capabilities. PR targets linux-support; no merge or release performed.

@enaboapps

Copy link
Copy Markdown
Contributor Author

Independent latest-head review at a4e8f0c: no actionable findings. Reviewer checked lifecycle, bounds, privacy, BlueR API semantics and evidence wording; independently passed all 15 probe tests. Native CI and hardware gates remain pending.

@enaboapps
enaboapps marked this pull request as ready for review September 11, 2026 15:21
@greptile-apps

greptile-apps Bot commented Sep 11, 2026

Copy link
Copy Markdown

Greptile Summary

Summary

This change adds an opt-in Linux BLE verifier that checks a probe response and sends a receipt. One blocking issue remains: verifier cleanup can disconnect a BLE connection established by another local client.

Confidence Score: 4/5

Not merge-safe: the verifier can terminate another local client's active BLE session and must be corrected before merging.

One confirmed blocking functional issue remains.

Files Needing Attention: tools/linux-ble-probe/src/verify.rs

T-Rex T-Rex Logs

What T-Rex did

  • T-Rex produced a proof for a posted P1 finding and validated it against the corresponding review comment.
  • Reviewed the BLE cleanup race check artifact to validate race-condition coverage in the BLE cleanup path.
  • Compared the baseline cleanup output with the interleaved connection output to observe behavior under different execution orders.
  • Reviewed the focused verifier test output to confirm the targeted P1 verification flow.

View all artifacts

T-Rex Ran code and verified through T-Rex

Prompt To Fix All With AI
### Issue 1
tools/linux-ble-probe/src/verify.rs:167-172
**Disconnects another client**

The initial connection-state check does not establish ownership. Another local client can connect after that check and before this verifier attempts its own connection; if the verifier connection then fails, this device-wide `Disconnect` tears down the other client's active BLE session. Only disconnect a connection this invocation established as its own.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "feat: add public Linux probe receipt ver..." | Re-trigger Greptile

Comment on lines +167 to +172
if !matches!(
timeout(Duration::from_secs(5), device.disconnect()).await,
Ok(Ok(()))
) {
return Err("Verifier cleanup was not confirmed; check the selected test connection.");
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Disconnects another client

The initial connection-state check does not establish ownership. Another local client can connect after that check and before this verifier attempts its own connection; if the verifier connection then fails, this device-wide Disconnect tears down the other client's active BLE session. Only disconnect a connection this invocation established as its own.

Artifacts

BLE cleanup race check

  • The focused simulation asserts the production call ordering and models the interleaving where cleanup disconnects another local client's connection.

Baseline cleanup output

  • The baseline run shows cleanup disconnecting a connection established by the verifier itself.

Interleaved connection output

  • The interleaved run shows another client connecting after the initial check and being disconnected by verifier cleanup.

Focused verifier test output

  • The recorded focused test output shows the verifier frame tests pass while no ownership-cleanup behavior is covered.

View artifacts

T-Rex Ran code and verified through T-Rex

Prompt To Fix With AI
This is a comment left during a code review.
Path: tools/linux-ble-probe/src/verify.rs
Line: 167-172

Comment:
**Disconnects another client**

The initial connection-state check does not establish ownership. Another local client can connect after that check and before this verifier attempts its own connection; if the verifier connection then fails, this device-wide `Disconnect` tears down the other client's active BLE session. Only disconnect a connection this invocation established as its own.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant