feat: chaos monkey backend test running daily in CI #455

Closed
guettlibot wants to merge 1 commits from issue-448-chaos-monkey-test into main
guettlibot commented 2026-06-05 20:40:32 +00:00 (Migrated from codeberg.org)

Closes #448

Summary

  • test/backend/chaos_monkey_test.dart: headless Dart test (no display, no Flutter rendering) that runs 30 rounds of randomly-ordered operations against the email repository backed by a live Stalwart instance — sync INBOX/Sent, send self-email, mark seen/unseen, toggle flagged, delete, and flush pending changes. The random seed is printed at the start of every run so any failing run can be reproduced exactly by setting CHAOS_SEED=.
  • ci/main.go: ChaosMonkeyBackend Dagger function following the same pattern as TestBackend — uses WithStalwart + flutter test --concurrency=1.
  • Taskfile.yml: chaos-monkey-backend task that calls the Dagger function with a 600s timeout.
  • .forgejo/workflows/chaos-monkey.yml: daily cron workflow (03:00 UTC) + workflow_dispatch for on-demand runs.

Test plan

  • task chaos-monkey-backend runs without error locally (requires Dagger + Nix shell)
  • CI workflow triggers on schedule and on manual dispatch
  • A failing random operation prints the seed so the run is reproducible via CHAOS_SEED= task chaos-monkey-backend
Closes #448 ## Summary - `test/backend/chaos_monkey_test.dart`: headless Dart test (no display, no Flutter rendering) that runs 30 rounds of randomly-ordered operations against the email repository backed by a live Stalwart instance — sync INBOX/Sent, send self-email, mark seen/unseen, toggle flagged, delete, and flush pending changes. The random seed is printed at the start of every run so any failing run can be reproduced exactly by setting CHAOS_SEED=<value>. - `ci/main.go`: ChaosMonkeyBackend Dagger function following the same pattern as TestBackend — uses WithStalwart + flutter test --concurrency=1. - `Taskfile.yml`: chaos-monkey-backend task that calls the Dagger function with a 600s timeout. - `.forgejo/workflows/chaos-monkey.yml`: daily cron workflow (03:00 UTC) + workflow_dispatch for on-demand runs. ## Test plan - [ ] task chaos-monkey-backend runs without error locally (requires Dagger + Nix shell) - [ ] CI workflow triggers on schedule and on manual dispatch - [ ] A failing random operation prints the seed so the run is reproducible via CHAOS_SEED=<seed> task chaos-monkey-backend
guettlibot commented 2026-06-06 07:01:35 +00:00 (Migrated from codeberg.org)

Closing: the content of this PR (chaos monkey test, workflow, Taskfile task, ci/main.go function) has already been merged to main via commits #458 and related. The branch has conflicts with main and the code is essentially superseded.

Closing: the content of this PR (chaos monkey test, workflow, Taskfile task, ci/main.go function) has already been merged to main via commits #458 and related. The branch has conflicts with main and the code is essentially superseded.

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.