feat(platform-core): Vehicle HAL → Event Bus bridge runtime wiring (W4C)#70
Merged
Merged
Conversation
Zincir tamamlandı: UnifiedVehicleStore → VehicleHalProviderAdapter → vehicleHal → VehicleHalEventBridge → appEventBus. Bu PR yalnız wiring'dir. - platformCoreVehicleHalBridgeWiring: tek-instance guard (ikinci start yeni HAL aboneliği açmaz), idempotent cleanup, bounded status, fail-soft (bus yoksa no-op). - Sahiplik: bridge wiring'in → cleanup YALNIZ bridge'i dispose eder; HAL ve Bus DISPOSE EDİLMEZ. - SystemBoot Wave 2: HAL wiring'den SONRA, SystemOrchestrator'dan ÖNCE (_reg) → LIFO'da bridge, HAL ve Bus'tan ÖNCE kapanır. - Event: vehicle.signal.changed (transient) · connection.changed (retained; W4B unsupported geçişiyle tüm destek kalkınca false, kısmi kayıpta üretilmez) · identity.changed (ham VIN yok). ignition ÜRETİLMEZ. TPMS bounded. Duplicate yok. - Teşhis: support_snapshot'a bounded halBridge sayaçları (bridge-yok ile 0-event ayrı). - Throttle/coalescing/async-queue YOK (W4D, cihaz ölçümünden sonra); consumer YOK. Bus dispatch senkron → gelecekteki consumer'lar hot-path'e girer (bu PR'da abone yok). - Tip: bridge publish sözleşmesi geniş domain/source alır, Bus dar birlik bekler → foundation'a dokunmadan wiring'de daraltıcı publish hedefi (doğrulama zayıflamaz). - Ledger #54 🔴. Kapsam dışı: consumer migration, Capability/Deep Scan/Kernel, native canStatus, stale sweeper, W4D throttle. 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.
|
…ç yok) Bridge canlı: halBridge present/started, dropped=0. Publish/sn = 0.37 (park, GPS-only; 440 sn'de 33→197). Bus delivered=0/listener=0 (abone yok), tek HAL aboneliği, transient event'ler history'yi şişirmiyor. Boot/CPU/RSS regresyonu yok. Satır 🔴 KALIYOR: sürüşteki publish/sn, connection=false/reconnect ve low-tier doğrulaması gerçek araç/OBD gerektiriyor (W4D throttle kararının girdisi). 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.
Kurulan zincir
Bridge foundation'ı (PR #54) ilk kez üretimde: gerçek
vehicleHalsingleton'ına ve W3'ün tek aktifappEventBusörneğine bağlandı. Bu PR yalnız wiringdir.Sahiplik ve cleanup
vehicleHalEventBridge.ts:272-278).startyeni HAL aboneliği açmaz; bayat (disposed) kayıt otomatik serbest bırakılır; eski cleanup yeni aktif bridge'i düşüremez → boot→shutdown→boot güvenli.SystemBoot sırası
Wave 2'de HAL wiring'den SONRA, SystemOrchestrator'dan ÖNCE,
_regile (_regNameddeğil).⇒ Bridge kapanırken HAL ve Bus hâlâ ayakta. Wave 1–4 sırası değişmedi.
Event davranışı
vehicle.signal.changedvehicle.connection.changedfalse; kısmi kayıpta üretilmez; reconnect'tetrue.vehicle.identity.changedvehicle.ignition.changedsupported=falsekorunuyor. Guessed değer gönderilmiyor.Diagnostic (PR #68 yüzeyi)
platform.halBridgebölümü eklendi:present · started · disposed · publishedCount · droppedCount · lastPublishAt. "Bridge yok" (present:false, sayaçlarnull) ile "0 event" karıştırılmaz. Event payload'ı, signal id/değer listesi, topic detayı, VIN/fingerprint, koordinat, CAN/ham hex, correlation/causation, history içeriği, secret gönderilmez. Yeni endpoint/timer/otomatik gönderim yok.Throttle'sız — bilinçli karar
Bridge'te throttle/debounce/coalescing/async-queue YOK → publish hızı = gerçek sinyal değişim hızı. W4D kararı bu PR'ın cihaz/araç ölçümünden sonra verilecek (magic number yasağı).
Senkron bus riski:
PlatformEventBus.publish()senkron dispatch eder (platformEventBus.ts:425-426) → ileride eklenecek consumer'lar HAL/store hot-path stack'inde çalışır. Bu PR'da abone yok → yalnız publish maliyeti ödenir. Consumer migration PR'ında "listener'da ağır iş yasak" invaryantı zorunlu olacak.Bilinen sınırlama (açık blokaj, ayrı iş)
ECU sessizce frame kesip store değerlerini null'a çekmezse disconnect tespit edilemez (native
canStatushiçbir store'a yazılmıyor —CanAdapter.ts:57-59) → o senaryodaconnection.changed=falseüretilemez. Çözüm: nativecanStatuswiring veya worker source-health expose (bu PR'da yapılmadı).Tip notu (foundation'a dokunulmadı)
Bridge'in publish sözleşmesi
domain/source'u geniş (string) alır;PlatformEventBusdar birlik tipleri bekler → bus doğrudan hedef olarak geçemiyordu (property-syntax → kontravaryans; foundation hiç wire edilmediği için daha önce yakalanmamış). Foundation'a dokunmadan wiring katmanında daraltıcı bir publish hedefi kullanıldı; doğrulama zayıflamaz (Bus zaten domain/source beyaz listesi uygular).Test / lint / build / guard
platformCoreVehicleHalBridgeWiring.test.ts— 35 test (tek instance, doğru bus, event mapping, connection true/false/reconnect, ignition yok, TPMS bounded, HAL/Bus dispose edilmiyor, ikinci bus'a sızma yok, dropped/throw fail-soft, diagnostic, SystemBoot sırası, kapsam kilitleri)platformRuntimeDiagnostics.test.ts: W4E'nin "bridge bölümü yok" kilidi yeni doğru davranışa güncellendi (silinmedi)npm run test: 3499 test / 198 dosya yeşil ·lint: 0 hata ·build: başarılınpm run guard: 112/113 — düşen tek test (_hasAnyField, 5 sn timeout) main'de de aynen düşüyor → pre-existing baseline, W4C ile ilgisiz.Cihaz / araç doğrulaması
Ledger #54 🔴. Araç/OBD yok → gerçek speed/rpm/CAN publish/sn doğrulanamaz; park/GPS kaynaklı event sayısı yalnız kısmi kanıt. Low-tier (K24/T507) doğrulaması da eksik.
Rollback
Tek atomik commit →
git revert. Wiring dosyası silinir, SystemBoot'taki tek_regsatırı ve diagnostic bölümü düşer; foundation davranışı zaten değişmediği için risksiz.Kapsam dışı: consumer migration · W4D throttle · Capability/Deep Scan/Kernel · native canStatus · stale sweeper.
🤖 Generated with Claude Code
https://claude.ai/code/session_012M8LbxyAqd22EU1rqtTjft