Files
sshtermy/internal/agent/fuzz_test.go
T
db9979andClaude Opus 5.5 d315d06e77 Stabilität: Absturzschutz, Zeitgrenzen, Selbstprüfung, mehr Tests, Dauerlauf (#175)
* Absturzschutz: Fehler in Hintergrundarbeit beenden sshTermy nicht mehr; Zeitgrenzen für Update-Download und Team-Abo; Gast-Tasten über Warteschlange

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj

* CI: Zeitgrenzen je Job, alte Läufe abbrechen, Tests in zufälliger Reihenfolge; make check; Bibliotheken aktualisiert

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj

* update: Stillstand auch ohne Lesefehler erkennen

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj

* Zufallstests für Teilen, Vermittler, MCP, Syslog, KI-Antworten, Sync und Fenster-Rahmen; Syslog-Empfang übersteht kaputte Pakete; MCP antwortet auch nach Fehler

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj

* Tests: Tresor (Passwortwechsel, Sperre, Blobs, KDF-Grenzen), SFTP-Rundreise, serielle Konsole mit Ersatzkabel

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj

* Dauerlauf-Test (make soak) und nächtlicher Lauf mit langen Zufallstests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj

* Fuzz: Zeitlimit je Eingabe auch für die neuen Tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj

* Selbstprüfung: sshtermy doctor und Palette › Hilfe › Fehlersuche; versehentlich eingecheckte Programmdatei entfernt

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj

* Oberfläche aufteilen, erster Schritt: Mausbereiche (ui/clickzone) und abgelegte Dateien (ui/dropped) als eigene Pakete

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj

* Doku: Absturzschutz und Selbstprüfung in README, Webseite und Handbuch; Plan zur Aufteilung von internal/ui; Zusehen-WASM neu gebaut

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-20 12:23:50 +01:00

31 lines
948 B
Go

package agent
import (
"testing"
"github.com/db9979/sshtermy/internal/fuzzguard"
)
// Antworten der KI sind fremder Text: halbes JSON, Markdown drumherum,
// falsche Typen. Lesen darf scheitern, aber nie abstürzen.
func FuzzAnswers(f *testing.F) {
f.Add(`{"cmd":"uptime","why":"Last","done":false}`)
f.Add("```json\n{\"plan\":[{\"cmd\":\"ls\"}],\"files\":[{\"path\":\"/tmp/x\",\"content\":\"a\"}]}\n```")
f.Add(`{"windows":[{"n":1,"cmd":"df -h"}],"options":["a",2,null]}`)
f.Add(`{"pick":3}`)
f.Add(`[`)
f.Fuzz(func(t *testing.T, s string) {
fuzzguard.Run(t, func() {
for _, kind := range []string{"unix", "windows", "network"} {
_, _ = parseStep(s, kind)
_, _ = parsePlan(s, kind, true)
_, _ = parseAuto(s, kind, true)
_, _ = parseReview(s, 3, kind)
_ = ParseStepCommand(s, kind)
}
_, _ = ParseMulti(s, []Window{{N: 1, Name: "web"}, {N: 2, Name: "db", Prod: true}})
_ = ParseMenuPick(s, 5)
})
})
}