Skip to content

feat(event-bridge): Vehicle HAL + Capability → Platform Event Bus köprüleri (foundation)#54

Merged
selimmujdeci merged 1 commit into
mainfrom
feat/platform-core-event-bridge
Jul 11, 2026
Merged

feat(event-bridge): Vehicle HAL + Capability → Platform Event Bus köprüleri (foundation)#54
selimmujdeci merged 1 commit into
mainfrom
feat/platform-core-event-bridge

Conversation

@selimmujdeci

Copy link
Copy Markdown
Owner

Amaç

Vehicle HAL ve Capability Registry'deki gerçek değişiklikleri tip-güvenli, bounded, salt-okunur biçimde Platform Event Bus'a aktaran iki köprü. Bu bir foundation PR'ıdır — SystemBoot wiring, provider adapter auto-start, Platform Kernel wiring YOK (ayrı PR).

Vehicle HAL      → VehicleHalEventBridge  → Platform Event Bus
Capability Reg.  → CapabilityEventBridge  → Platform Event Bus

Vehicle HAL Event Bridge

HAL subscribe tam snapshot verir (per-signal delta yok) → köprü snapshot'ları diff'ler, yalnız değişen supported sinyalleri yayınlar.

Event Davranış
vehicle.signal.changed TRANSIENT (history dışı), küçük payload (signalId/value özeti/quality/confidence/source/stale/supported/timestamp), full HAL snapshot/raw CAN taşınmaz, O(1) dedup
vehicle.ignition.changed RETAINED, yalnız ignition supported+boolean değişince — foundation'da kaynak yok → asla yayınlanmaz
vehicle.connection.changed RETAINED, "en az bir supported sinyal" geçişinde (HAL'e dayalı gerçek olgu; veri yoksa sessiz)
vehicle.identity.changed RETAINED, yalnız identity.supported değişince (ham fingerprint yalnız metadata, payloadta değil)
vehicle.health.changed Yayınlanmaz — HAL'de health kaynağı yok (uydurulmaz)

Capability Event Bridge

Registry change event yalnız {type,id,revision,at} verir → köprü record'u getCapability(id) ile çeker.

Event Davranış
capability.record.registered/changed/removed changed imza-dedup (aynıysa event yok)
capability.snapshot.changed RETAINED, küçük payload {revision, counts, changedIds(bounded)}full registry taşınmaz. Sayımlar start'ta bir kez createSnapshot, sonra incremental O(1) (değişiklik başına allocation yok)

Record payload whitelist (id/domain/status/available/quality/confidence/source/stale/reason/limitations bounded; Registry'ce zaten sanitize).

Ortak invaryantlar

  • start/stop/dispose idempotent; tek abonelik; kaynakların sahibi değil → HAL/Registry/Bus dispose EDİLMEZ; dispose sonrası callback no-op.
  • publishedCount/droppedCount (Bus reddi / publish hatası → droppedCount; kaynak servis etkilenmez).
  • Fail-soft (HAL/Registry subscribe hatası, tek bozuk signal/record izole; public API throw etmez).
  • Privacy (VIN/MAC/koordinat/ham CAN/anahtar event'e girmez); immutable payload; katalog event isimleri.
  • HAL/Registry/Bus doğrudan import edilmez (yalnız TYPE → import yan etkisiz); timer/polling yok; global singleton yok; yeni bağımlılık yok.
  • Güvenlik kararı üretmez (yalnız taşır); Event Bus recursion/priority/bounded kuralları değişmez.

Doğrulama

  • tsc -b --noEmit ✅ · ESLint ✅
  • Hedef testler: 48 yeni (vehicle 24 + capability 24) ✅
  • Tam suite: 3111 test yeşil (185 dosya) ✅ regresyon yok
  • Production build ✅

Saha doğrulama

docs/DEVICE_VALIDATION_LEDGER.md #39🔴 cihazda test edilmedi (ölçülebilir kabul ölçütleriyle). SystemBoot/Platform Kernel wiring ayrı PR olduğu açıkça belirtildi.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QpXTwq5gqubmnaDWbra5MX

…rüleri (foundation)

Vehicle HAL ve Capability Registry'deki gerçek değişiklikleri tip-güvenli, bounded,
salt-okunur biçimde Platform Event Bus'a aktaran iki köprü. Wiring YOK (SystemBoot/
provider auto-start/Platform Kernel ayrı PR).

Vehicle (createVehicleHalEventBridge):
- HAL subscribe TAM snapshot verir → köprü diff'ler, yalnız değişen supported sinyali yayar.
- vehicle.signal.changed TRANSIENT (history dışı, küçük payload, O(1) dedup, full snapshot yok).
- vehicle.ignition.changed retained yalnız supported+değişince (foundation'da ignition
  kaynağı yok → asla yayınlanmaz).
- vehicle.connection.changed retained "en az bir supported sinyal" geçişinde (gerçek olgu).
- vehicle.identity.changed retained yalnız supported (ham fingerprint payloadta değil, metadata).
- vehicle.health.changed YAYINLANMAZ (kaynak yok → uydurulmaz).

Capability (createCapabilityEventBridge):
- record.registered/changed(imza-dedup)/removed.
- snapshot.changed RETAINED küçük payload {revision, counts, changedIds}; full registry yok.
  Sayımlar start'ta bir kez createSnapshot, sonra INCREMENTAL O(1) (değişiklik başına
  allocation yok). Record payload whitelist (sanitize).

Ortak: start/stop/dispose idempotent; tek abonelik; kaynakların sahibi değil (HAL/Registry/
Bus dispose EDİLMEZ); dispose sonrası no-op; publishedCount/droppedCount; fail-soft; privacy;
immutable payload; katalog isimleri; HAL/Registry/Bus DOĞRUDAN import edilmez (yalnız TYPE);
timer/polling yok; global singleton yok. Güvenlik kararı üretmez; Event Bus davranışı değişmez.

Testler: vehicleHalEventBridge (24) + capabilityEventBridge (24) = 48 yeni.
Tam suite 3111 yeşil, tsc temiz, eslint temiz, production build OK. Ledger #39 → 🔴.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QpXTwq5gqubmnaDWbra5MX
@vercel

vercel Bot commented Jul 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
car-launcher-pro Ready Ready Preview, Comment Jul 11, 2026 9:30am
carospro Ready Ready Preview, Comment Jul 11, 2026 9:30am

@selimmujdeci selimmujdeci merged commit 0ebc8ac into main Jul 11, 2026
8 checks passed
selimmujdeci pushed a commit that referenced this pull request Jul 12, 2026
…ç 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant