fix(obd): _hexTokens compact-hex parse — PR #88 gerçek araç blocker'ı#89
Open
selimmujdeci wants to merge 1 commit into
Open
fix(obd): _hexTokens compact-hex parse — PR #88 gerçek araç blocker'ı#89selimmujdeci wants to merge 1 commit into
selimmujdeci wants to merge 1 commit into
Conversation
…88 device) KÖK NEDEN: ELM327 init (ElmInitSequencer) `ATS0` (boşluk kapat) gönderdiği için gerçek adaptörler handshake bitmap yanıtını BİTİŞİK hex döner ("4100983B001100"). Eski `_hexTokens` yalnız TAM-2-karakter boşlukla-ayrılmış token kabul ediyordu → bitişik akış tek uzun token → filtreleniyordu → buildHandshakeResult BOŞ üretiyordu → supportedPids boş → PID 2F oto-aktive OLMUYOR → yakıt/menzil göstergesi boş. Unit testler yalnız boşluklu fixture kullandığı için yakalanmamıştı (test-gerçek uçurumu). Gerçek araç kanıtı (Redmi 23090RA98I + BLE OBD, motor çalışır, CDP-over-adb): performHandshake ham = raw0100 "4100983B001100" ... → eski parser 0 PID; yeni parser 19 PID (2F dahil). docs-local/device-runs/20260713T200929-pr88-handshake-validation. DEĞİŞİKLİK (minimal, yalnız parser): - _hexTokens artık her boşlukla-ayrılmış parçayı 2'şer bayta böler; TAM hex + ÇİFT uzunluk şartı (odd/geçersiz → fail-soft atılır). Boşluklu (ATS1) format AYNEN çalışır. - Başka hiçbir davranış değişmedi (VIN/bitmap/timeout/native/poll dokunulmadı). Test: obdHandshakeHexTokens.regression.test.ts (15 senaryo: spaced/compact/lowercase/ mixed-ws/CRLF/invalid/odd/empty + gerçek RAW_HANDSHAKE.json fixture + boşluklu parite + VIN fail-soft). Mevcut 14 handshake testi bozulmadı. Full suite 3849 yeşil, tsc/lint temiz. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X7iTVfDmg22hq3fe9S25mj
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Sorun (gerçek araç doğrulamasında bulundu)
PR #88 native handshake gerçek araçta doğru çalışıyor (bitmap blokları okunuyor, devam-bit zinciri doğru, 19 supported PID, PID 2F destekli). Ancak uygulama bunların tamamını 0 PID olarak görüyordu.
Kök neden: ELM327 init'i (
ElmInitSequencer)ATS0(boşluk kapat) gönderdiği için gerçek adaptörler handshake yanıtını bitişik hex döner ("4100983B001100"). Eski_hexTokensyalnız tam-2-karakter boşlukla-ayrılmış token kabul ediyordu → bitişik akış tek uzun token → filtrelenip atılıyordu →buildHandshakeResultboş üretiyordu → PID 2F oto-aktive olmuyor → yakıt/menzil göstergesi boş. Unit testler yalnız boşluklu fixture kullandığı için yakalanmamıştı.Gerçek kanıt: Redmi 23090RA98I + BLE OBD (motor çalışır), CDP-over-adb ile canlı
performHandshake()hamraw0100="4100983B001100"→ eski parser 0 PID, yeni parser 19 PID (2F dahil).docs-local/device-runs/20260713T200929-pr88-handshake-validation/.Değişiklik (minimal — yalnız parser)
_hexTokensartık her boşlukla-ayrılmış parçayı 2'şer bayta böler; TAM hex + ÇİFT uzunluk şartı (odd/geçersiz → fail-soft atılır). Boşluklu (ATS1) format aynen çalışır. Başka hiçbir davranış (VIN/bitmap/timeout/native/poll/discovery) değişmedi.Test
Yeni
obdHandshakeHexTokens.regression.test.ts— 15 senaryo: spaced · compact · lowercase · mixed-whitespace · CRLF · invalid hex · odd length · empty + gerçek RAW_HANDSHAKE.json fixture + boşluklu-parite + VIN fail-soft. Mevcut 14 handshake testi bozulmadı.Not
feat/w5-obd-pr1-native-handshake(stacked). Merge edilmeyecek — cihaz doğrulaması sonrası karar.🤖 Generated with Claude Code