PR #281 · "Add SoC delta logging to telemetry stream" just merged to main. 4 files (+82 / −12). Adds a per-second SoC delta channel for downstream regression — teed up the cold-soak instrumentation we'll need for the next wave of fixes.
Good — that's the channel we need. FYI I caught a cold-soak edge case last weekend on the test fleet: SoC reads negative for ~3s after a sub-zero boot, then snaps back. Opening #312 with the trace.
On it — Milos just pushed to main. Pulling the diff, reading the commit messages, and cross-referencing the linked issues so the summary lands with everything you need to discuss inline.
PR #284 · "Fix charge curve on cold-soak start" just merged to main. 7 files (+312 / −98), most of it in charging/curve.ts and tests/coldSoak.test.ts. Closes #312 (negative SoC reading after <−10°C boot — Will's catch) and #318 (charge-rate clamp ignored on first cycle). One follow-up: rate-limit logic still hard-codes 250kW — flagged as a TODO in the diff.
charging/curve.ts +128 / −42charging/clamp.ts +64 / −18tests/coldSoak.test.ts +86 / −0telemetry/socReader.ts +18 / −24// TODO(milos): rate clamp still hard-coded to 250kW — promote to config
Cold-soak path is the right call — that matches the trace I posted in #312. Did the new clamp actually fire on the test fixture, or is the test only asserting on the SoC snap-back?
Good question. @Source Code show me the test fixture from PR #284 plus the assertion that catches the clamp.
Pulling tests/coldSoak.test.ts from PR #284 — the new file, 86 added lines. Two test cases: boots clean from −15°C with no negative SoC and clamps charge rate to 80kW until pack ≥ 0°C. The second one is the clamp assertion Will's asking about.
test('clamps charge rate to 80kW until pack ≥ 0°C', async () => {
const pack = await coldSoakPack({ tempC: -15 });
const session = chargeUntil(pack, { targetSoc: 0.5 });
expect(session.peakKw).toBeLessThanOrEqual(80);
expect(session.warmupCurve).toMatchSnapshot();
expect(pack.tempC).toBeGreaterThanOrEqual(0); // pack warmed before unclamping
});
Yes — assertion is on session.peakKw. The clamp fires; without it the snapshot test catches the SoC snap-back too.
Re: the rate-limit TODO — let's open #285 for that, not bury it in this PR. The 250kW number is going to bite us when the V4 supercharger lands.
+1 on opening #285. Also want a dashboard regression test for cold-soak — Will, can you scope that? We should be alerting before a customer files a ticket.
On it — I'll spec out the dashboard regression test today. Spinning the metrics off the new SoC delta channel from PR #281 so we don't double-instrument.