TestActiveContextSizePrefersLiveValue: packing reads liveContextSize first, then Profile.ContextSize, then the floor. Cloud profiles ship ContextSize=0, so without a live value the floor must apply.
(t *testing.T)
| 1340 | } |
| 1341 | } |
| 1342 | |
| 1343 | // TestProbeBudgetSnapshotIgnoredForStaleProfile: a budget snapshot from a |
| 1344 | // probe that lost the /models race (msg.profile != m.cfg.Active) must not |
| 1345 | // overwrite the live profile's m.budget. Mirrors the stale-probe guard the |
| 1346 | // connected flag already has. |
| 1347 | func TestProbeBudgetSnapshotIgnoredForStaleProfile(t *testing.T) { |
| 1348 | m := newTestModel(t, func(http.ResponseWriter, *http.Request) {}) |
| 1349 | m.cfg.Active = "local" |
| 1350 | m.budget = cloud.BudgetStatus{Set: true, Remaining: 0.88} |
| 1351 | out, _ := m.handleProbe(probeMsg{ |
| 1352 | profile: "hamrpass", |
| 1353 | budget: cloud.BudgetStatus{Set: true, Remaining: 0}, |
| 1354 | silent: true, |
| 1355 | err: cloud.ErrBudgetExhausted, |
| 1356 | }) |
nothing calls this directly
no test coverage detected