68
Tests Passed
41 unit + 27 integration
0
Test Failures
unit + integration
18
Doc-test Errors
compile-time regression
0
Lint Warnings
clippy clean
N/A
Coverage
tarpaulin not installed
Test Results by Suite
Suite Total Passed Failed Skipped Status Delta vs Prev
Unitsrc/lib.rs 41 41 0 0 PASS +4 new tests
Integrationtests/integration.rs 27 27 0 0 PASS stable
Doc-testssrc/repository/*.rs (sqlx macros) 0 18 0 FAIL 0 → 18 errors
Total (unit + integration) 68 68 0 0 prev: 64 (+4)
Regressions Detected
REGRESSION — Doc-test compilation failure    0 errors → 18 errors
Root cause: sqlx::query! macros perform compile-time query validation against the live DATABASE_URL. The dev PostgreSQL instance does not have a notifications schema, so rustdoc fails when recompiling from scratch — the relations notifications.notifications, notifications.preferences, and notifications.templates do not exist.

Why regular tests still pass: cargo test reuses cached compiled artifacts from a prior build when the schema existed. rustdoc does not use those cached artifacts and recompiles fresh, triggering all sqlx macro checks.

Affected files:
src/repository/notifications.rs 7 errors INSERT, SELECT ×2, LIST, UPDATE, soft-delete, COUNT
src/repository/preferences.rs 4 errors UPSERT, LIST, GET by channel, soft-delete
src/repository/templates.rs 6 errors INSERT, GET, LIST, UPDATE, soft-delete (×2)
tests/integration.rs:639 1 warning unused variable pref_req — prefix with _pref_req

Fix options (pick one):
  • Set SQLX_OFFLINE=true in CI and local .env — sqlx reads from .sqlx/ cache instead of live DB.
  • Add to .cargo/config.toml: [env] SQLX_OFFLINE = "true" — applies to all builds automatically.
  • Restore the notifications schema in dev PostgreSQL and run sqlx migrate run.
Improvements Since Last Run
Test count increased: 64 → 68  (+4 new tests)
4 new unit tests added since the previous run. Integration suite stable at 27 tests, covering: notifications CRUD, preferences, templates, RLS enforcement (4 tests), CloudEvents emission, quiet-hours deferral.
Lint & Formatting
Clippy
PASS
Lint Warnings
0
Lint Errors
0
cargo fmt
CLEAN
Files Auto-fixed
NONE
Coverage
N/A cargo-tarpaulin not installed on this agent — coverage measurement skipped. To install: cargo install cargo-tarpaulin
Passing Tests — Unit (41)
Show all 41 unit tests 41 PASS
  • test_extract_bearer_token
  • test_tenant_context_creates_correlation_id_when_missing
  • test_tenant_context_user_id_defaults_to_nil
  • test_claims_deserialize_without_roles
  • test_verify_jwt_invalid_secret
  • test_verify_jwt_expired_token
  • test_verify_jwt_valid_token
  • test_server_addr_format
  • test_begin_tenant_tx_requires_pool
  • test_create_notification_cannot_have_both_body_and_template
  • test_create_notification_requires_body_or_template
  • test_create_notification_valid_with_body
  • test_create_notification_valid_with_template
  • test_create_template_validates_empty_body
  • test_create_template_validates_empty_name
  • test_pagination_caps_per_page_at_100
  • test_pagination_defaults
  • test_pagination_offset_calculation
  • test_pagination_page_zero_treated_as_one
  • test_channel_all_variants_deserialize
  • test_channel_serialization
  • test_notification_status_all_variants_deserialize
  • test_notification_status_default_is_pending
  • test_priority_all_variants_deserialize
  • test_priority_default_is_normal
  • test_preference_no_quiet_hours
  • test_preference_quiet_hours_normal_range
  • test_preference_quiet_hours_wraps_midnight
  • test_template_render_body
  • test_template_render_with_no_vars
  • test_conflict_status_code
  • test_internal_error_does_not_expose_details
  • test_not_found_status_code
  • test_unauthorized_status_code
  • test_validation_status_code
  • test_all_event_types_have_correct_prefix
  • test_cloud_event_envelope_structure
  • test_cloud_event_serializes_to_json
  • test_cloud_event_unique_ids
  • test_topic_constant
  • test_health_returns_ok
Passing Tests — Integration (27)
Show all 27 integration tests 27 PASS
  • test_event_producer_publishes_all_event_types
  • test_event_producer_publishes_to_redpanda
  • test_event_producer_uses_tenant_id_as_key
  • test_notification_count
  • test_notification_create_and_get
  • test_notification_create_with_initial_status
  • test_notification_deferred_during_quiet_hours
  • test_notification_list_by_recipient
  • test_notification_list_with_pagination
  • test_notification_mark_read
  • test_notification_not_deferred_outside_quiet_hours
  • test_notification_soft_delete
  • test_notification_update_status
  • test_preference_delete
  • test_preference_get_by_channel
  • test_preference_get_by_user
  • test_preference_soft_delete_restored_by_upsert
  • test_preference_upsert_and_get
  • test_rls_enforced_at_database_level
  • test_rls_tenant_a_cannot_see_tenant_b_notifications
  • test_rls_tenant_a_cannot_see_tenant_b_preferences
  • test_rls_tenant_a_cannot_see_tenant_b_templates
  • test_rls_tenant_a_cannot_soft_delete_tenant_b_notification
  • test_template_create_and_get
  • test_template_soft_delete
  • test_template_unique_name_per_tenant
  • test_template_update