Skip to content

fix(server-activity): ignore writes for deleted users - #374

Merged
Adamskiee merged 1 commit into
developfrom
fix/server-activity-stale-token
Aug 15, 2026
Merged

fix(server-activity): ignore writes for deleted users#374
Adamskiee merged 1 commit into
developfrom
fix/server-activity-stale-token

Conversation

@Adamskiee

Copy link
Copy Markdown
Collaborator

Description

This PR fixes an issue where concurrent user-presence updates could fail with an IntegrityError if the user is deleted while the activity update is being written. The _write_user_activity_sync function now catches and ignores this expected IntegrityError.

Type of change

  • Bug fix
  • New feature
  • Refactor
  • Chore

How Has This Been Tested?

  • Added test_activity_write_ignores_missing_user_foreign_key to test_activity.py which mocks a failing IntegrityError (foreign key constraint) upon session commit and asserts that the write safely ignores it without raising an exception.

Screenshots / GIFs (if applicable)

N/A

Checklist

  • I have linted my code locally prior to submission
  • I have added necessary tests
  • PR is linked to a Issue (if applicable)

@Adamskiee
Adamskiee changed the base branch from main to develop August 15, 2026 12:43
@Adamskiee
Adamskiee merged commit b567ef7 into develop Aug 15, 2026
5 checks passed
Adamskiee added a commit that referenced this pull request Aug 16, 2026
…rict environment config

This release merges the latest changes from `develop` into `main`, bringing in significant enhancements and bug fixes across the server, GSM module, and mobile components.

Key Changes:

GSM & Networking:
- GSM Emulator: Added a new virtual modem development stack for testing without physical hardware (#373).
- GSM Security & Routing: Secured SMS delivery (#362), required verified phone numbers for outgoing SMS (#375), and routed gateway traffic correctly on the Docker network (#372).

Server & Environment:
- Typed Configuration: Introduced strict typed environment configuration (#363), failing fast when GSM_SECRET is unset (#361), and replacing example secrets in configs (#366).
- API & Data Integrity: Hardened error handling logs, made role writes atomic (#377), ignored activity writes for deleted users (#374), and hardened QA route guards (#367).

Mobile:
- Connectivity: Refactored connectivity to remove the background signaling task (#364).
- EAS Debugging: Enabled the debug menu in preview builds (#360).
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