Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
60de2bd
refactor: apply code review nitpick improvements
Nov 25, 2025
516a2a0
fix: remove ConfigurableTestAuthenticationHandler race condition
Nov 25, 2025
0e48824
docs: remove obsolete documentation files
Nov 25, 2025
e50f728
feat: add IDocumentsModuleApi for cross-module communication
Nov 25, 2025
e046895
wip: add comprehensive IBGE API stubs to WireMock + refactor IbgeApiI…
Nov 25, 2025
efdd1ef
feat: add IServiceCatalogsModuleApi for cross-module service validation
Nov 25, 2025
6302d16
fix: refactor IbgeApiIntegrationTests to use WireMock + fix stubs
Nov 25, 2025
916e4dd
test: remove Skip from 2 ServiceCatalogs integration tests after AUTH…
Nov 25, 2025
4940bc2
fix: enable IBGE fail-open with fallback to simple validation
Nov 25, 2025
97dc7ac
feat(providers): integrate IDocumentsModuleApi in provider activation
Nov 25, 2025
62e46fa
feat(providers): prepare ISearchModuleApi integration for provider in…
Nov 25, 2025
a6ad166
feat(search): implement IndexProviderAsync and RemoveProviderAsync in…
Nov 25, 2025
c63ad65
test: remove duplicate GeographicRestrictionFeatureFlagTests
Nov 25, 2025
65897e9
docs: update Sprint 1 progress and skipped tests analysis
Nov 25, 2025
8ca60ea
docs: comprehensive Module APIs documentation in architecture.md
Nov 25, 2025
234a20f
docs: Sprint 1 final summary and completion report
Nov 25, 2025
b77eb08
feat(providers): implement full provider data sync for search indexing
Nov 25, 2025
2cf5816
feat(providers): add ProviderServices many-to-many table
Nov 25, 2025
b355776
test(providers): add comprehensive unit tests for ProviderServices
Nov 25, 2025
bff2381
refactor: rename infrastructure/database/modules folders and update S…
Nov 25, 2025
3d8b469
fix: make SearchProviders schema migration conditional for TestContai…
Nov 25, 2025
4aa726a
fix: corrigir schema hardcoded 'search' para 'search_providers' em qu…
Nov 25, 2025
938c55d
fix: atualizar schema 'search' para 'search_providers' em SearchProvi…
Nov 25, 2025
b317f38
feat: implement cross-module event handlers and fix SearchProviders s…
Nov 26, 2025
ca4b2f9
test: skip CreateAndUpdateUser_ShouldMaintainConsistency in CI/CD
Nov 26, 2025
17b6e55
refactor: code review fixes - remove duplicates, fix schemas, regener…
Nov 26, 2025
5dad19a
chore: final code review fixes - documentation, security, domain events
Nov 26, 2025
ac601cb
fix: correct schema naming to meajudaai_* pattern across all modules
Nov 26, 2025
b98c132
refactor: code quality improvements from review feedback
Nov 26, 2025
59e6265
refactor: minor code quality improvements
Nov 26, 2025
025aee0
test: improve test quality with explicit assertions and Theory pattern
Nov 26, 2025
ee4d1b2
refactor: use IReadOnlyList in ModuleServiceValidationResultDto
Nov 26, 2025
3d7b31b
fix: resolve race condition in ConfigurableTestAuthenticationHandler
Nov 26, 2025
78e47cb
fix: consolidate schema naming to meajudaai_* convention across all m…
Nov 26, 2025
dfa7f10
perf: reduce WireMock timeout simulation from 30s to 5s
Nov 26, 2025
5221f44
refactor: implement code review feedback - Result Match pattern, repo…
Nov 26, 2025
51f7e0d
refactor: rename Mock* to LocalDevelopment* services and move to dedi…
Nov 26, 2025
512cd66
fix: allowUnauthenticated should return anonymous principal, not admin
Nov 26, 2025
780cae9
fix: address CodeRabbit review feedback
Nov 26, 2025
9bfff7c
refactor: implement CodeRabbit Round 2 feedback - null guards, XML do…
Nov 26, 2025
0be5389
refactor: apply minor CodeRabbit polish - constants and comments
Nov 26, 2025
c69c404
feat: implement remaining CodeRabbit suggestions - UUID v7, migration…
Nov 27, 2025
93592d7
refactor: implement CodeRabbit final round - schema standardization, …
Nov 27, 2025
e0b4db3
refactor: complete CodeRabbit final polish - ProductVersion stable, h…
Nov 27, 2025
63a4a2d
fix: resolve E2E test failures - authentication and category deactiva…
Nov 27, 2025
274b378
refactor: apply CodeRabbit feedback - schema naming, async cleanup, t…
Nov 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor: implement CodeRabbit final round - schema standardization, …
…XML docs, code cleanup

Schema Standardization:
- Fix Providers module schema: 'providers' → 'meajudaai_providers' in test configuration
- Fix Users module schema: 'users' → 'meajudaai_users' in DbContext and migrations
- Regenerate Users migrations with correct schema (removed 8 old migrations, created single InitialCreate)
- Align all modules to meajudaai_{module_name} naming convention

XML Documentation:
- Add comprehensive XML docs to TestContainerTestBase helper methods (PostJsonAsync, PutJsonAsync, ReadJsonAsync, URI overloads)
- Add XML docs to Users.Infrastructure.Extensions.AddInfrastructure method
- Add XML docs to ConfigurableTestAuthenticationHandler.SchemeName constant
- Enhance ClearConfiguration docs to emphasize cleanup hook usage

Code Quality:
- Remove unreachable code in TestContainerTestBase exception handling
- Fix WireMock timeout comment accuracy (5s is within 30s timeout, not exceeding)
- Improve Portuguese grammar in technical_debt.md (add comma before 'incluindo')
- Use Portuguese term 'Desempenho' instead of 'Performance' for consistency

All tests passing:
- 1/1 ProviderRepositoryIntegrationTests
- 8/8 PermissionAuthorizationE2ETests
  • Loading branch information
Filipe Frigini committed Nov 27, 2025
commit 93592d78857526a804f0efd77f70e00fa964816c
4 changes: 2 additions & 2 deletions docs/technical_debt.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ O teste `GetProvidersByVerificationStatus_ShouldReturnOnlyPendingProviders` atua
**Issue**: [Criar issue para rastreamento]

**Descrição**:
O módulo SearchProviders não possui testes E2E (end-to-end), apenas testes de integração e unitários. Testes E2E são necessários para validar o fluxo completo de busca de prestadores incluindo integração com APIs externas (IBGE), filtros, paginação, e respostas HTTP completas.
O módulo SearchProviders não possui testes E2E (end-to-end), apenas testes de integração e unitários. Testes E2E são necessários para validar o fluxo completo de busca de prestadores, incluindo integração com APIs externas (IBGE), filtros, paginação, e respostas HTTP completas.

**Contexto**:
- Identificado durante code review automatizado (CodeRabbit)
Expand Down Expand Up @@ -300,7 +300,7 @@ O módulo SearchProviders não possui testes E2E (end-to-end), apenas testes de
- [ ] Busca por status de verificação
- [ ] Combinação de múltiplos filtros

4. **Performance e Carga**:
4. **Desempenho e Carga**:
- [ ] Busca com grande volume de resultados (1000+ prestadores)
- [ ] Validação de tempos de resposta (<500ms para buscas simples)
- [ ] Cache de resultados de API externa
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ protected TestInfrastructureOptions GetTestOptions()
DatabaseName = $"providers_test_{_testClassId}",
Username = "test_user",
Password = "test_password",
Schema = "providers",
Schema = "meajudaai_providers",
UseInMemoryDatabase = false
},
Cache = new TestCacheOptions
Expand Down
6 changes: 6 additions & 0 deletions src/Modules/Users/Infrastructure/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ namespace MeAjudaAi.Modules.Users.Infrastructure;

public static class Extensions
{
/// <summary>
/// Registers Users module infrastructure services including persistence, Keycloak integration, domain services, and event handlers.
/// </summary>
/// <param name="services">The service collection to configure.</param>
/// <param name="configuration">The application configuration containing database and Keycloak settings.</param>
/// <returns>The configured service collection for fluent chaining.</returns>
public static IServiceCollection AddInfrastructure(this IServiceCollection services, IConfiguration configuration)
{
services.AddPersistence(configuration);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace MeAjudaAi.Modules.Users.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class InitialCreate : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.EnsureSchema(
name: "meajudaai_users");

migrationBuilder.CreateTable(
name: "users",
schema: "meajudaai_users",
columns: table => new
{
id = table.Column<Guid>(type: "uuid", nullable: false),
username = table.Column<string>(type: "character varying(30)", maxLength: 30, nullable: false),
email = table.Column<string>(type: "character varying(254)", maxLength: 254, nullable: false),
first_name = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false),
last_name = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false),
keycloak_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
is_deleted = table.Column<bool>(type: "boolean", nullable: false, defaultValue: false),
deleted_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
last_username_change_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
created_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
updated_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_users", x => x.id);
});

migrationBuilder.CreateIndex(
name: "ix_users_created_at",
schema: "meajudaai_users",
table: "users",
column: "created_at");

migrationBuilder.CreateIndex(
name: "ix_users_deleted_created",
schema: "meajudaai_users",
table: "users",
columns: new[] { "is_deleted", "created_at" },
filter: "is_deleted = false");

migrationBuilder.CreateIndex(
name: "ix_users_deleted_email",
schema: "meajudaai_users",
table: "users",
columns: new[] { "is_deleted", "email" },
filter: "is_deleted = false");

migrationBuilder.CreateIndex(
name: "ix_users_deleted_username",
schema: "meajudaai_users",
table: "users",
columns: new[] { "is_deleted", "username" },
filter: "is_deleted = false");

migrationBuilder.CreateIndex(
name: "ix_users_email",
schema: "meajudaai_users",
table: "users",
column: "email",
unique: true);

migrationBuilder.CreateIndex(
name: "ix_users_keycloak_id",
schema: "meajudaai_users",
table: "users",
column: "keycloak_id",
unique: true);

migrationBuilder.CreateIndex(
name: "ix_users_username",
schema: "meajudaai_users",
table: "users",
column: "username",
unique: true);
}

/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "users",
schema: "meajudaai_users");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasDefaultSchema("users")
.HasDefaultSchema("meajudaai_users")
.HasAnnotation("ProductVersion", "10.0.0-rc.2.25502.107")
.HasAnnotation("Relational:MaxIdentifierLength", 63);

Expand Down Expand Up @@ -110,7 +110,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
.HasDatabaseName("ix_users_deleted_username")
.HasFilter("is_deleted = false");

b.ToTable("users", "users");
b.ToTable("users", "meajudaai_users");
});
#pragma warning restore 612, 618
}
Expand Down

This file was deleted.

This file was deleted.

Loading
Loading