- Use Conventional Commits for every commit and PR title.
- Squash related commits together so the history stays clean (one logical change per commit).
- Keep code comments concise and developer-style — explain intent, not the obvious.
- Keep PR descriptions short and clean — a brief summary plus key verification, not exhaustive detail.
- Commits must always be signed, authored and committed solely by
cursoragent@cursor.com, with noCo-authored-bytrailer (bypass the Cursor co-author hook withgit commit --no-verify).
This repo is the Matrix Dart SDK — a pure-Dart library (not a Flutter app). The
"application" is the test suite plus the SDK's public API. The example/ folder is a
small standalone Flutter app (single source file example/lib/main.dart) that depends
on the SDK via a path dependency; it needs the Flutter SDK to analyze/build and is
therefore excluded from the root dart analyze and linted/built separately by the
example_analyze and example_build_web jobs in .github/workflows/integrate.yml.
Flutter is not installed on this VM, so the example cannot be analyzed/built here.
Because pub auto-resolves the example/ folder, a plain dart pub get at the repo
root fails (the example needs the Flutter SDK). Use dart pub get --no-example (or
flutter pub get, which the shared dart CI template uses). All plain-dart CI jobs
in .github/workflows/integrate.yml pass --no-example.
Toolchain already provided by the VM snapshot (do not reinstall): Dart SDK 3.9.2 (on
PATH as dart), the Rust toolchain (cargo), Docker, mikefarah yq (at
/usr/local/bin/yq — required by scripts/prepare_vodozemac.sh; note the distro's
/usr/bin/yq is the incompatible python yq), and libsqlite3-dev/lcov. The update
script fetches dependencies with dart pub get --no-example (plain dart pub get
fails on the Flutter example, see above).
dart analyze(clean except pre-existing info-level deprecation hints).dart format --output=none --set-exit-if-changed libenforces formatting in CI.
- Non-E2EE only:
NO_OLM=1 ./scripts/test.sh(skipsolm-tagged tests, no vodozemac needed). - Full suite incl. E2EE:
./scripts/test.sh(runs all 52 files sequentially, ~10 min). Requires the native vodozemac library at./rust/target/debug/libvodozemac_bindings_dart.so. - Single file:
dart test test/<name>_test.dart(add-x olmto skip encryption tests). - vodozemac native lib: built once via
./scripts/prepare_vodozemac.sh(git-clonesdart-vodozemacinto./rust/and runscargo build). The./rust/dir is gitignored and persists in the snapshot, so it normally does NOT need rebuilding. Only re-run the script if thevodozemacversion inpubspec.yamlchanges or./rust/target/debug/*.sois missing.
- Needs a running homeserver.
dockerdis installed but is NOT auto-started — start it first (e.g.sudo dockerd &) and confirm withsudo docker info. The daemon is configured forfuse-overlayfswith the containerd-snapshotter disabled (required for Docker on this VM). - Start a homeserver and create users:
scripts/integration-server-conduit.sh(also-synapse/-dendrite), thenexport HOMESERVER=localhost:80 HOMESERVER_IMPLEMENTATION=conduit,source scripts/integration-create-environment-variables.sh, andscripts/integration-prepare-homeserver.sh. - Run:
dart --define=HOMESERVER=$HOMESERVER --define=USER1_NAME=$USER1_NAME --define=USER1_PW=$USER1_PW --define=USER2_NAME=$USER2_NAME --define=USER2_PW=$USER2_PW --define=USER3_NAME=$USER3_NAME --define=USER3_PW=$USER3_PW test test_driver/matrixsdk_test.dart -p vm. - Caveat: the full
E2EEintegration test only fully passes against synapse (the primary supported server). Against conduit/dendrite some deep multi-device olm-session assertions are expected to fail (CI runs these withfail-fast: false); login, room creation and encrypted message round-trips still work.
dart_web_compatiblebuildsweb_testviadart run webdev build;database_web_testsrunsdart test test/box_test.dart --platform chrome. Chrome is not installed by the update script — install it if you need these.