Address Copilot review follow-ups for runtime trace and SSL handling#87
Merged
Address Copilot review follow-ups for runtime trace and SSL handling#87
Conversation
Author
|
Validation note from local integration check before opening this PR:
Known caveats from
This PR remains scoped to logging/thread-safety/SSL error-path cleanup and permission hardening, with projection behavior revalidated on-device. |
Merged
matt2005
added a commit
that referenced
this pull request
Mar 15, 2026
* fix: USB AOAP recovery, TLS bridge guard, SSL decrypt drain, diagnostics (#84) * Fix SSL decrypt handling and migrate cert install to /etc/aasdk - handle SSL WANT_READ/WANT_WRITE as partial frame in Cryptor decrypt\n- add richer SSL diagnostics in SSLWrapper/Cryptor\n- move cert/key install path from /etc/openauto to /etc/aasdk\n- add debian postinst migration and permission/ownership fixups * fix: USB AOAP recovery, TLS bridge, SSL decrypt drain, diagnostics - AOAPDevice: detect LIBUSB_ERROR_BUSY on claimInterface and attempt releaseInterface + retry before throwing to handle stale ownership after abrupt transport teardown - MessageInStream: conditionally inject ENCAPSULATED_SSL prefix (MessageId 3) only when the incoming payload looks like a TLS record (content-type 0x14-0x17, version byte 0x03); plain payloads such as version responses are no longer misclassified; promote frame/payload logs to info level - Cryptor: simplify SSL decrypt drain loop to pure while(true) with fixed 2048-byte read chunks; remove overhead/expected-bytes heuristics that caused premature loop exit; demote WANT_READ/WANT_WRITE to debug - ControlServiceChannel: add info-level logs for sendVersionRequest (logs major/minor) and sendHandshake (logs payload size); promote incoming MessageId log to info for runtime visibility - USBTransport: add diagnostic logs for doSend submission, sendComplete, sendError, enqueueReceive, receiveComplete and receiveError including endpoint address, byte count and error code/native code * Add runtime-toggleable cryptor/message tracing and docs (#85) * Address Copilot PR review follow-ups (#87) * Add MessageInStream regression tests and run CI unit tests on PR/main/develop (#88)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR applies the actionable Copilot review follow-ups from #86 while preserving AA runtime behavior.
Changes
src/Messenger/MessageInStream.cppMessageId(3)with named control enumMESSAGE_ENCAPSULATED_SSL.infotodebug.src/Transport/USBTransport.cppinfotodebug.src/Transport/SSLWrapper.cppSSL_ERROR_WANT_*as expected control flow (debuglevel).debian/postinst644, key600by default.aasdkgroup exists.Validation
AASDK build/install
TARGET_ARCH=$(dpkg --print-architecture) CROSS_COMPILE=false ./build.sh debug clean install --skip-protobuf --skip-abslCrankshaft integration build/test
crankshaft.coredebug (all targets): success.AALifecycleTest: passAndroidAutoTopicContractTest: passAndroidAutoStatusIntegrationTest: pre-existing failure in QML signal signature (onServiceAvailabilityChanged(QVariant)mismatch in test)AndroidAutoAoapRetryContractTest: pre-existing contract failure unrelated to aasdk changesLive projection probe
crankshaft-coreruntime probe and verified projection markers:projection_ready=true reason=video_first_framevideo_first_frameobservedNotes
This PR is intentionally scoped to reviewed diagnostics/logging/thread-safety/SSL error-path behavior and does not change AA protocol flow semantics.