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:
2026-08-13 02:50:59 +04:00
parent da9114b623
commit 35c6ff5a71
67 changed files with 3174 additions and 477 deletions
+18
View File
@@ -191,6 +191,24 @@ func TestHandleTasksRejectsBadPost(t *testing.T) {
}
}
func TestHandleTasksSanitizesCoreWriteFailure(t *testing.T) {
core := &fakeTaskCore{captureErr: fmt.Errorf("sqlite /private/maven.db: key material rejected")}
form := url.Values{"action": {"add"}, "text": {"что-то"}}
req := httptest.NewRequest(http.MethodPost, "/tasks", strings.NewReader(form.Encode()))
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
rec := httptest.NewRecorder()
handleTasks(rec, req, core)
body := rec.Body.String()
for _, want := range []string{"task update failed", string(problemCoreChangeFailed), "request "} {
if !strings.Contains(body, want) {
t.Errorf("sanitized task error missing %q: %s", want, body)
}
}
if strings.Contains(body, "/private/maven.db") || strings.Contains(body, "key material") {
t.Errorf("task page disclosed the core error: %s", body)
}
}
func TestHandleTasksNoCore(t *testing.T) {
rec := httptest.NewRecorder()
handleTasks(rec, httptest.NewRequest(http.MethodGet, "/tasks", nil), nil)