- Fix 55 test failures caused by missing request contexts and incorrect
session_transaction() usage across 8 test files
- Fix ruff import sorting errors and unused imports
- Fix 122 type errors: rename method override parameters to match base
classes, add None guards for fetchone()/datetime, widen dict type
annotations, add type: ignore for SQLAlchemy stub limitations
- Add [tool.ty.rules] config to suppress unsupported-base warnings
- Fix _ variable shadowing gettext in wizard routes
- Add noqa: ARG002 for unused method arguments required by base class
The bug occurred in InvitationManager.ensure_invitation_identity() which was
creating shared identities for all multi-server invitations regardless of type.
This caused different users using the same unlimited invitation code to be
incorrectly linked together in the admin interface, even though they were
completely separate people.
The fix implements proper invitation type checking:
- Limited invitations: Always link users with same code (same person across servers)
- Unlimited invitations: Only link users with same code AND same email (same person)
- Unlimited invitations with different emails remain separate (different people)
This preserves the intended multi-server functionality while preventing the
identity linking bug for unlimited invitations.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Added `ty` version 0.0.1a14 to dependencies in `pyproject.toml`.
- Updated `.pre-commit-config.yaml` to include a pre-push hook for type checking using `ty`.
- Made minor adjustments in various files to ensure compatibility with type checking.