Skip to content

Commit 02dca34

Browse files
malysclaude
andcommitted
feat(evidence): record what SWI68 declares and never publishes
"Not validated yet" and "the vehicle does not publish it" are different answers, and the difference is what a driver reads. The first says a signal may start working once somebody captures it. The second says it will not, and telling a driver the first about a signal that is really the second promises something that is not coming. Three diagnostic bundles from SWI68-29958-1300R67 on 2026-09-04 carry 51 samples between them with zero readings for battery power and battery temperature, and every property probe answered no CarPropertyValue for both. That is a conclusion, not a pending item. The consequence is worth stating where the catalogue states it: the CP-030 energy model can never train from battery power on this generation, because there is no battery power to integrate. An arrival forecast on this car comes from state of charge per kilometre instead. A generation is listed only after repeated captures with no reading at all, never after a single quiet session, and one nobody captured still claims nothing either way. Refs: CP-003 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 4127ba2 commit 02dca34

2 files changed

Lines changed: 70 additions & 0 deletions

File tree

‎lib/src/main/java/com/evsuite/hardware/CarPropertyEvidence.kt‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,34 @@ object CarPropertyEvidence {
8787

8888
/** Exact generations whose battery-temperature unit and semantics CP-003 has proved. */
8989
private val batteryTemperatureFirmware: Set<FirmwareInfo.Gen> = emptySet()
90+
91+
/**
92+
* True where CP-003 observed the property declared by the VHAL and never published.
93+
*
94+
* This is a different answer from "not validated yet", and the difference is what a driver
95+
* reads. An unvalidated signal may start working once someone captures it; one the vehicle
96+
* never publishes will not, and saying "not yet validated" about it promises something that
97+
* is not coming.
98+
*
99+
* A generation is listed only after repeated captures with no reading at all, never after
100+
* a single quiet session.
101+
*/
102+
fun isNeverPublished(signal: Signal, firmware: FirmwareInfo.Gen): Boolean =
103+
firmware in neverPublishedByFirmware[signal].orEmpty()
104+
105+
/**
106+
* SWI68: three diagnostic bundles from SWI68-29958-1300R67 on 2026-09-04, 51 samples
107+
* between them, zero readings for either signal, and `EV_INSTANTANEOUS_CHARGE_RATE` and
108+
* `EV_BATTERY_AVG_TEMP` answering `no CarPropertyValue` on every property probe.
109+
*
110+
* Consequence worth stating plainly: the CP-030 energy model can never train from battery
111+
* power on this generation, because there is no battery power to integrate. An arrival
112+
* forecast on this car has to come from state of charge per kilometre instead.
113+
*/
114+
private val neverPublishedByFirmware: Map<Signal, Set<FirmwareInfo.Gen>> = mapOf(
115+
Signal.BATTERY_POWER_KW to setOf(FirmwareInfo.Gen.SWI68),
116+
Signal.BATTERY_TEMPERATURE_CELSIUS to setOf(FirmwareInfo.Gen.SWI68),
117+
)
90118
}
91119

92120
/**

‎lib/src/test/java/com/evsuite/hardware/CarPropertyEvidenceTest.kt‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,45 @@ class ReadFailureLogTest {
124124
assertTrue(ReadFailureLog.isNew("0x1160030e", "unavailable"))
125125
}
126126
}
127+
128+
class NeverPublishedCatalogueTest {
129+
130+
@Test fun `SWI68 never publishes battery power or battery temperature`() {
131+
CarPropertyEvidence.Signal.entries.forEach { signal ->
132+
assertTrue(
133+
"$signal is proven absent on SWI68",
134+
CarPropertyEvidence.isNeverPublished(signal, FirmwareInfo.Gen.SWI68),
135+
)
136+
}
137+
}
138+
139+
@Test fun `absent is not the same claim as validated`() {
140+
// The catalogue says the vehicle does not publish it, which is precisely why it can
141+
// never be validated. Both must be false-for-validated and true-for-absent at once.
142+
assertFalse(
143+
CarPropertyEvidence.isValidated(
144+
CarPropertyEvidence.Signal.BATTERY_POWER_KW,
145+
FirmwareInfo.Gen.SWI68,
146+
)
147+
)
148+
assertTrue(
149+
CarPropertyEvidence.isNeverPublished(
150+
CarPropertyEvidence.Signal.BATTERY_POWER_KW,
151+
FirmwareInfo.Gen.SWI68,
152+
)
153+
)
154+
}
155+
156+
@Test fun `a generation nobody captured claims nothing either way`() {
157+
listOf(FirmwareInfo.Gen.SWI69, FirmwareInfo.Gen.SWI131, FirmwareInfo.Gen.SWI133)
158+
.forEach { generation ->
159+
CarPropertyEvidence.Signal.entries.forEach { signal ->
160+
assertFalse(
161+
"$signal on $generation was never captured",
162+
CarPropertyEvidence.isNeverPublished(signal, generation),
163+
)
164+
assertFalse(CarPropertyEvidence.isValidated(signal, generation))
165+
}
166+
}
167+
}
168+
}

0 commit comments

Comments
 (0)