feat(vehicle): Persistent Vehicle Learning Evidence Store (P2-2)#36
Merged
Conversation
P2-1 LearningEvidence kayıtlarını oturumlar arası KALICI kılar → sistem farklı araç/günden
gelen kanıtı offline biriktirir. safeStorage tabanlı, bounded(512) LRU, throttle'lı yazma,
fail-soft. Cloud/SQL/LLM/Native/hot-path YOK.
- vehicleLearningEvidenceStore.ts (yeni):
* safeStorage anahtarı car-vehicle-learning-evidence + şema sürümü (eski/bozuk → fail-soft)
* upsert: evidenceId ile idempotent birleştirme — duplicate yok; firstSeen=min, lastSeen=max,
observationCount=güvenli toplam, supportingVehicleHashes unique birleşim, vehicleCount=distinct
hash sayısı, ecuAddresses normalize/sort/unique; confidence/status P1 fonksiyonuyla YENİDEN
hesaplanır (P1 formülü DEĞİŞMEZ); createdAt korunur, updatedAt güncellenir
* save/get/list/remove/clear/flush/dispose API
* bounded(512) LRU: status-aware deterministik eviction (weak, strong'dan ÖNCE silinir);
debounce yazma (5s); zero-leak dispose (timer temizler + bekleyeni yazar)
- safeStorage: car-vehicle-learning-evidence → LRU_PROTECTED (kota dolunca silinmez)
Bu PR'da decay/prune YOK (P2-3). VLE confidence formülü / Discovery / VKB / Manufacturer
Intelligence / Diagnostic davranışı DEĞİŞMEDİ. Girdi kayıtları mutate edilmez (salt-okunur).
Dokunulmadı: native OBD · poll · PID/DID registry · SQL/Supabase · cloud · LLM · PR #11/#20.
15 test. tsc -b temiz · eslint temiz · 2522 test yeşil (23 bilinen env-gated, ilgisiz).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fauew13VP3vbfKqnocPdfX
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Jul 10, 2026
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ç
P2-1'in ürettiği
LearningEvidencekayıtlarını oturumlar arası kalıcı kılar → sistem farklı araçlardan ve farklı günlerden gelen öğrenme kanıtını offline biriktirir.PR #35 merge sonucu
✅ PR #35 (P2-1) merge edildi — merge commit
8d0a731, main →8d0a731, tüm CI yeşildi. Branch silinmedi. Bu PR güncel main'den açıldı.Yeni dosyalar
src/platform/vehicleLearningEvidenceStore.tssrc/__tests__/vehicleLearningEvidenceStore.test.tsDeğişen dosyalar (additive)
src/utils/safeStorage.ts—car-vehicle-learning-evidence→LRU_PROTECTED(tek satır)Storage modeli
car-vehicle-learning-evidence· safeStorage (localStorage doğrudan YOK) · şema sürümü (eski/bozuk → fail-soft boş) · debounce yazma (5s, yüksek-frekans disk yazımı yok) · zero-leak dispose.evidenceId→ duplicate yok ·firstSeen=min ·lastSeen=max ·observationCount=güvenli toplam ·supportingVehicleHashes=unique birleşim ·vehicleCount=distinct hash sayısı (input yok sayılır) ·ecuAddresses=normalize/sort/unique ·confidence/status=P1 fonksiyonuyla yeniden hesap ·createdAtkorunur ·updatedAtgüncellenir.Bounded / LRU davranışı
lastSeen/updatedAt), sonra id. Bu PR'da decay/prune YOK (P2-3).API
save·upsert·get·list·remove·clear·flush·dispose.Testler (15)
✓ save/load kalıcılığı · ✓ duplicate yok · ✓ observationCount↑ · ✓ hash unique birleşim · ✓ vehicleCount distinct · ✓ ECU normalize · ✓ firstSeen korunur · ✓ lastSeen güncellenir · ✓ confidence/status yeniden hesap · ✓ bounded(max) · ✓ weak strong'dan önce evict · ✓ bozuk storage fail-soft · ✓ eski schema fail-soft · ✓ throttle/debounce (upsert→disk yazmaz, flush yazar) · ✓ dispose cleanup (zero-leak) · ✓ clear · ✓ girdi mutate edilmiyor. (createdAt/updatedAt dahil.)
Risk analizi
Düşük — additive. Depo hata verse bile OBD/Discovery/Fingerprint/Auto Learning/VKB/Manufacturer Intelligence/Diagnostic aynen sürer (her yol fail-soft). Girdi mutate edilmez; hot-path yok; safeStorage debounce ile eMMC yazma korunur; zero-leak dispose. Dokunulmadı: native OBD · poll · PID/DID registry · SQL/Supabase · cloud · LLM · VLE confidence formülü · PR #11/#20.
Doğrulama
tsc -b --noEmittemiz ·eslinttemizMerge YAPILMADI.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Fauew13VP3vbfKqnocPdfX