Conversation
Stalwart 0.16.6 ignores STALWART_ADMIN_PASSWORD when no config file exists
and enters bootstrap mode instead, making the previous setup fail.
Changes:
- docker-compose.yml: replace STALWART_ADMIN_PASSWORD with
STALWART_RECOVERY_ADMIN=admin:adminpass (pins bootstrap credential);
mount config/config.json read-only at /etc/stalwart/config.json to
prevent bootstrap mode; update tmpfs (remove /opt/stalwart/etc which
no longer applies); fix healthcheck to /admin/ (returns 200).
- config/config.json: new file — SQLite data store pointer required so
Stalwart finds its database instead of entering bootstrap mode.
- setup_stalwart.sh: rewrite to use JMAP POST /jmap instead of the
removed REST /api/* endpoints; use x:Domain/set, x:Account/set,
x:Authentication/set (passwordMinStrength zero), x:Http/set (rate
limits); update CalDAV verification URL to %40-encoded email path.
- docker.py StalwartTestServer: update default username to full email
(testuser@example.org); URL-encode @ in url property; update
scheduling_users passwords to caldavtest{N} (testpass{N} is rejected
by the zxcvbn common-password list even at strength "zero").
- caldav_test_servers.yaml.example: update Stalwart username/password
defaults to match the new setup.
prompt: "Stalwart 0.16.6 changed behavior and ignores STALWART_ADMIN_PASSWORD
when no config file exists, entering bootstrap mode instead. Please fix the
stalwart docker image."
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ssion scheme rewriting
Second round of fixes for Stalwart v0.16.6 compatibility, following up on
the bootstrap-mode changes in the previous commit.
Changes:
- setup_stalwart.sh: fix rate-limit JMAP call — must CREATE the Http singleton
first (id "h1"), then fall back to UPDATE ("singleton") if primaryKeyViolation;
period must be integer milliseconds (60000), not a string ("1m"); max count
capped at 1,000,000 (Stalwart validation limit, not 999999999)
- docker-compose.yml + setup_stalwart.sh: change readiness check from /admin/
(requires GitHub web-UI download, unreliable) to /dav/cal/ (returns 401
immediately once the database is initialised)
- test_jmap_integration.py: update hardcoded credentials to match v0.16+
format — username is now a full email address (testuser@example.org) and
the password changed to testcaldav (zxcvbn rejects "testpass" even at
zero minimum strength)
- jmap/session.py: also rewrite scheme (not just netloc/port) when the
advertised apiUrl host matches but scheme differs — Stalwart advertises
https://localhost/jmap/ even when we connected via http, causing SSL errors
All Stalwart scheduling and JMAP integration tests now pass.
prompt: The previous context window ran out mid-session. The failing test
was testInviteAndRespond. I manually debugged it and found it passes when
run in isolation — it was a transient state issue from the earlier test run.
followup-prompt: Continue the conversation from where it left off without
asking the user any further questions.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
AI Prompts:
claude-sonnet-4-6: $ pytest -k stalwart (...) =================================================================== short test summary info =================================================================== FAILED tests/test_async_integration.py::TestAsyncSchedulingForStalwart::test_schedule_tag_stable_on_partstate_update - caldav.lib.error.RateLimitError: RateLimitError at 'http://localhost:8809/dav/itip/user2%40example.org/inbox/', reason Rate limited or service unavailable... FAILED tests/test_caldav.py::TestSchedulingForServerStalwart::testInviteAndRespond - AssertionError: Expected invite in attendee inbox OR event auto-added to attendee calendar, got neither FAILED tests/test_jmap_integration.py::TestStalwartJMAPCalendarListIntegration::test_list_calendars_returns_list - caldav.jmap.error.JMAPAuthError: JMAPAuthError (type=forbidden) at 'http://localhost:8809/.well-known/jmap', reason: HTTP 401 from session endpoint FAILED tests/test_jmap_integration.py::TestStalwartJMAPCalendarListIntegration::test_calendars_have_id_and_name - caldav.jmap.error.JMAPAuthError: JMAPAuthError (type=forbidden) at 'http://localhost:8809/.well-known/jmap', reason: HTTP 401 from session endpoint ERROR tests/test_async_integration.py::TestAsyncSchedulingForStalwart::test_schedule_tag_changes_on_organizer_update - caldav.lib.error.RateLimitError: RateLimitError at 'http://localhost:8809/dav/cal/user2%40example.org/', reason Rate limited or service unavailable. Retry... ERROR tests/test_async_integration.py::TestAsyncSchedulingForStalwart::test_schedule_tag_mismatch_raises_error - caldav.lib.error.RateLimitError: RateLimitError at 'http://localhost:8809/dav/cal/user2%40example.org/', reason Rate limited or service unavailable. Retry... ERROR tests/test_async_integration.py::TestAsyncSchedulingForStalwart::test_schedule_tag_match_succeeds - caldav.lib.error.RateLimitError: RateLimitError at 'http://localhost:8809/dav/cal/user2%40example.org/', reason Rate limited or service unavailable. Retry... ERROR tests/test_caldav.py::TestSchedulingForServerStalwart::testInviteAndRespond - caldav.lib.error.RateLimitError: RateLimitError at 'http://localhost:8809/dav/pal/user2%40example.org/', reason Rate limited or service unavailable. Retry... ERROR tests/test_caldav.py::TestSchedulingForServerStalwart::testAcceptInviteUsernameEmailFallback - caldav.lib.error.RateLimitError: RateLimitError at 'http://localhost:8809/dav/cal/user2%40example.org/', reason Rate limited or service unavailable. Retry... ERROR tests/test_caldav.py::TestSchedulingForServerStalwart::testScheduleTagReturnedOnSave - caldav.lib.error.RateLimitError: RateLimitError at 'http://localhost:8809/dav/cal/user2%40example.org/', reason Rate limited or service unavailable. Retry... ERROR tests/test_caldav.py::TestSchedulingForServerStalwart::testScheduleTagStableOnPartstateUpdate - caldav.lib.error.RateLimitError: RateLimitError at 'http://localhost:8809/dav/cal/user2%40example.org/', reason Rate limited or service unavailable. Retry... ERROR tests/test_caldav.py::TestSchedulingForServerStalwart::testScheduleTagChangesOnOrganizerUpdate - caldav.lib.error.RateLimitError: RateLimitError at 'http://localhost:8809/dav/cal/user2%40example.org/', reason Rate limited or service unavailable. Retry... ERROR tests/test_caldav.py::TestSchedulingForServerStalwart::testScheduleTagMismatchRaisesError - caldav.lib.error.RateLimitError: RateLimitError at 'http://localhost:8809/dav/cal/user2%40example.org/', reason Rate limited or service unavailable. Retry... ERROR tests/test_caldav.py::TestSchedulingForServerStalwart::testScheduleTagMatchSucceeds - caldav.lib.error.RateLimitError: RateLimitError at 'http://localhost:8809/dav/cal/user2%40example.org/', reason Rate limited or service unavailable. Retry... ERROR tests/test_jmap_integration.py::TestStalwartJMAPEventIntegration::test_event_create_get - caldav.jmap.error.JMAPAuthError: JMAPAuthError (type=forbidden) at 'http://localhost:8809/.well-known/jmap', reason: HTTP 401 from session endpoint ERROR tests/test_jmap_integration.py::TestStalwartJMAPEventIntegration::test_event_update - caldav.jmap.error.JMAPAuthError: JMAPAuthError (type=forbidden) at 'http://localhost:8809/.well-known/jmap', reason: HTTP 401 from session endpoint ERROR tests/test_jmap_integration.py::TestStalwartJMAPEventIntegration::test_event_delete - caldav.jmap.error.JMAPAuthError: JMAPAuthError (type=forbidden) at 'http://localhost:8809/.well-known/jmap', reason: HTTP 401 from session endpoint ERROR tests/test_jmap_integration.py::TestStalwartJMAPEventIntegration::test_event_query_time_range - caldav.jmap.error.JMAPAuthError: JMAPAuthError (type=forbidden) at 'http://localhost:8809/.well-known/jmap', reason: HTTP 401 from session endpoint ERROR tests/test_jmap_integration.py::TestStalwartJMAPEventIntegration::test_ical_roundtrip - caldav.jmap.error.JMAPAuthError: JMAPAuthError (type=forbidden) at 'http://localhost:8809/.well-known/jmap', reason: HTTP 401 from session endpoint ======================================= 4 failed, 67 passed, 11 skipped, 1633 deselected, 15 errors in 86.99s (0:01:26) =======================================
…tput
prompt: The davical container has troubles now - getting AuthorizationError.
The run_sql() function used 2>&1 which captured the podman-as-docker
compatibility message ("Emulate Docker CLI using podman...") into the
command output. This made the user-existence checks always return non-empty
(truthy), so users were never actually inserted into the database.
Fix: redirect stderr to /dev/null in run_sql() so only real psql stdout
is captured.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
AI Prompts:
claude-sonnet-4-6: The davical container has troubles now: $ pytest -k davical (...) ERROR tests/test_caldav.py::TestForServerDavical::testSetCalendarProperties - caldav.lib.error.AuthorizationError: AuthorizationError at 'http://localhost:8805/caldav.php/testuser... ERROR tests/test_caldav.py::TestForServerDavical::testLookupEvent - caldav.lib.error.AuthorizationError: AuthorizationError at 'http://localhost:8805/caldav.php/testuser... ERROR tests/test_caldav.py::TestForServerDavical::testCreateOverwriteDeleteEvent - caldav.lib.error.AuthorizationError: AuthorizationError at 'http://localhost:8805/caldav.php/testuser... ERROR tests/test_caldav.py::TestForServerDavical::testDateSearchAndFreeBusy - caldav.lib.error.AuthorizationError: AuthorizationError at 'http://localhost:8805/caldav.php/testuser... ERROR tests/test_caldav.py::TestForServerDavical::testRecurringDateSearch - caldav.lib.error.AuthorizationError: AuthorizationError at 'http://localhost:8805/caldav.php/testuser... ERROR tests/test_caldav.py::TestForServerDavical::testRecurringDateWithExceptionSearch - caldav.lib.error.AuthorizationError: AuthorizationError at 'http://localhost:8805/caldav.php/testuser... ERROR tests/test_caldav.py::TestForServerDavical::testEditSingleRecurrence - caldav.lib.error.AuthorizationError: AuthorizationError at 'http://localhost:8805/caldav.php/testuser... ERROR tests/test_caldav.py::TestForServerDavical::testOffsetURL - caldav.lib.error.AuthorizationError: AuthorizationError at 'http://localhost:8805/caldav.php/testuser...
Some bugs has been fixed in Xandikos AI Prompts: claude-sonnet-4-6: create-calendar.set-displayname is now apparently unsupported for SOGo (`pytest -k 'sogo and compat'), and tests/test_caldav.py::TestForServerSOGo::testCreateEvent breaks - please investigate if it's a regression with SOGo or a regression in the caldav library (or possibly4 a regression in ~/caldav-server-tester)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Maintainance of the docker test server framework