Skip to content

[Quality][High] authentication and account recovery: atomic rollback — QE-2026-08 #1645

Description

@Baskarayelu

Objective

make sign-in, refresh, verification, logout, and recovery flows safe across expiry, retries, multiple tabs, and device changes. Specifically, implement and verify atomic rollback so the repository provides a deterministic, reviewable guarantee under normal, invalid, repeated, concurrent, and failure conditions.

Why this matters

The current behavior or coverage needs a production-grade guarantee here: stale tokens and ambiguous recovery state can expose accounts or make legitimate users repeat sensitive actions. Without this work, partial writes or emitted side effects surviving a failed operation could survive review or deployment.

This is a substantive engineering change. It is not a typo fix, formatting-only change, documentation-only change, or trivial dependency update.

Priority

High

Scope

Area: security / UX correctness

Starting points:

  • meridian-api/src/auth/
  • Add or update the closest focused unit, integration, property, or contract test beside the implementation.

Verify the existing implementation before changing it. Keep the change focused on this issue and preserve existing public behavior unless the acceptance criteria require a documented compatibility change.

Acceptance criteria

  • make related writes and externally observable effects atomic or compensating; expose a clear failure result without partial state.
  • Preserve compatible public behavior and make any required migration, error, or response-shape change explicit.
  • Ensure rejected, stale, repeated, and failed operations leave no unauthorized or partial state.
  • Add focused regression coverage that proves the invariant at the actual integration boundary.

Required validation

  • inject failures at each side-effect boundary and verify database, contract state, queues, and events remain consistent.
  • Run formatter, lint, type/build checks, and the complete repository test suite.
  • Run applicable security, contract, migration, gas/resource, or accessibility checks and record commands and results.
  • Confirm generated artifacts, secrets, disabled checks, and unrelated refactors are absent from the change.

Documentation requirements

Document the design and invariants, failure behavior and compatibility impact, migration or rollback considerations, operational limitations, and security assumptions where applicable.

Out of scope

No unrelated refactors, typo or formatting-only changes, docs-only changes, broad dependency upgrades, disabled CI, generated noise, or secrets.

Contributor deliverables

Wait for maintainer assignment. Open a focused branch and reference this issue with Closes #<issue-number> or Fixes #<issue-number>. Check off every criterion, link the implementation and tests, include commands and results, and include a short security/correctness note.

Maintainer quality bar

The PR must change real behavior, address every criterion, include meaningful success and failure-path tests, cover relevant edge cases, remain focused, document compatibility, and provide complete validation evidence. Issue creation does not guarantee reward eligibility; PR quality is evaluated independently.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions