feat(event-bus): Platform Event Bus Foundation#50
Merged
Conversation
…rgası Platform modüllerinin birbirini doğrudan çağırması yerine tip-güvenli, bounded, fail-soft, izole bir olay omurgası üzerinden haberleşmesini sağlayan foundation. Yalnız foundation — gerçek modül wiring/event migration/persistence ayrı PR'lar; mevcut servis davranışı değişmez, native/SQL/UI yok, SystemBoot'a bağlanmaz. Bugün olay/abonelik ≥5 desende parçalı (≥40 servis kendi _listeners Set'i; DOM CustomEvent; Zustand subscribe; mini-bus errorBus/VehicleEventHub; native listener), ortak event-adı standardı yoktu. Event Bus bunu birleştirir. - 6 priority (safety…background) · 16 domain · 15 source · PlatformEvent(sequence/ correlation/causation/vehicleFingerprintHash/retained/…). İsim standardı domain.entity.action. ~43 event katalog (isim+contract, gerçek modüle bağlı değil). - API: publish/publishName/subscribe/subscribeDomain/once/unsubscribe/hasSubscribers/ listenerCount/getStats/getRecentEvents/clearRecentEvents/reset/dispose. - Dispatch: subscription-priority sonra kayıt sırası; safety event re-entrant kuyrukta önce; listener exception izole. Sequence monotonik (saat-geri'de bile). - Retained (opt-in replayLast, bounded), history bounded + transient dışı + priority-aware eviction (safety korunur, sanitize özet), recursion bounded (depth 16). - Gizlilik: VIN/MAC/koordinat/ham hex/secret giremez. - Yalın: güvenlik kararı üretmez (taşır), global singleton yok, hiç import yok (bağımsız), timer yok, import yan etkisiz, Map/Set O(1), hot-path'te stringify yok. Bounded, immutable (deep-freeze), fail-soft. - 46 birim testi (50 senaryo). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PaohAWKE2s1FhB6Hmmcj2p
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
selimmujdeci
pushed a commit
that referenced
this pull request
Jul 12, 2026
Boot crash/ANR yok; iki ardışık boot'ta tek aktif bus + platform.runtime.started tam bir kez (publishedCount=1, retained=1, dropped/listenerError/recursion=0, listener=0); cold start delta ~+27ms (<50ms). Ölçüm geçici, commit edilmeyen instrumentation + CDP ile alındı ve kaldırıldı. Satır 🔴 KALIYOR: runtime.stopped cihazda tetiklenemedi, low-tier (Mali-400/T507) doğrulaması ve kalıcı teşhis yüzeyi eksik. 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.
Amaç
Platform modüllerinin birbirini doğrudan çağırması yerine tip-güvenli, bounded, fail-soft, performans-duyarlı ve izole bir olay omurgası üzerinden haberleşmesini sağlayan foundation. İleride Vehicle HAL · Capability Registry · Deep Scan · Vehicle Brain · Navigation · Eagle Eye · Health · Companion AI · Assistant Context · Remote · Fleet · Vision · Media · Platform Kernel · Plugin Runtime · OEM'in ortak iletişim omurgası.
Yalnız foundation. Gerçek modül wiring · event migration · persistence · SystemBoot wiring ayrı PR'lar; mevcut servis davranışı değişmez, native/SQL/UI yok.
Salt-okunur analiz (bugünkü durum)
Olay/abonelik ≥5 ayrı desende parçalı: (a) ≥40 servis kendi
_listeners = new Set'ini tutuyor (deepScanRuntimeService, capabilityRegistry, vehicleHal, orchestrator, SafetyBrain, adaptörler…), (b) DOMCustomEvent/window.dispatchEvent, (c) Zustandstore.subscribe, (d) mini-bus'lar (errorBus,VehicleEventHub), (e) native plugin listener'ları. Ortak event-adı standardı yok, duplicate-suppression her serviste ayrı.Model
domain.entity.action(regex zorunlu)API
publish · publishName · subscribe · subscribeDomain · once · unsubscribe(idempotent) · hasSubscribers · listenerCount · getStats · getRecentEvents · clearRecentEvents · reset · dispose
Davranış
replayLastopt-in ile alır (varsayılan replay yok), boundedvehicle.signal.changed) history dışı, priority-aware eviction (safety korunur), yalnız sanitize özetPrivacy / performans / immutability
Yeni dosyalar
src/platform/eventBus/platformEventBus.ts·index.tssrc/__tests__/platformEventBus.test.ts(46 test / 50 senaryo)docs/DEVICE_VALIDATION_LEDGER.md(feat(vehicle): Vehicle Learning Engine Foundation (P2-1) #35 🔴)Doğrulama
tsc -b· ✅ ESLint · ✅ Hedef 46/46 · ✅ Tam suite 2936/2936 · ✅ Production buildBilinen eksikler
Capability Registry / Vehicle HAL / Deep Scan wiring + event migration + persistence = ayrı PR'lar. Cihazda doğrulama Ledger #35 🔴.
🤖 Generated with Claude Code