feat(deep-scan): W5-3c-1 — Safe Offline Change Detection Handler#86
Merged
Merged
Conversation
…, çağrılmayan)
Deep Scan offline pass için İLK gerçek değer üreten handler:
createOfflineChangeDetectionHandler() — fabrika, bağımlılıklar closure ile enjekte.
ÖNCEDEN-VAROLAN iki baseline'ın ECU kümesi farkını hesaplar → changedEcu.
Aktif sorgu YOK: iki küme de zaten elde olan veri (prior = deepScanPersistence.load,
current = vehicleKnowledgeBase.get — ADAPTER ayrı PR). Araca tek CAN frame / OBD
isteği / ECU-PID-DID sorgusu gönderilmez.
Saf + izole:
- Handler persistence/knowledge-base/runtime/native/HAL/EventBus'i DOĞRUDAN import
ETMEZ (yalnız PhaseContext/PhaseResult tip import'u).
- PhaseHandler sözleşmesi + PhaseContext DEĞİŞMEZ.
- Fail-closed: parmak izi yok / baseline eksik / baseline boş → değişim iddia edilmez
(sahte pozitif yok; persistence ECU listesi opsiyonel → boş baseline olağan).
- changedFirmware DAİMA false (dürüst — pasif firmware kaynağı yok, ayrı PR).
Bounded + immutable çıktı: yalnız {status, changedEcu, changedFirmware, reason}.
Ham ECU/PID/DID listesi, firmware sürümü, VIN, GPS, secret, parmak izi hash'i taşımaz.
Koruma bandı (uçtan uca kanıtlı): completeScan/_finalize/_applyResult aktif-kayıt yolu /
runtime aktif-kayıt API'leri / saveSnapshot çağrılmaz → hasCompletedFullScan /
completedScanCount / changeCheckCount değişmez; runtime.reset korunur. Trigger/wiring
DEĞİŞMEDİ; Event Bus/Capability/Assistant/Native/OBD/CAN/HAL'e dokunulmadı.
Doğrulama: 21 yeni test; tam suite 3841 yeşil (211 dosya); tsc -b --noEmit temiz;
lint 0 error; production build OK.
Ledger: W5-3c-1 🔴 (yalnız handler · trigger/wiring değişmedi · aktif discovery yok ·
ECU/PID/DID sorgusu yok · Mali-400 doğrulaması bekliyor).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014VRXRfa6ZD3qJ74ozfzugm
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
W5-3c-1 — Safe Offline Change Detection Handler
Deep Scan offline pass için İLK gerçek değer üreten handler. Yalnız handler eklenir — trigger/wiring değişmez, handler henüz pass'e bağlı değildir (W5-3c-2 adapter + W5-3c-3 bağlama ayrı PR).
Ne yapar
createOfflineChangeDetectionHandler()(fabrika; bağımlılıklar closure ile enjekte) → ÖNCEDEN-VAROLAN iki baseline'ın ECU kümesi farkını hesaplar →changedEcu.deepScanPersistence.loadile beslenecek — ayrı PR)vehicleKnowledgeBase.getile beslenecek — ayrı PR)Aktif sorgu YOK
İki küme de zaten elde olan veri. Araca tek CAN frame / OBD isteği / ECU-PID-DID sorgusu gönderilmez.
Saf + izole
deepScanPersistence/vehicleKnowledgeBase/runtime/native/HAL/EventBus'i doğrudan import etmez (yalnızPhaseContext/PhaseResulttip import'u).PhaseHandlersözleşmesi +PhaseContextdeğişmez.changedEcu=false, kategori reason). Persistence ECU listesi opsiyonel → boş baseline olağan; bunu "değişti" saymak sahte pozitif olurdu →baseline_incomplete.changedFirmwaredaimafalse(dürüst — pasif firmware kaynağı yok, ayrı PR).Bounded + immutable çıktı
Yalnız
{status, changedEcu, changedFirmware, reason(kategori)}. Ham ECU/PID/DID listesi, firmware sürümü, VIN, GPS, secret, parmak izi hash'i taşımaz.Koruma bandı (uçtan uca kanıtlı)
completeScan/_finalize/_applyResultaktif-kayıt yolu / runtime aktif-kayıt API'leri (recordEcuDiscoveryvb.) /saveSnapshotçağrılmaz →hasCompletedFullScan/completedScanCount/changeCheckCountdeğişmez;runtime.reset()korunur (gerçekrunOfflinePassile koşturulan uçtan uca testte doğrulandı). Trigger/wiring değişmedi; Event Bus/Capability/Assistant/Driver DNA/Prediction/Diagnostic section/SQL/Native/OBD/CAN/HAL'e dokunulmadı.Doğrulama
tsc -b --noEmittemiz · ESLint 0 errorDeğişen dosyalar
src/platform/deepScan/offlineChangeDetectionHandler.ts(yeni — saf handler + tipler)src/platform/deepScan/index.ts(barrel export)src/__tests__/deepScanOfflineChangeDetection.test.ts(yeni, 21 test)docs/DEVICE_VALIDATION_LEDGER.md(W5-3c-1 🔴 feat(platform-core): Vehicle HAL runtime wiring (store→provider→adapter→HAL) #65)Ledger
W5-3c-1 🔴 — bu PR yalnız handler ekler · trigger değişmedi · wiring değişmedi · aktif discovery yok · hiçbir ECU/PID/DID sorgusu gönderilmiyor · Mali-400 cihaz doğrulaması bekliyor.
Bilinen riskler
changedFirmwarebilinçlifalse— firmware değişimi tespiti bu PR kapsamı dışı.🤖 Generated with Claude Code