Skip to content

Carry the remaining attempts in the deletion code error - #499

Merged
thomasluizon merged 3 commits into
mainfrom
fix/ticket-337-step-up-copy
Aug 28, 2026
Merged

Carry the remaining attempts in the deletion code error#499
thomasluizon merged 3 commits into
mainfrom
fix/ticket-337-step-up-copy

Conversation

@thomasluizon

Copy link
Copy Markdown
Owner

Pairs with UI ticket #337: https://github.com/thomasluizon/orbit-tickets/issues/337

This changes the deletion wrong-code message to include the remaining attempt count. It also changes exhausted-attempts copy to tell the person to try again in 15 minutes instead of requesting a new code.

No response fields or endpoint shapes change.

@thomasluizon

Copy link
Copy Markdown
Owner Author

Approach:

  1. Change src/Orbit.Application/Common/ErrorMessages.cs so InvalidDeletionCode accepts a remaining-attempt count and TooManyCodeAttempts derives its 15 minute copy from AppConstants.VerificationAttemptWindowMinutes.
  2. Change src/Orbit.Application/Auth/Services/EmailChallengeService.cs so the account-deletion branch formats InvalidDeletionCode with the already computed attemptsRemaining value, matching API key creation.
  3. Update the existing application unit tests that exercise deletion and API key challenges to pin the remaining-attempt and exhausted-attempt messages.

This shape keeps the stable error codes and response contracts intact. I am using the central message catalog instead of endpoint-specific strings, and the named constant instead of a second duration literal, so policy and copy cannot drift.

pullfrog[bot]
pullfrog Bot previously approved these changes Aug 28, 2026

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes I reviewed the setup commit currently on PR #499.

  • Empty setup commit No files or runtime behavior differ from main; the planned error-message and test updates are not present yet and will need an incremental review after they land.

Pullfrog  | View workflow run | Using GPT Sol𝕏

pullfrog[bot]
pullfrog Bot previously approved these changes Aug 28, 2026

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes I reviewed the implementation added since the prior Pullfrog review.

  • Deletion attempt feedback Formatted account-deletion verification failures with the post-failure remaining-attempt count, matching the established API-key challenge behavior.
  • Exhausted-attempt guidance Replaced the shared request-a-new-code fallback with a wait message derived from VerificationAttemptWindowMinutes.
  • Cross-repo alignment Confirmed paired orbit-ui-mobile PR #774 consumes the exact remaining-attempt suffix for deletion and API-key step-up screens.
  • Behavioral coverage Tightened application tests around each deletion attempt and the exhausted copy across all consumers; the solution build and all 5,980 tests passed.

Pullfrog  | View workflow run | Using GPT Sol𝕏

@sonarqubecloud

Copy link
Copy Markdown

@thomasluizon

Copy link
Copy Markdown
Owner Author

@pullfrog review

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes Reviewed the deletion challenge error copy, shared exhausted-attempt guidance, generated architecture refresh, and focused regression coverage against paired UI PR #774.

  • Remaining attempts: Formats the deletion invalid-code error with the server-side count consumed by the web and mobile step-up flow.

  • Exhaustion guidance: Uses the shared 15-minute constant, matching the absolute attempt-cache expiration across deletion, API-key creation, and login verification.

  • Regression coverage: Tightens expectations across deletion, API-key, and auth verification flows. The focused application test run passed all 46 tests.

  • Architecture artifacts: Refreshes the generated application file count after the source change.

Pullfrog  | View workflow run | Using GPT Sol𝕏

@thomasluizon
thomasluizon merged commit 7efdd6c into main Aug 28, 2026
23 checks passed
@thomasluizon
thomasluizon deleted the fix/ticket-337-step-up-copy branch August 28, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant