fix(misc): correctness, concurrency, and test-reliability defects #208
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/pms-200-misc-correctness-concurrency-test-reliability"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Address a cluster of unrelated smaller defects (PMS-200):
#PMS-200
Address a cluster of unrelated smaller defects (PMS-200): - infisical/client.rs: requests now retry once on a 401 (clear token, re-authenticate, replay) via a shared send_with_retry helper, instead of clearing the token and failing without recovery. - mokosh-auth-http router: add Method::PATCH to the CORS allow_methods so preflight to PATCH /v1/admin/feedback/{id} succeeds. - time_tracking stop_timer: short-circuit to the BadRequest when company_id and ticket_id are both None, instead of querying tickets by Uuid::nil() (which never matches). - mokosh-auth-storage op_sessions: add a UNIQUE index on (user_id, user_agent) NULLS NOT DISTINCT and rewrite create() as an atomic upsert, so concurrent first-login can no longer race into two rows (FOR UPDATE under READ COMMITTED could not prevent this). - mokosh-auth-storage user lockout: bind the lock-out window as a native PgInterval instead of concatenating seconds into a string and casting to INTERVAL. - mokosh-types Address::is_empty: include the country field. - pagination PaginatedResponse:🆕 clamp per_page to at least 1 so per_page == 0 no longer yields a degenerate total_pages. - tests/sla_notify.rs: add a first_response at-risk case (previously only resolution_breached was covered). - tests/auth.rs: compute the TOTP enable code immediately before send, with no awaits in the gap, so the 30s step cannot roll past the verify window. - tests/readiness.rs: yield_now() after closing the pool so the close-out is deterministic on loaded CI. - tests/scheduler.rs: pin the two pause()-based tests to the current_thread flavor the harness requires. #PMS-200