Make delivery and integration failures explicit
Persist reminder presentations and retry state, atomically complete collapsed deliveries, fall back across away reaches, and block permanent failures visibly (V-715, V-678). Fail closed when enabled integrations lack credentials and keep remote arms explicitly dark (V-691). Give mavweb one sanitized, request-correlated error contract (V-689). Owner explicitly requested direct commits to master.
This commit is contained in:
@@ -149,6 +149,27 @@ type errBrokenModel struct{}
|
||||
|
||||
func (errBrokenModel) Error() string { return "llm: server did not start" }
|
||||
|
||||
type errPrivateModel struct{}
|
||||
|
||||
func (errPrivateModel) Error() string { return "exec /private/llama-server: token rejected" }
|
||||
|
||||
func TestModels_SwapFailureIsSanitizedAndTraceable(t *testing.T) {
|
||||
core := &fakeModelCore{
|
||||
swapErr: errPrivateModel{},
|
||||
status: ipc.ModelStatusResp{Model: "qwen3", ModelPath: "/m/old.gguf"},
|
||||
}
|
||||
w := modelsPOST(t, core, nil, false, "/m/cpt.gguf")
|
||||
body := w.Body.String()
|
||||
for _, want := range []string{"swap failed", string(problemModelsUnavailable), "request "} {
|
||||
if !strings.Contains(body, want) {
|
||||
t.Errorf("sanitized model error missing %q:\n%s", want, body)
|
||||
}
|
||||
}
|
||||
if strings.Contains(body, "/private/llama-server") || strings.Contains(body, "token rejected") {
|
||||
t.Errorf("model page disclosed the backend error:\n%s", body)
|
||||
}
|
||||
}
|
||||
|
||||
func TestModels_TotalFailureDoesNotSaySheIsStillAnswering(t *testing.T) {
|
||||
// The load failed and so did the rollback: nothing is loaded. The page used
|
||||
// to branch on RolledBack first and render "rolled back to — she is still
|
||||
|
||||
Reference in New Issue
Block a user