feat(vehicle-data): worker source health transport (PR-1)#71
Merged
Conversation
Worker'ın 1 Hz watchdog'unda ZATEN hesapladığı per-kaynak canlılık (CAN 3s / OBD 5s / GPS 5s timeout) ana thread'e taşınır: VehicleCompute.worker → SOURCE_HEALTH → VehicleSignalResolver → halStatusStore. Gerekçe: sessiz ECU frame kaybında native canStatus yalnız TRANSPORT durumunu bildiriyor (port açıkken connected:true), frame kaybını yalnız worker görüyor — ama bu bilgi ana thread'e hiç ulaşmıyordu. - can/obd/gps AYRI tutulur (tek global halConnected yetersiz: CAN ölüp GPS yaşarken toptan kapatma yapılamaz). - null = BİLİNMİYOR; false (ölü) ile karıştırılmaz. - Mesaj YALNIZ değişimde postlanır (kenar-tetikli); store da idempotent. - Payload yalnız 3 boolean + monotonik ts (araç verisi/VIN/PII yok); pre-allocated envelope (hot-path allocation yok). - YENİ TIMER YOK — worker setInterval sayısı 4'te sabit (testle kilitli). - Bu PR YALNIZ BİLGİ TAŞIR: hiçbir sinyali unsupported yapmaz; HAL/adapter/Event Bus/ bridge davranışı değişmez (adapter hâlâ halStatusStore okumaz — kilitli). - Background/visibility politikası EKLENMEDİ (yanlış-pozitif riski raporlandı). - Ledger #55 🔴. Fail-closed tüketim (CAN ölünce sinyalleri source:'none' yapma) AYRI PR (PR-2). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012M8LbxyAqd22EU1rqtTjft
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Sahte disconnect yok: ingestedSignalCount=3 (değişmedi), tek abonelik, bridge dropped=0 → bilgi taşıması HAL/bridge davranışını değiştirmedi. Boot/CPU/RAM regresyonu yok. Satır 🔴 KALIYOR: canAlive=false/reconnect gerçek araç gerektiriyor; low-tier yok; sourceHealth henüz teşhis raporunda değil (ADB'siz okunamıyor) → PR-2'de eklenmeli. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012M8LbxyAqd22EU1rqtTjft
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.
Neden
Sessiz ECU frame kaybında (kablo takılı, port açık, ECU susmuş):
canStatusyalnız transport durumunu bildiriyor —connected = (mode != NONE)(CarLauncherPlugin.java:3748-3756) → port açıkkenconnected:true. Frame kaybını görmez._canLastSeen+SRC_TIMEOUT_CAN_MS=3000(VehicleCompute.worker.ts:92-96), 1 Hz_watchdog()(:1010-1013).supported=truekalıyor →vehicle.connection.changed=falseasla üretilemiyor.Ne yapıyor
Mesaj sözleşmesi
{ type: 'SOURCE_HEALTH'; can: boolean; obd: boolean; gps: boolean; ts: number }halConnectedyetersiz (CAN ölüp GPS yaşarken toptan kapatma yapılamaz).null= BİLİNMİYOR (worker hiç bildirmedi) —false(ölü) ile karıştırılmaz.set()çağrılmaz → gereksiz abone uyanışı yok).setIntervalsayısı 4'te sabit (speed/fuel/coolant/watchdog; testle kilitli).Bu PR'ın YAPMADIKLARI
source:'none'üretmez).halStatusStoreokumaz (kilitli).Fail-closed tüketim (CAN ölünce CAN sinyallerini
source:'none'yapma) = PR-2.Uygulama arka plandayken worker timer'ı kısılabilir veya plugin event teslimi gecikebilir → yanlış-pozitif "CAN öldü". Bu PR bilgi taşıdığı için zararsız; ancak PR-2 (tüketim) öncesinde ölçülmeli ve gerekirse görünürlük kapısı eklenmeli.
Test / lint / build / guard
workerSourceHealthTransport.test.ts— 20 test (unknown başlangıç, alive→dead, dead→alive, CAN/OBD/GPS bağımsızlığı, yalnız-geçişte-mesaj, duplicate yok, bozuk mesaj fail-soft, bounded/PII'siz payload, yeni timer yok, resolver doğru store alanı, dispose sonrası yazım yok — listener terminate'ten önce kaldırılıyor, HAL/Bus/bridge değişmedi)npm run test: 3519 test / 199 dosya yeşil ·lint: 0 hata ·build: başarılınpm run guard: 113/113 yeşil (daha önce raporlanan_hasAnyFieldtimeout'u bu koşuda tekrarlamadı — flaky/pre-existing, kodla ilgisiz)Cihaz doğrulaması
Ledger #55 🔴. Kabul ölçütlerinin çekirdeği (CAN kesilince
canAlive=false, reconnect'tetrue) gerçek araç/OBD gerektiriyor; low-tier (K24/T507) doğrulaması da eksik.Rollback
Tek atomik commit →
git revert. Worker mesajı, resolvercaseve store alanı düşer; hiçbir tüketici olmadığı için davranış zaten değişmiyordu.🤖 Generated with Claude Code
https://claude.ai/code/session_012M8LbxyAqd22EU1rqtTjft