Skip to content

feat(auth2): Add helpers for "one stop" migration - #3747

Merged
tp merged 2 commits into
serverpod:mainfrom
tp:one-stop-migration
Jul 3, 2025
Merged

tp merged 2 commits into
serverpod:mainfrom
tp:one-stop-migration

Conversation

@tp

@tp tp commented Jul 2, 2025 •

Copy link
Copy Markdown
Contributor

Which would likely be the preferred way for many applications who can then migrate with only a few seconds of downtime

The idea is to add a second column for to any entity referring to a legacy UserInfo id to now also refer to an AuthUser id (UUID) (initially configured as optional)
Then update all code to use the auth user ID instead

Later, in a second deploy, the user ID column can be dropped and the AuthUser ID one can become non-optional.

In case (legacy) clients might still send legacy user ID on new object creation, one might be able to use a !persist field for those, and map them to an auth user ID upon receipt.
(Though likely one would also need to return such IDs to the client, which might be a bit trickier, as it would likely affect many more (nested) places.)

Introduces a new LegacyUserIdentifier entity where we can store the "social" user ID (at this point we don't know which system they came from), to be then looked up later upon a (migration enabled) login through that same provider.

Relates to #3450

Summary by CodeRabbit

  • New Features

    • Introduced automated migration tools for transitioning user accounts from a legacy authentication system to the new system, including batch migration and migration during login, registration, and password reset.
    • Added support for tracking legacy user identifiers and migration status.
    • Provided integration tests covering various migration scenarios.
    • Exposed new methods for checking migration status, retrieving new user IDs, and handling authentication across legacy and new systems.
  • Bug Fixes

    • Improved migration logic to ensure users are migrated even if legacy passwords are invalid, with appropriate handling of empty password hashes.
  • Chores

    • Updated and added dependencies for authentication migration modules and test projects.
    • Enhanced test coverage for migration processes.

@coderabbitai

coderabbitai Bot commented Jul 2, 2025 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

📝 Walkthrough

Walkthrough

This change introduces a comprehensive migration framework for transitioning user accounts from a legacy authentication system to a new one within the Serverpod ecosystem. It adds new migration logic, models, endpoint base classes, batch migration utilities, and integration tests, while also updating dependencies and configuration files across related modules and test projects.

Changes

Files/Paths Change Summary
serverpod_auth_migration_server/lib/src/business/auth_migrations.dart,
migrate_user.dart,
migrating_email_endpoint_base.dart
Introduced new migration classes and utilities: AuthMigrations (batch/user migration logic), migrateUserIfNeeded (user migration implementation), and MigratingEmailEndpointBase (endpoint base for automatic migration on email operations).
serverpod_auth_migration_server/lib/src/business/auth_migration_email.dart Refactored email migration logic to delegate user migration externally, renamed/updated migration methods, removed internal hooks/profile import, and added fallback migration without password.
serverpod_auth_migration_server/lib/serverpod_auth_migration_server.dart Added exports for new migration classes and endpoint base.
serverpod_auth_migration_server/lib/src/models/legacy_user_identifier.spy.yaml Added new model LegacyUserIdentifier for storing legacy user IDs linked to new auth users.
serverpod_auth_migration_server/test/integration/auth_migration_email_test.dart Updated tests to use new migration method and updated expectations for migration behavior.
serverpod_auth_migration_server/test/integration/auth_migrations_test.dart Added new integration tests for batch/user migration and legacy user scenarios.
serverpod_auth_migration_server/pubspec.yaml,
.../serverpod_auth_migration_client/pubspec.yaml,
.../serverpod_auth_migration_server/pubspec.yaml,
tests/serverpod_new_auth_test/serverpod_new_auth_test_client/pubspec.yaml,
tests/serverpod_new_auth_test/serverpod_new_auth_test_server/pubspec.yaml,
tests/serverpod_new_auth_test/serverpod_new_auth_test_flutter/pubspec.yaml,
templates/pubspecs/...
Updated dependencies and dependency overrides to include new/updated Serverpod authentication packages and migration modules.
serverpod_auth_migration_server/lib/src/business/auth_migration_email.dart Removed internal user migration/profile import logic; now relies on external migration function.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant MigratingEmailEndpointBase
    participant AuthMigrationEmail
    participant migrateUserIfNeeded
    participant NewAuthSystem
    participant LegacyAuthSystem

    Client->>MigratingEmailEndpointBase: login(email, password)
    MigratingEmailEndpointBase->>AuthMigrationEmail: migrateWithPassword(email, password)
    AuthMigrationEmail->>LegacyAuthSystem: authenticate(email, password)
    alt Legacy auth success
        AuthMigrationEmail->>migrateUserIfNeeded: migrate user data
        migrateUserIfNeeded->>NewAuthSystem: create user, import accounts/identifiers/profiles
        migrateUserIfNeeded->>AuthMigrationEmail: return migration result
    else Legacy auth fails
        AuthMigrationEmail->>migrateUserIfNeeded: migrate without password
        migrateUserIfNeeded->>NewAuthSystem: create user without password
        migrateUserIfNeeded->>AuthMigrationEmail: return migration result
    end
    AuthMigrationEmail->>MigratingEmailEndpointBase: migration complete
    MigratingEmailEndpointBase->>NewAuthSystem: super.login(email, password)
    NewAuthSystem-->>Client: login result
Loading

Possibly related PRs


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@tp
tp force-pushed the one-stop-migration branch 6 times, most recently from 90d1821 to c6ec234 Compare July 2, 2025 14:09
@tp

tp commented Jul 2, 2025

Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jul 2, 2025

Copy link
Copy Markdown
Contributor
✅ Actions performed

Full review triggered.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 6

♻️ Duplicate comments (1)
templates/pubspecs/tests/serverpod_new_auth_test/serverpod_new_auth_test_server/pubspec.yaml (1)

14-14: Same coherence checks as non-template file

Same comments as above apply to the template – keep the override paths & placeholder versions in sync.

Also applies to: 32-33, 36-37

🧹 Nitpick comments (4)
templates/pubspecs/tests/serverpod_new_auth_test/serverpod_new_auth_test_client/pubspec.yaml (2)

13-13: Client is missing an explicit dependency on serverpod_auth_user_client

Code that directly imports AuthUser models will compile only if the package is pulled in transitively.
Declare it explicitly to avoid accidental breakage when dependency graphs change.

 dependencies:
   serverpod_client: SERVERPOD_VERSION
   serverpod_auth_migration_client: SERVERPOD_VERSION
+  serverpod_auth_user_client: SERVERPOD_VERSION

20-23: Unreferenced override may be brittle.

serverpod_auth_user_client is overridden but not listed in dependencies:.
If the package stops being a transitive dependency of serverpod_auth_migration_client, this override will be ignored and silently drift. Consider declaring it explicitly to make the relationship obvious and future-proof:

 dependencies:
   serverpod_client: SERVERPOD_VERSION
   serverpod_auth_migration_client: SERVERPOD_VERSION
+  serverpod_auth_user_client: SERVERPOD_VERSION
modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart (1)

15-19: Consider error handling for migration failures

Migration errors will propagate to the client, potentially exposing internal details. Consider catching and logging migration errors while allowing the authentication flow to continue.

For production deployments, consider:

  1. Wrapping migration calls in try-catch blocks to log errors without disrupting authentication
  2. Implementing rate limiting or caching to avoid repeated migration attempts for the same user
  3. Adding metrics/monitoring for migration success rates

Also applies to: 30-34, 44-44

modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/auth_migrations.dart (1)

77-116: Consider using ORM instead of raw SQL

The batch migration uses raw SQL which could be replaced with the ORM for better type safety and maintainability.

Consider using the ORM to find unmigrated users:

// Find user IDs that haven't been migrated
final migratedUserIds = await MigratedUser.db.find(
  session,
  transaction: transaction,
).then((rows) => rows.map((r) => r.oldUserId).toSet());

final unmigrated = await legacy_auth.UserInfo.db.find(
  session,
  where: (t) => t.id.notInSet(migratedUserIds),
  limit: maxUsers,
  transaction: transaction,
);

for (final userInfo in unmigrated) {
  await migrateUserIfNeeded(
    session,
    userInfo,
    transaction: transaction,
  );
}

return unmigrated.length;
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 41cee63 and c6ec234.

⛔ Files ignored due to path filters (20)
  • modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/lib/src/protocol/protocol.dart is excluded by !**/lib/src/protocol/**
  • modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/generated/endpoints.dart is excluded by !**/generated/**
  • modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/generated/legacy_user_identifier.dart is excluded by !**/generated/**
  • modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/generated/protocol.dart is excluded by !**/generated/**
  • modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/migrations/20250702121757983/definition.json is excluded by !**/migrations/**
  • modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/migrations/20250702121757983/definition.sql is excluded by !**/migrations/**
  • modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/migrations/20250702121757983/definition_project.json is excluded by !**/migrations/**
  • modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/migrations/20250702121757983/migration.json is excluded by !**/migrations/**
  • modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/migrations/20250702121757983/migration.sql is excluded by !**/migrations/**
  • modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/migrations/migration_registry.txt is excluded by !**/migrations/**
  • tests/serverpod_new_auth_test/serverpod_new_auth_test_client/lib/src/protocol/client.dart is excluded by !**/lib/src/protocol/**
  • tests/serverpod_new_auth_test/serverpod_new_auth_test_client/lib/src/protocol/protocol.dart is excluded by !**/lib/src/protocol/**
  • tests/serverpod_new_auth_test/serverpod_new_auth_test_server/lib/src/generated/endpoints.dart is excluded by !**/generated/**
  • tests/serverpod_new_auth_test/serverpod_new_auth_test_server/lib/src/generated/protocol.dart is excluded by !**/generated/**
  • tests/serverpod_new_auth_test/serverpod_new_auth_test_server/migrations/20250702121844487/definition.json is excluded by !**/migrations/**
  • tests/serverpod_new_auth_test/serverpod_new_auth_test_server/migrations/20250702121844487/definition.sql is excluded by !**/migrations/**
  • tests/serverpod_new_auth_test/serverpod_new_auth_test_server/migrations/20250702121844487/definition_project.json is excluded by !**/migrations/**
  • tests/serverpod_new_auth_test/serverpod_new_auth_test_server/migrations/20250702121844487/migration.json is excluded by !**/migrations/**
  • tests/serverpod_new_auth_test/serverpod_new_auth_test_server/migrations/20250702121844487/migration.sql is excluded by !**/migrations/**
  • tests/serverpod_new_auth_test/serverpod_new_auth_test_server/migrations/migration_registry.txt is excluded by !**/migrations/**
📒 Files selected for processing (17)
  • modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/pubspec.yaml (1 hunks)
  • modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/serverpod_auth_migration_server.dart (1 hunks)
  • modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/auth_migration_email.dart (5 hunks)
  • modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/auth_migrations.dart (1 hunks)
  • modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrate_user.dart (1 hunks)
  • modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart (1 hunks)
  • modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/models/legacy_user_identifier.spy.yaml (1 hunks)
  • modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/pubspec.yaml (2 hunks)
  • modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/test/integration/auth_migration_email_test.dart (26 hunks)
  • modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/test/integration/auth_migrations_test.dart (1 hunks)
  • templates/pubspecs/modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/pubspec.yaml (1 hunks)
  • templates/pubspecs/modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/pubspec.yaml (2 hunks)
  • templates/pubspecs/tests/serverpod_new_auth_test/serverpod_new_auth_test_client/pubspec.yaml (1 hunks)
  • templates/pubspecs/tests/serverpod_new_auth_test/serverpod_new_auth_test_server/pubspec.yaml (2 hunks)
  • tests/serverpod_new_auth_test/serverpod_new_auth_test_client/pubspec.yaml (1 hunks)
  • tests/serverpod_new_auth_test/serverpod_new_auth_test_flutter/pubspec.yaml (1 hunks)
  • tests/serverpod_new_auth_test/serverpod_new_auth_test_server/pubspec.yaml (2 hunks)
🧰 Additional context used
🧠 Learnings (18)
📓 Common learnings
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/README.md:3-8
Timestamp: 2025-06-17T11:34:13.289Z
Learning: The README.md files in the serverpod_auth_migration module directories are auto-generated and get overwritten by utility scripts, so manual updates should be avoided until proper documentation is added during feature rollout.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
Learnt from: tp
PR: serverpod/serverpod#3651
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/test/integration/email_account_endpoint_test.dart:1-1
Timestamp: 2025-06-19T11:00:17.085Z
Learning: In Serverpod applications, methods that rely on public asset storage (like setUserImage/removeUserImage) should be tested in E2E tests rather than withServerpod integration tests, as they require a full server environment with asset storage infrastructure to properly test image upload/download functionality.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/auth_migration_email.dart:0-0
Timestamp: 2025-06-17T13:04:19.522Z
Learning: In serverpod_auth_migration profile image migration, the image must be fetched from the URL rather than just copying the URL because the database schema requires storing the storage bucket and relative path information in addition to the public URL. This storage information is necessary for proper cleanup when profiles are deleted. The fetch approach works fine in production but requires localhost exclusion in testing environments where no HTTP file server is running.
modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/pubspec.yaml (9)
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/README.md:3-8
Timestamp: 2025-06-17T11:34:13.289Z
Learning: The README.md files in the serverpod_auth_migration module directories are auto-generated and get overwritten by utility scripts, so manual updates should be avoided until proper documentation is added during feature rollout.
Learnt from: tp
PR: serverpod/serverpod#3721
File: modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/test/serverpod_auth_session_flutter_test.dart:1-7
Timestamp: 2025-06-27T07:44:09.048Z
Learning: In Serverpod packages, the `uuid` package is re-exported through a chain: `serverpod_auth_session_client` re-exports `serverpod_client`, which re-exports `serverpod_serialization`, which re-exports `uuid`. This means `Uuid` class is available in files that import `serverpod_auth_session_client` without needing a direct `uuid` package import.
Learnt from: exaby73
PR: serverpod/serverpod#3741
File: modules/serverpod_auth/serverpod_auth_server/analysis_options.yaml:14-16
Timestamp: 2025-07-01T13:01:27.005Z
Learning: In Serverpod, first-party packages like serverpod_auth_server can appropriately use blanket `invalid_use_of_internal_member: ignore` directives in their analysis_options.yaml since they use internal Database methods internally without exposing them in their public APIs to end users.
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: The util/update_pubspecs script automatically copies the root CHANGELOG.md to all packages/modules and README_subpackage.md to all modules as README.md. These file changes should be ignored during code review as they are auto-generated distribution of shared content, not manual authoring that requires review.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: Changes to README.md and CHANGELOG.md files made by the util/update_pubspecs script can be safely ignored during code review, as these files are auto-generated by copying from a single source rather than being manually authored.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/config/passwords.yaml:12-15
Timestamp: 2025-06-17T13:07:46.465Z
Learning: Configuration keys in Serverpod that contain dots (like `serverpod_auth_email_account.passwordHashPepper`) need to be renamed to use underscores or other valid characters because the system needs to support overriding configuration keys and passwords via environment variables, and BASH environment variable names cannot contain dots.
Learnt from: tp
PR: serverpod/serverpod#3651
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/test/integration/email_account_endpoint_test.dart:1-1
Timestamp: 2025-06-19T11:00:17.085Z
Learning: In Serverpod applications, methods that rely on public asset storage (like setUserImage/removeUserImage) should be tested in E2E tests rather than withServerpod integration tests, as they require a full server environment with asset storage infrastructure to properly test image upload/download functionality.
tests/serverpod_new_auth_test/serverpod_new_auth_test_flutter/pubspec.yaml (11)
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
Learnt from: exaby73
PR: serverpod/serverpod#3741
File: modules/serverpod_auth/serverpod_auth_server/analysis_options.yaml:14-16
Timestamp: 2025-07-01T13:01:27.005Z
Learning: In Serverpod, first-party packages like serverpod_auth_server can appropriately use blanket `invalid_use_of_internal_member: ignore` directives in their analysis_options.yaml since they use internal Database methods internally without exposing them in their public APIs to end users.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: Changes to README.md and CHANGELOG.md files made by the util/update_pubspecs script can be safely ignored during code review, as these files are auto-generated by copying from a single source rather than being manually authored.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/README.md:3-8
Timestamp: 2025-06-17T11:34:13.289Z
Learning: The README.md files in the serverpod_auth_migration module directories are auto-generated and get overwritten by utility scripts, so manual updates should be avoided until proper documentation is added during feature rollout.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: The util/update_pubspecs script automatically copies the root CHANGELOG.md to all packages/modules and README_subpackage.md to all modules as README.md. These file changes should be ignored during code review as they are auto-generated distribution of shared content, not manual authoring that requires review.
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
Learnt from: tp
PR: serverpod/serverpod#3651
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/test/integration/email_account_endpoint_test.dart:1-1
Timestamp: 2025-06-19T11:00:17.085Z
Learning: In Serverpod applications, methods that rely on public asset storage (like setUserImage/removeUserImage) should be tested in E2E tests rather than withServerpod integration tests, as they require a full server environment with asset storage infrastructure to properly test image upload/download functionality.
Learnt from: tp
PR: serverpod/serverpod#3651
File: modules/new_serverpod_auth/serverpod_auth_email_account/serverpod_auth_email_account_server/lib/src/business/email_accounts.dart:35-39
Timestamp: 2025-06-16T12:07:26.018Z
Learning: The `withServerpod` test helper runs tests within a transaction, which may require adapting database queries to accept transaction parameters for proper snapshot consistency during testing.
Learnt from: tp
PR: serverpod/serverpod#3721
File: modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/test/serverpod_auth_session_flutter_test.dart:1-7
Timestamp: 2025-06-27T07:44:09.048Z
Learning: In Serverpod packages, the `uuid` package is re-exported through a chain: `serverpod_auth_session_client` re-exports `serverpod_client`, which re-exports `serverpod_serialization`, which re-exports `uuid`. This means `Uuid` class is available in files that import `serverpod_auth_session_client` without needing a direct `uuid` package import.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/config/passwords.yaml:12-15
Timestamp: 2025-06-17T13:07:46.465Z
Learning: Configuration keys in Serverpod that contain dots (like `serverpod_auth_email_account.passwordHashPepper`) need to be renamed to use underscores or other valid characters because the system needs to support overriding configuration keys and passwords via environment variables, and BASH environment variable names cannot contain dots.
tests/serverpod_new_auth_test/serverpod_new_auth_test_server/pubspec.yaml (13)
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
Learnt from: exaby73
PR: serverpod/serverpod#3741
File: modules/serverpod_auth/serverpod_auth_server/analysis_options.yaml:14-16
Timestamp: 2025-07-01T13:01:27.005Z
Learning: In Serverpod, first-party packages like serverpod_auth_server can appropriately use blanket `invalid_use_of_internal_member: ignore` directives in their analysis_options.yaml since they use internal Database methods internally without exposing them in their public APIs to end users.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/README.md:3-8
Timestamp: 2025-06-17T11:34:13.289Z
Learning: The README.md files in the serverpod_auth_migration module directories are auto-generated and get overwritten by utility scripts, so manual updates should be avoided until proper documentation is added during feature rollout.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: The util/update_pubspecs script automatically copies the root CHANGELOG.md to all packages/modules and README_subpackage.md to all modules as README.md. These file changes should be ignored during code review as they are auto-generated distribution of shared content, not manual authoring that requires review.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: Changes to README.md and CHANGELOG.md files made by the util/update_pubspecs script can be safely ignored during code review, as these files are auto-generated by copying from a single source rather than being manually authored.
Learnt from: tp
PR: serverpod/serverpod#3651
File: modules/new_serverpod_auth/serverpod_auth_email_account/serverpod_auth_email_account_server/lib/src/business/email_accounts.dart:35-39
Timestamp: 2025-06-16T12:07:26.018Z
Learning: The `withServerpod` test helper runs tests within a transaction, which may require adapting database queries to accept transaction parameters for proper snapshot consistency during testing.
Learnt from: tp
PR: serverpod/serverpod#3721
File: modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/test/serverpod_auth_session_flutter_test.dart:1-7
Timestamp: 2025-06-27T07:44:09.048Z
Learning: In Serverpod packages, the `uuid` package is re-exported through a chain: `serverpod_auth_session_client` re-exports `serverpod_client`, which re-exports `serverpod_serialization`, which re-exports `uuid`. This means `Uuid` class is available in files that import `serverpod_auth_session_client` without needing a direct `uuid` package import.
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/config/passwords.yaml:12-15
Timestamp: 2025-06-17T13:07:46.465Z
Learning: Configuration keys in Serverpod that contain dots (like `serverpod_auth_email_account.passwordHashPepper`) need to be renamed to use underscores or other valid characters because the system needs to support overriding configuration keys and passwords via environment variables, and BASH environment variable names cannot contain dots.
Learnt from: tp
PR: serverpod/serverpod#3651
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/test/integration/email_account_endpoint_test.dart:1-1
Timestamp: 2025-06-19T11:00:17.085Z
Learning: In Serverpod applications, methods that rely on public asset storage (like setUserImage/removeUserImage) should be tested in E2E tests rather than withServerpod integration tests, as they require a full server environment with asset storage infrastructure to properly test image upload/download functionality.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/auth_migration_email.dart:0-0
Timestamp: 2025-06-17T13:04:19.522Z
Learning: In serverpod_auth_migration profile image migration, the image must be fetched from the URL rather than just copying the URL because the database schema requires storing the storage bucket and relative path information in addition to the public URL. This storage information is necessary for proper cleanup when profiles are deleted. The fetch approach works fine in production but requires localhost exclusion in testing environments where no HTTP file server is running.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_email_account/serverpod_auth_email_account_server/lib/src/business/email_accounts_admin.dart:130-143
Timestamp: 2025-06-17T11:38:13.087Z
Learning: In serverpod_auth_email_account EmailAccountsAdmin, tp prefers relying on database unique constraint exceptions over application-level pre-insert checks for email uniqueness, especially in contexts with longer-running transactions where TOCTOU issues could still occur.
templates/pubspecs/modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/pubspec.yaml (10)
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/README.md:3-8
Timestamp: 2025-06-17T11:34:13.289Z
Learning: The README.md files in the serverpod_auth_migration module directories are auto-generated and get overwritten by utility scripts, so manual updates should be avoided until proper documentation is added during feature rollout.
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
Learnt from: exaby73
PR: serverpod/serverpod#3741
File: modules/serverpod_auth/serverpod_auth_server/analysis_options.yaml:14-16
Timestamp: 2025-07-01T13:01:27.005Z
Learning: In Serverpod, first-party packages like serverpod_auth_server can appropriately use blanket `invalid_use_of_internal_member: ignore` directives in their analysis_options.yaml since they use internal Database methods internally without exposing them in their public APIs to end users.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: The util/update_pubspecs script automatically copies the root CHANGELOG.md to all packages/modules and README_subpackage.md to all modules as README.md. These file changes should be ignored during code review as they are auto-generated distribution of shared content, not manual authoring that requires review.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: Changes to README.md and CHANGELOG.md files made by the util/update_pubspecs script can be safely ignored during code review, as these files are auto-generated by copying from a single source rather than being manually authored.
Learnt from: tp
PR: serverpod/serverpod#3721
File: modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/test/serverpod_auth_session_flutter_test.dart:1-7
Timestamp: 2025-06-27T07:44:09.048Z
Learning: In Serverpod packages, the `uuid` package is re-exported through a chain: `serverpod_auth_session_client` re-exports `serverpod_client`, which re-exports `serverpod_serialization`, which re-exports `uuid`. This means `Uuid` class is available in files that import `serverpod_auth_session_client` without needing a direct `uuid` package import.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/config/passwords.yaml:12-15
Timestamp: 2025-06-17T13:07:46.465Z
Learning: Configuration keys in Serverpod that contain dots (like `serverpod_auth_email_account.passwordHashPepper`) need to be renamed to use underscores or other valid characters because the system needs to support overriding configuration keys and passwords via environment variables, and BASH environment variable names cannot contain dots.
Learnt from: tp
PR: serverpod/serverpod#3651
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/test/integration/email_account_endpoint_test.dart:1-1
Timestamp: 2025-06-19T11:00:17.085Z
Learning: In Serverpod applications, methods that rely on public asset storage (like setUserImage/removeUserImage) should be tested in E2E tests rather than withServerpod integration tests, as they require a full server environment with asset storage infrastructure to properly test image upload/download functionality.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_email_account/serverpod_auth_email_account_server/lib/src/business/email_accounts_admin.dart:130-143
Timestamp: 2025-06-17T11:38:13.087Z
Learning: In serverpod_auth_email_account EmailAccountsAdmin, tp prefers relying on database unique constraint exceptions over application-level pre-insert checks for email uniqueness, especially in contexts with longer-running transactions where TOCTOU issues could still occur.
templates/pubspecs/modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/pubspec.yaml (8)
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/README.md:3-8
Timestamp: 2025-06-17T11:34:13.289Z
Learning: The README.md files in the serverpod_auth_migration module directories are auto-generated and get overwritten by utility scripts, so manual updates should be avoided until proper documentation is added during feature rollout.
Learnt from: tp
PR: serverpod/serverpod#3721
File: modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/test/serverpod_auth_session_flutter_test.dart:1-7
Timestamp: 2025-06-27T07:44:09.048Z
Learning: In Serverpod packages, the `uuid` package is re-exported through a chain: `serverpod_auth_session_client` re-exports `serverpod_client`, which re-exports `serverpod_serialization`, which re-exports `uuid`. This means `Uuid` class is available in files that import `serverpod_auth_session_client` without needing a direct `uuid` package import.
Learnt from: exaby73
PR: serverpod/serverpod#3741
File: modules/serverpod_auth/serverpod_auth_server/analysis_options.yaml:14-16
Timestamp: 2025-07-01T13:01:27.005Z
Learning: In Serverpod, first-party packages like serverpod_auth_server can appropriately use blanket `invalid_use_of_internal_member: ignore` directives in their analysis_options.yaml since they use internal Database methods internally without exposing them in their public APIs to end users.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: The util/update_pubspecs script automatically copies the root CHANGELOG.md to all packages/modules and README_subpackage.md to all modules as README.md. These file changes should be ignored during code review as they are auto-generated distribution of shared content, not manual authoring that requires review.
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/config/passwords.yaml:12-15
Timestamp: 2025-06-17T13:07:46.465Z
Learning: Configuration keys in Serverpod that contain dots (like `serverpod_auth_email_account.passwordHashPepper`) need to be renamed to use underscores or other valid characters because the system needs to support overriding configuration keys and passwords via environment variables, and BASH environment variable names cannot contain dots.
Learnt from: tp
PR: serverpod/serverpod#3651
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/test/integration/email_account_endpoint_test.dart:1-1
Timestamp: 2025-06-19T11:00:17.085Z
Learning: In Serverpod applications, methods that rely on public asset storage (like setUserImage/removeUserImage) should be tested in E2E tests rather than withServerpod integration tests, as they require a full server environment with asset storage infrastructure to properly test image upload/download functionality.
templates/pubspecs/tests/serverpod_new_auth_test/serverpod_new_auth_test_client/pubspec.yaml (11)
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/README.md:3-8
Timestamp: 2025-06-17T11:34:13.289Z
Learning: The README.md files in the serverpod_auth_migration module directories are auto-generated and get overwritten by utility scripts, so manual updates should be avoided until proper documentation is added during feature rollout.
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
Learnt from: exaby73
PR: serverpod/serverpod#3741
File: modules/serverpod_auth/serverpod_auth_server/analysis_options.yaml:14-16
Timestamp: 2025-07-01T13:01:27.005Z
Learning: In Serverpod, first-party packages like serverpod_auth_server can appropriately use blanket `invalid_use_of_internal_member: ignore` directives in their analysis_options.yaml since they use internal Database methods internally without exposing them in their public APIs to end users.
Learnt from: tp
PR: serverpod/serverpod#3721
File: modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/test/serverpod_auth_session_flutter_test.dart:1-7
Timestamp: 2025-06-27T07:44:09.048Z
Learning: In Serverpod packages, the `uuid` package is re-exported through a chain: `serverpod_auth_session_client` re-exports `serverpod_client`, which re-exports `serverpod_serialization`, which re-exports `uuid`. This means `Uuid` class is available in files that import `serverpod_auth_session_client` without needing a direct `uuid` package import.
Learnt from: tp
PR: serverpod/serverpod#3651
File: modules/new_serverpod_auth/serverpod_auth_email_account/serverpod_auth_email_account_server/lib/src/business/email_accounts.dart:35-39
Timestamp: 2025-06-16T12:07:26.018Z
Learning: The `withServerpod` test helper runs tests within a transaction, which may require adapting database queries to accept transaction parameters for proper snapshot consistency during testing.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: The util/update_pubspecs script automatically copies the root CHANGELOG.md to all packages/modules and README_subpackage.md to all modules as README.md. These file changes should be ignored during code review as they are auto-generated distribution of shared content, not manual authoring that requires review.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: Changes to README.md and CHANGELOG.md files made by the util/update_pubspecs script can be safely ignored during code review, as these files are auto-generated by copying from a single source rather than being manually authored.
Learnt from: tp
PR: serverpod/serverpod#3651
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/test/integration/email_account_endpoint_test.dart:1-1
Timestamp: 2025-06-19T11:00:17.085Z
Learning: In Serverpod applications, methods that rely on public asset storage (like setUserImage/removeUserImage) should be tested in E2E tests rather than withServerpod integration tests, as they require a full server environment with asset storage infrastructure to properly test image upload/download functionality.
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/config/passwords.yaml:12-15
Timestamp: 2025-06-17T13:07:46.465Z
Learning: Configuration keys in Serverpod that contain dots (like `serverpod_auth_email_account.passwordHashPepper`) need to be renamed to use underscores or other valid characters because the system needs to support overriding configuration keys and passwords via environment variables, and BASH environment variable names cannot contain dots.
templates/pubspecs/tests/serverpod_new_auth_test/serverpod_new_auth_test_server/pubspec.yaml (13)
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
Learnt from: exaby73
PR: serverpod/serverpod#3741
File: modules/serverpod_auth/serverpod_auth_server/analysis_options.yaml:14-16
Timestamp: 2025-07-01T13:01:27.005Z
Learning: In Serverpod, first-party packages like serverpod_auth_server can appropriately use blanket `invalid_use_of_internal_member: ignore` directives in their analysis_options.yaml since they use internal Database methods internally without exposing them in their public APIs to end users.
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/README.md:3-8
Timestamp: 2025-06-17T11:34:13.289Z
Learning: The README.md files in the serverpod_auth_migration module directories are auto-generated and get overwritten by utility scripts, so manual updates should be avoided until proper documentation is added during feature rollout.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: The util/update_pubspecs script automatically copies the root CHANGELOG.md to all packages/modules and README_subpackage.md to all modules as README.md. These file changes should be ignored during code review as they are auto-generated distribution of shared content, not manual authoring that requires review.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: Changes to README.md and CHANGELOG.md files made by the util/update_pubspecs script can be safely ignored during code review, as these files are auto-generated by copying from a single source rather than being manually authored.
Learnt from: tp
PR: serverpod/serverpod#3721
File: modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/test/serverpod_auth_session_flutter_test.dart:1-7
Timestamp: 2025-06-27T07:44:09.048Z
Learning: In Serverpod packages, the `uuid` package is re-exported through a chain: `serverpod_auth_session_client` re-exports `serverpod_client`, which re-exports `serverpod_serialization`, which re-exports `uuid`. This means `Uuid` class is available in files that import `serverpod_auth_session_client` without needing a direct `uuid` package import.
Learnt from: tp
PR: serverpod/serverpod#3651
File: modules/new_serverpod_auth/serverpod_auth_email_account/serverpod_auth_email_account_server/lib/src/business/email_accounts.dart:35-39
Timestamp: 2025-06-16T12:07:26.018Z
Learning: The `withServerpod` test helper runs tests within a transaction, which may require adapting database queries to accept transaction parameters for proper snapshot consistency during testing.
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
Learnt from: tp
PR: serverpod/serverpod#3651
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/test/integration/email_account_endpoint_test.dart:1-1
Timestamp: 2025-06-19T11:00:17.085Z
Learning: In Serverpod applications, methods that rely on public asset storage (like setUserImage/removeUserImage) should be tested in E2E tests rather than withServerpod integration tests, as they require a full server environment with asset storage infrastructure to properly test image upload/download functionality.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/config/passwords.yaml:12-15
Timestamp: 2025-06-17T13:07:46.465Z
Learning: Configuration keys in Serverpod that contain dots (like `serverpod_auth_email_account.passwordHashPepper`) need to be renamed to use underscores or other valid characters because the system needs to support overriding configuration keys and passwords via environment variables, and BASH environment variable names cannot contain dots.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/auth_migration_email.dart:0-0
Timestamp: 2025-06-17T13:04:19.522Z
Learning: In serverpod_auth_migration profile image migration, the image must be fetched from the URL rather than just copying the URL because the database schema requires storing the storage bucket and relative path information in addition to the public URL. This storage information is necessary for proper cleanup when profiles are deleted. The fetch approach works fine in production but requires localhost exclusion in testing environments where no HTTP file server is running.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_email_account/serverpod_auth_email_account_server/lib/src/business/email_accounts_admin.dart:130-143
Timestamp: 2025-06-17T11:38:13.087Z
Learning: In serverpod_auth_email_account EmailAccountsAdmin, tp prefers relying on database unique constraint exceptions over application-level pre-insert checks for email uniqueness, especially in contexts with longer-running transactions where TOCTOU issues could still occur.
modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/models/legacy_user_identifier.spy.yaml (3)
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/README.md:3-8
Timestamp: 2025-06-17T11:34:13.289Z
Learning: The README.md files in the serverpod_auth_migration module directories are auto-generated and get overwritten by utility scripts, so manual updates should be avoided until proper documentation is added during feature rollout.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
Learnt from: exaby73
PR: serverpod/serverpod#3741
File: modules/serverpod_auth/serverpod_auth_server/analysis_options.yaml:14-16
Timestamp: 2025-07-01T13:01:27.005Z
Learning: In Serverpod, first-party packages like serverpod_auth_server can appropriately use blanket `invalid_use_of_internal_member: ignore` directives in their analysis_options.yaml since they use internal Database methods internally without exposing them in their public APIs to end users.
modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/pubspec.yaml (10)
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/README.md:3-8
Timestamp: 2025-06-17T11:34:13.289Z
Learning: The README.md files in the serverpod_auth_migration module directories are auto-generated and get overwritten by utility scripts, so manual updates should be avoided until proper documentation is added during feature rollout.
Learnt from: exaby73
PR: serverpod/serverpod#3741
File: modules/serverpod_auth/serverpod_auth_server/analysis_options.yaml:14-16
Timestamp: 2025-07-01T13:01:27.005Z
Learning: In Serverpod, first-party packages like serverpod_auth_server can appropriately use blanket `invalid_use_of_internal_member: ignore` directives in their analysis_options.yaml since they use internal Database methods internally without exposing them in their public APIs to end users.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: The util/update_pubspecs script automatically copies the root CHANGELOG.md to all packages/modules and README_subpackage.md to all modules as README.md. These file changes should be ignored during code review as they are auto-generated distribution of shared content, not manual authoring that requires review.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: Changes to README.md and CHANGELOG.md files made by the util/update_pubspecs script can be safely ignored during code review, as these files are auto-generated by copying from a single source rather than being manually authored.
Learnt from: tp
PR: serverpod/serverpod#3721
File: modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/test/serverpod_auth_session_flutter_test.dart:1-7
Timestamp: 2025-06-27T07:44:09.048Z
Learning: In Serverpod packages, the `uuid` package is re-exported through a chain: `serverpod_auth_session_client` re-exports `serverpod_client`, which re-exports `serverpod_serialization`, which re-exports `uuid`. This means `Uuid` class is available in files that import `serverpod_auth_session_client` without needing a direct `uuid` package import.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/config/passwords.yaml:12-15
Timestamp: 2025-06-17T13:07:46.465Z
Learning: Configuration keys in Serverpod that contain dots (like `serverpod_auth_email_account.passwordHashPepper`) need to be renamed to use underscores or other valid characters because the system needs to support overriding configuration keys and passwords via environment variables, and BASH environment variable names cannot contain dots.
Learnt from: tp
PR: serverpod/serverpod#3651
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/test/integration/email_account_endpoint_test.dart:1-1
Timestamp: 2025-06-19T11:00:17.085Z
Learning: In Serverpod applications, methods that rely on public asset storage (like setUserImage/removeUserImage) should be tested in E2E tests rather than withServerpod integration tests, as they require a full server environment with asset storage infrastructure to properly test image upload/download functionality.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_email_account/serverpod_auth_email_account_server/lib/src/business/email_accounts_admin.dart:130-143
Timestamp: 2025-06-17T11:38:13.087Z
Learning: In serverpod_auth_email_account EmailAccountsAdmin, tp prefers relying on database unique constraint exceptions over application-level pre-insert checks for email uniqueness, especially in contexts with longer-running transactions where TOCTOU issues could still occur.
modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/test/integration/auth_migrations_test.dart (7)
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
Learnt from: tp
PR: serverpod/serverpod#3651
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/test/integration/email_account_endpoint_test.dart:1-1
Timestamp: 2025-06-19T11:00:17.085Z
Learning: In Serverpod applications, methods that rely on public asset storage (like setUserImage/removeUserImage) should be tested in E2E tests rather than withServerpod integration tests, as they require a full server environment with asset storage infrastructure to properly test image upload/download functionality.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/README.md:3-8
Timestamp: 2025-06-17T11:34:13.289Z
Learning: The README.md files in the serverpod_auth_migration module directories are auto-generated and get overwritten by utility scripts, so manual updates should be avoided until proper documentation is added during feature rollout.
Learnt from: tp
PR: serverpod/serverpod#3651
File: modules/new_serverpod_auth/serverpod_auth_email_account/serverpod_auth_email_account_server/lib/src/business/email_accounts.dart:35-39
Timestamp: 2025-06-16T12:07:26.018Z
Learning: The `withServerpod` test helper runs tests within a transaction, which may require adapting database queries to accept transaction parameters for proper snapshot consistency during testing.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/auth_migration_email.dart:0-0
Timestamp: 2025-06-17T13:04:19.522Z
Learning: In serverpod_auth_migration profile image migration, the image must be fetched from the URL rather than just copying the URL because the database schema requires storing the storage bucket and relative path information in addition to the public URL. This storage information is necessary for proper cleanup when profiles are deleted. The fetch approach works fine in production but requires localhost exclusion in testing environments where no HTTP file server is running.
Learnt from: tp
PR: serverpod/serverpod#3651
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/test/integration/email_account_endpoint_test.dart:1-1
Timestamp: 2025-06-19T10:25:15.101Z
Learning: Explicit tests for complex endpoint methods provide cleaner error reporting and better debugging experience compared to testing the same functionality only within setUp blocks or helper methods.
tests/serverpod_new_auth_test/serverpod_new_auth_test_client/pubspec.yaml (11)
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/README.md:3-8
Timestamp: 2025-06-17T11:34:13.289Z
Learning: The README.md files in the serverpod_auth_migration module directories are auto-generated and get overwritten by utility scripts, so manual updates should be avoided until proper documentation is added during feature rollout.
Learnt from: exaby73
PR: serverpod/serverpod#3741
File: modules/serverpod_auth/serverpod_auth_server/analysis_options.yaml:14-16
Timestamp: 2025-07-01T13:01:27.005Z
Learning: In Serverpod, first-party packages like serverpod_auth_server can appropriately use blanket `invalid_use_of_internal_member: ignore` directives in their analysis_options.yaml since they use internal Database methods internally without exposing them in their public APIs to end users.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: The util/update_pubspecs script automatically copies the root CHANGELOG.md to all packages/modules and README_subpackage.md to all modules as README.md. These file changes should be ignored during code review as they are auto-generated distribution of shared content, not manual authoring that requires review.
Learnt from: tp
PR: serverpod/serverpod#3721
File: modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/test/serverpod_auth_session_flutter_test.dart:1-7
Timestamp: 2025-06-27T07:44:09.048Z
Learning: In Serverpod packages, the `uuid` package is re-exported through a chain: `serverpod_auth_session_client` re-exports `serverpod_client`, which re-exports `serverpod_serialization`, which re-exports `uuid`. This means `Uuid` class is available in files that import `serverpod_auth_session_client` without needing a direct `uuid` package import.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: Changes to README.md and CHANGELOG.md files made by the util/update_pubspecs script can be safely ignored during code review, as these files are auto-generated by copying from a single source rather than being manually authored.
Learnt from: tp
PR: serverpod/serverpod#3651
File: modules/new_serverpod_auth/serverpod_auth_email_account/serverpod_auth_email_account_server/lib/src/business/email_accounts.dart:35-39
Timestamp: 2025-06-16T12:07:26.018Z
Learning: The `withServerpod` test helper runs tests within a transaction, which may require adapting database queries to accept transaction parameters for proper snapshot consistency during testing.
Learnt from: tp
PR: serverpod/serverpod#3651
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/test/integration/email_account_endpoint_test.dart:1-1
Timestamp: 2025-06-19T11:00:17.085Z
Learning: In Serverpod applications, methods that rely on public asset storage (like setUserImage/removeUserImage) should be tested in E2E tests rather than withServerpod integration tests, as they require a full server environment with asset storage infrastructure to properly test image upload/download functionality.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/config/passwords.yaml:12-15
Timestamp: 2025-06-17T13:07:46.465Z
Learning: Configuration keys in Serverpod that contain dots (like `serverpod_auth_email_account.passwordHashPepper`) need to be renamed to use underscores or other valid characters because the system needs to support overriding configuration keys and passwords via environment variables, and BASH environment variable names cannot contain dots.
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/test/integration/auth_migration_email_test.dart (12)
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
Learnt from: tp
PR: serverpod/serverpod#3651
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/test/integration/email_account_endpoint_test.dart:1-1
Timestamp: 2025-06-19T11:00:17.085Z
Learning: In Serverpod applications, methods that rely on public asset storage (like setUserImage/removeUserImage) should be tested in E2E tests rather than withServerpod integration tests, as they require a full server environment with asset storage infrastructure to properly test image upload/download functionality.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/README.md:3-8
Timestamp: 2025-06-17T11:34:13.289Z
Learning: The README.md files in the serverpod_auth_migration module directories are auto-generated and get overwritten by utility scripts, so manual updates should be avoided until proper documentation is added during feature rollout.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_email_account/serverpod_auth_email_account_server/lib/src/business/email_accounts_admin.dart:130-143
Timestamp: 2025-06-17T11:38:13.087Z
Learning: In serverpod_auth_email_account EmailAccountsAdmin, tp prefers relying on database unique constraint exceptions over application-level pre-insert checks for email uniqueness, especially in contexts with longer-running transactions where TOCTOU issues could still occur.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/auth_migration_email.dart:0-0
Timestamp: 2025-06-17T13:04:19.522Z
Learning: In serverpod_auth_migration profile image migration, the image must be fetched from the URL rather than just copying the URL because the database schema requires storing the storage bucket and relative path information in addition to the public URL. This storage information is necessary for proper cleanup when profiles are deleted. The fetch approach works fine in production but requires localhost exclusion in testing environments where no HTTP file server is running.
Learnt from: tp
PR: serverpod/serverpod#3651
File: modules/new_serverpod_auth/serverpod_auth_email_account/serverpod_auth_email_account_server/lib/src/business/email_accounts.dart:35-39
Timestamp: 2025-06-16T12:07:26.018Z
Learning: The `withServerpod` test helper runs tests within a transaction, which may require adapting database queries to accept transaction parameters for proper snapshot consistency during testing.
Learnt from: exaby73
PR: serverpod/serverpod#3741
File: modules/serverpod_auth/serverpod_auth_server/analysis_options.yaml:14-16
Timestamp: 2025-07-01T13:01:27.005Z
Learning: In Serverpod, first-party packages like serverpod_auth_server can appropriately use blanket `invalid_use_of_internal_member: ignore` directives in their analysis_options.yaml since they use internal Database methods internally without exposing them in their public APIs to end users.
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
Learnt from: tp
PR: serverpod/serverpod#3721
File: modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/test/serverpod_auth_session_flutter_test.dart:1-7
Timestamp: 2025-06-27T07:44:09.048Z
Learning: In Serverpod packages, the `uuid` package is re-exported through a chain: `serverpod_auth_session_client` re-exports `serverpod_client`, which re-exports `serverpod_serialization`, which re-exports `uuid`. This means `Uuid` class is available in files that import `serverpod_auth_session_client` without needing a direct `uuid` package import.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/test/integration/auth_migration_email_test.dart:0-0
Timestamp: 2025-06-20T12:49:16.373Z
Learning: In test files, when testing that an async method completes without error (especially when the test name/description mentions "completes without error"), use the pattern `await expectLater(asyncMethodCall(), completes)` instead of just `await asyncMethodCall()`. This makes the test intention explicit and provides better test failure messages. However, don't apply this pattern to setup calls or when testing side effects rather than completion behavior.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/test/integration/auth_migration_email_test.dart:0-0
Timestamp: 2025-06-20T12:49:16.373Z
Learning: In test files, when testing that an async method completes without error (especially when the test name/description mentions "completes without error"), use the pattern `await expectLater(asyncMethodCall(), completes)` instead of just `await asyncMethodCall()`. This makes the test intention explicit and provides better test failure messages. However, don't apply this pattern to setup calls or when testing side effects rather than completion behavior. For tests that check both completion and side effects, consider splitting into separate tests or prioritize the primary assertion.
modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart (2)
Learnt from: tp
PR: serverpod/serverpod#3651
File: modules/new_serverpod_auth/serverpod_auth_email/serverpod_auth_email_server/lib/src/endpoints/email_account_endpoint.dart:37-49
Timestamp: 2025-06-16T12:08:40.049Z
Learning: In serverpod_auth_email_server, the startRegistration method intentionally does not propagate EmailAccountRequestResult failures to the caller to prevent information leakage about account existence. Only server-side logging is performed for admin monitoring purposes.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_email_account/serverpod_auth_email_account_server/lib/src/business/email_accounts_admin.dart:130-143
Timestamp: 2025-06-17T11:38:13.087Z
Learning: In serverpod_auth_email_account EmailAccountsAdmin, tp prefers relying on database unique constraint exceptions over application-level pre-insert checks for email uniqueness, especially in contexts with longer-running transactions where TOCTOU issues could still occur.
modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/serverpod_auth_migration_server.dart (5)
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/README.md:3-8
Timestamp: 2025-06-17T11:34:13.289Z
Learning: The README.md files in the serverpod_auth_migration module directories are auto-generated and get overwritten by utility scripts, so manual updates should be avoided until proper documentation is added during feature rollout.
Learnt from: tp
PR: serverpod/serverpod#3721
File: modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/test/serverpod_auth_session_flutter_test.dart:1-7
Timestamp: 2025-06-27T07:44:09.048Z
Learning: In Serverpod packages, the `uuid` package is re-exported through a chain: `serverpod_auth_session_client` re-exports `serverpod_client`, which re-exports `serverpod_serialization`, which re-exports `uuid`. This means `Uuid` class is available in files that import `serverpod_auth_session_client` without needing a direct `uuid` package import.
Learnt from: exaby73
PR: serverpod/serverpod#3741
File: modules/serverpod_auth/serverpod_auth_server/analysis_options.yaml:14-16
Timestamp: 2025-07-01T13:01:27.005Z
Learning: In Serverpod, first-party packages like serverpod_auth_server can appropriately use blanket `invalid_use_of_internal_member: ignore` directives in their analysis_options.yaml since they use internal Database methods internally without exposing them in their public APIs to end users.
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/auth_migrations.dart (5)
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/README.md:3-8
Timestamp: 2025-06-17T11:34:13.289Z
Learning: The README.md files in the serverpod_auth_migration module directories are auto-generated and get overwritten by utility scripts, so manual updates should be avoided until proper documentation is added during feature rollout.
Learnt from: tp
PR: serverpod/serverpod#3721
File: modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/test/serverpod_auth_session_flutter_test.dart:1-7
Timestamp: 2025-06-27T07:44:09.048Z
Learning: In Serverpod packages, the `uuid` package is re-exported through a chain: `serverpod_auth_session_client` re-exports `serverpod_client`, which re-exports `serverpod_serialization`, which re-exports `uuid`. This means `Uuid` class is available in files that import `serverpod_auth_session_client` without needing a direct `uuid` package import.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
Learnt from: exaby73
PR: serverpod/serverpod#3741
File: modules/serverpod_auth/serverpod_auth_server/analysis_options.yaml:14-16
Timestamp: 2025-07-01T13:01:27.005Z
Learning: In Serverpod, first-party packages like serverpod_auth_server can appropriately use blanket `invalid_use_of_internal_member: ignore` directives in their analysis_options.yaml since they use internal Database methods internally without exposing them in their public APIs to end users.
modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrate_user.dart (3)
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/README.md:3-8
Timestamp: 2025-06-17T11:34:13.289Z
Learning: The README.md files in the serverpod_auth_migration module directories are auto-generated and get overwritten by utility scripts, so manual updates should be avoided until proper documentation is added during feature rollout.
Learnt from: tp
PR: serverpod/serverpod#3651
File: modules/new_serverpod_auth/serverpod_auth_email_account/serverpod_auth_email_account_server/lib/src/business/email_accounts.dart:35-39
Timestamp: 2025-06-16T12:07:26.018Z
Learning: In Serverpod auth modules, failed login attempt logging (like `_logFailedSignIn`) is intentionally kept in separate transactions to prevent rollback when exceptions occur. This is because exceptions are widely used for normal control flow (e.g., invalid credentials), and the rate-limiting entries need to persist even when the outer transaction rolls back due to these expected exceptions.
modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/auth_migration_email.dart (5)
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/README.md:3-8
Timestamp: 2025-06-17T11:34:13.289Z
Learning: The README.md files in the serverpod_auth_migration module directories are auto-generated and get overwritten by utility scripts, so manual updates should be avoided until proper documentation is added during feature rollout.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_email_account/serverpod_auth_email_account_server/lib/src/business/email_accounts_admin.dart:130-143
Timestamp: 2025-06-17T11:38:13.087Z
Learning: In serverpod_auth_email_account EmailAccountsAdmin, tp prefers relying on database unique constraint exceptions over application-level pre-insert checks for email uniqueness, especially in contexts with longer-running transactions where TOCTOU issues could still occur.
Learnt from: tp
PR: serverpod/serverpod#3651
File: modules/new_serverpod_auth/serverpod_auth_email/serverpod_auth_email_server/lib/src/endpoints/email_account_endpoint.dart:37-49
Timestamp: 2025-06-16T12:08:40.049Z
Learning: In serverpod_auth_email_server, the startRegistration method intentionally does not propagate EmailAccountRequestResult failures to the caller to prevent information leakage about account existence. Only server-side logging is performed for admin monitoring purposes.
⏰ Context from checks skipped due to timeout of 90000ms (20)
  • GitHub Check: Unit tests IO (3.32.1, ubuntu-latest)
  • GitHub Check: Unit tests IO (3.32.1, windows-latest)
  • GitHub Check: Unit tests IO (3.24.0, windows-latest)
  • GitHub Check: Unit tests IO (3.24.0, ubuntu-latest)
  • GitHub Check: Serverpod integration tests (server) (3.32.1)
  • GitHub Check: Serverpod integration tests (server) (3.24.0)
  • GitHub Check: Migration e2e tests (3.32.1)
  • GitHub Check: Migration e2e tests (3.24.0)
  • GitHub Check: Serverpod E2E web tests (3.32.1)
  • GitHub Check: Serverpod E2E web tests (3.24.0)
  • GitHub Check: dart analyze downgrade (3.32.1, windows-latest)
  • GitHub Check: serverpod generate (3.32.1)
  • GitHub Check: serverpod generate (3.24.0)
  • GitHub Check: dart analyze downgrade (3.24.0, windows-latest)
  • GitHub Check: Bootstrap tests (3.32.1, ubuntu-latest, tests/bootstrap_project)
  • GitHub Check: Bootstrap tests (3.32.1, windows-latest, tests/bootstrap_project)
  • GitHub Check: Bootstrap tests (3.24.0, ubuntu-latest, tests/bootstrap_project)
  • GitHub Check: Bootstrap tests (3.24.0, windows-latest, tests/bootstrap_project)
  • GitHub Check: dart analyze latest (3.32.1, windows-latest)
  • GitHub Check: dart analyze (3.24.0, windows-latest)
🔇 Additional comments (15)
templates/pubspecs/modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/pubspec.yaml (1)

17-18: LGTM - Dependency override reordering for consistency.

The reordering of serverpod_auth_user_client improves consistency with dependency organization patterns used across the project.

modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/pubspec.yaml (1)

17-18: LGTM - Maintains consistency with template reordering.

The dependency override reordering aligns with the corresponding template file changes and improves organizational consistency.

tests/serverpod_new_auth_test/serverpod_new_auth_test_flutter/pubspec.yaml (1)

27-28: LGTM - Necessary dependency overrides for migration testing.

The addition of serverpod_auth_client and serverpod_auth_migration_client dependency overrides correctly enables the Flutter test project to use local development versions of the authentication and migration packages.

Also applies to: 33-34

tests/serverpod_new_auth_test/serverpod_new_auth_test_client/pubspec.yaml (1)

14-14: Dependency additions confirmed in template

Verified that the serverpod_new_auth_test_client template’s pubspec.yaml includes both serverpod_auth_migration_client and serverpod_auth_user_client (with correct dependency overrides), so these changes will persist across regenerations. No further action required.

modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/serverpod_auth_migration_server.dart (1)

3-4: LGTM - Appropriate public API expansion for migration functionality.

The exports of AuthMigrations class and migrating_email_endpoint_base.dart correctly expose the core migration orchestration and endpoint integration functionality through the library's public API, enabling external consumers to access the migration features.

tests/serverpod_new_auth_test/serverpod_new_auth_test_server/pubspec.yaml (1)

15-15: Add-on looks correct, but double-check version / override coherence

The new serverpod_auth_migration_server dependency plus its local path override appear consistent.
Please run dart pub get from this package’s directory to verify there are no version-solve conflicts with the rest of the Serverpod stack.

Also applies to: 33-34

templates/pubspecs/tests/serverpod_new_auth_test/serverpod_new_auth_test_client/pubspec.yaml (2)

20-23: Override OK – remember to drop once published versions exist

The local path overrides for *_migration_client and *_user_client are appropriate during development.
Plan to remove them (or gate behind a --dev flag in your tooling) once the packages are published to avoid leaking local paths into consumers’ pubspec.lock.


13-13: New dependency looks correct – mirror across peer templates.

Adding serverpod_auth_migration_client is required for the new helpers.
Double-check that every other *_client / *_server test template received the same addition so the template substitution stays consistent.

templates/pubspecs/modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/pubspec.yaml (1)

12-12: Dependency additions LGTM

meta, serverpod_auth_email_server, and serverpod_auth_session_server are reasonable new requirements and the overrides look correct. Ensure CI caches are cleared so dart pub get pulls the updated graph.

Also applies to: 15-15, 18-18, 23-23, 32-33, 38-39

modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/pubspec.yaml (2)

13-19: LGTM!

The dependency additions are appropriate for the migration module functionality.

Also applies to: 33-40


24-24: Minor formatting change

Formatting change from single to double quotes maintains consistency with other dependencies.

modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/test/integration/auth_migration_email_test.dart (1)

4-5: Test updates align with the refactored migration logic

The test changes correctly reflect:

  • Method rename from migrateOnLogin to migrateWithPassword
  • New behavior where users are imported with empty password hash on incorrect password
  • Configuration moved to AuthMigrations.config

Also applies to: 28-31, 77-80, 91-93, 104-107, 117-130

modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/auth_migrations.dart (1)

36-74: Well-designed authentication handler

The combined authentication handler elegantly supports both legacy and new authentication systems while properly mapping user IDs for migrated users.

modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/test/integration/auth_migrations_test.dart (1)

13-329: Comprehensive test coverage for migration scenarios

The test suite thoroughly covers:

  • Migration status checks for unmigrated users
  • Email-based account migration with proper normalization
  • Social login migration with legacy identifiers
  • Migration hook invocation
  • Data consistency across all related tables
modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/auth_migration_email.dart (1)

59-65: Ignore redundant email existence check in fallback migration

The migrateWithoutPassword method already calls
new_email_account.EmailAccounts.admin.findAccount(...),
which throws EmailAccountNotFound for missing emails. That exception is caught internally and causes an immediate return—no ghost account is created. No additional existence verification is needed before invoking the fallback migration.

Likely an incorrect or invalid review comment.

@tp
tp marked this pull request as ready for review July 2, 2025 16:09
@tp
tp force-pushed the one-stop-migration branch from c6ec234 to 6d6dfdd Compare July 2, 2025 16:09
@tp
tp requested a review from exaby73 July 3, 2025 07:56

@exaby73 exaby73 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@tp

tp commented Jul 3, 2025

Copy link
Copy Markdown
Contributor Author

This is a solid first step, but we already gained some learnings, so it'll likely evolve in the direction outlined in #3753.

@tp
tp merged commit 1683606 into serverpod:main Jul 3, 2025
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants