Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
a38c454
docs: update roadmap and technical debt for Sprint 12 and init Bookin…
Apr 21, 2026
1d1e1d4
feat(bookings): implement provider schedule and rename enum to EBooki…
Apr 21, 2026
1edd187
chore: update packages.lock.json files after adding Bookings module
Apr 21, 2026
102fb38
feat(web): implement schedule management and booking flow
Apr 21, 2026
b5b16fb
merge: resolve conflicts between master and sprint-12 branch
Apr 21, 2026
ebcdb46
docs: finalize sprint 12 and update roadmap and technical debt
Apr 21, 2026
9f6789a
fix: address CI build errors, coverage and review findings
Apr 21, 2026
1707351
fix(web): use correct button variant and fix package versions
Apr 21, 2026
57b65a9
fix: address final review findings, atomic operations and security
Apr 21, 2026
11e85c5
fix: address all review findings, security and timezone logic
Apr 21, 2026
476e1bc
chore: sync lock files to fix CI restore error
Apr 21, 2026
3b009e3
fix: resolve all review findings, security and timezone tests
Apr 21, 2026
f79704e
chore: total clean and sync of lock files
Apr 21, 2026
77fb0bc
fix(web): resolve button type errors and clean up imports
Apr 21, 2026
2469162
fix: resolve all build errors and review findings across backend and …
Apr 21, 2026
d8d2c13
fix: address final review findings, concurrency and security
Apr 21, 2026
0022feb
fix: resolve all build errors, tests and sync schema
Apr 21, 2026
ade1801
test(bookings): expand test suite and achieve full coverage
Apr 21, 2026
9a89ad3
fix: sync solution and align OpenTelemetry packages to 1.15.2
Apr 21, 2026
7fc5b07
fix: align OpenTelemetry versions with master and enable Bookings tes…
Apr 21, 2026
38c164c
Merge branch 'master' into feature/sprint-12-bookings-messaging
Apr 21, 2026
d8c572f
fix: restore coverage health with new backend and frontend tests
Apr 21, 2026
cc43757
test: achieve coverage goals with new unit and frontend tests
Apr 21, 2026
8c481a8
fix: resolve findings and expand bookings coverage
Apr 21, 2026
8f3c722
fix(frontend): add aria-label to schedule remove button and fix faili…
Apr 21, 2026
198129a
fix: address all findings and achieve stable coverage
Apr 21, 2026
f631dd9
fix: address all remaining findings and stabilize tests
Apr 21, 2026
e7a32b2
fix: resolve integration test authentication and logic issues
Apr 21, 2026
9de0618
fix: resolve build errors and stabilize integration tests
Apr 21, 2026
50335b3
fix: address all final findings and refine tests/logic
Apr 22, 2026
dbbf54c
fix: resolve integration test logic failures and refine API metadata
Apr 22, 2026
725fd2d
fix: stabilize concurrency tests and resolve final findings
Apr 22, 2026
20e6ba8
fix: address all remaining findings and achieve stable coverage
Apr 22, 2026
8274f06
fix: address all final findings and stabilize tests
Apr 22, 2026
43d9038
feat: implement Bookings module with core domain entities, applicatio…
Apr 22, 2026
f58c16b
feat: implement provider scheduling functionality with database migra…
Apr 22, 2026
63463aa
feat: implement complete booking module with scheduling, management e…
Apr 22, 2026
ced4c67
test: add unit tests for GlobalExceptionHandler middleware behavior
Apr 22, 2026
80d5b9e
feat: implement booking schedule E2E flow, handler unit tests, and gl…
Apr 22, 2026
bc57e42
feat: implement booking completion command, query handlers, and repos…
Apr 22, 2026
d788a59
feat: implement global exception handler and bookings module with cor…
Apr 22, 2026
59d1889
feat: implement booking modal component for provider service scheduling
Apr 22, 2026
d67932e
feat: implement booking repository with overlap validation and provid…
Apr 22, 2026
1c7130e
test: add BookingModal unit tests and create E2E utility for API mocking
Apr 22, 2026
9b854e8
feat: implement booking module with backend handlers, infrastructure …
Apr 22, 2026
e8a1198
ci: add backend continuous integration workflow with postgres and azu…
Apr 22, 2026
9a00f4b
feat: implement paginated booking queries, robust overlapping validat…
Apr 22, 2026
a5abe31
feat: implement booking module domain logic, persistence, and public …
Apr 22, 2026
427ece0
feat: implement complete booking module with domain logic, persistenc…
Apr 23, 2026
50fc489
feat: implement provider profile page with integrated booking system …
Apr 23, 2026
795a3c7
feat: implement booking module infrastructure and establish CI/CD doc…
Apr 23, 2026
129d588
feat: implement core booking module with domain entities, application…
Apr 23, 2026
bdd1030
feat: implement booking functionality including scheduling, repositor…
Apr 23, 2026
19a8ad9
feat: implement provider availability query handler tests and booking…
Apr 23, 2026
7e02430
feat: implement messaging infrastructure with Rebus, add booking doma…
Apr 23, 2026
16073a0
feat: implement provider scheduling domain logic, messaging infrastru…
Apr 23, 2026
4197168
test: add unit tests for GlobalExceptionHandler middleware handling v…
Apr 23, 2026
d0d891e
feat: implement BookingRepository with overlap validation and add pub…
Apr 24, 2026
bc53e57
feat: implement provider booking endpoints and cached authorization r…
Apr 24, 2026
506edd6
feat: create MeAjudaAi.Shared project and remove unused Rebus JSON se…
Apr 24, 2026
e2d408a
feat: add provider schedule and booking history endpoints with cached…
Apr 24, 2026
7a4b880
feat: implement booking handlers, endpoints, and backend CI pipeline …
Apr 24, 2026
085b809
chore: add packages.lock.json for Shared project dependencies
Apr 24, 2026
4acb320
fix: Revert Development removal from bypass (keeps tests passing)
Apr 24, 2026
80804fe
fix: Handle empty env vars in IsSecurityBypassEnvironment
Apr 24, 2026
64e8d5e
fix: Apply code review findings
Apr 24, 2026
ffb330a
test: improve code coverage for Bookings API and Shared
Apr 24, 2026
3b9540c
fix: address code review findings for Bookings and Messaging
Apr 24, 2026
b16ac32
test: improve Bookings API and Application coverage
Apr 24, 2026
1ddf743
fix: resolve build errors and stabilize test coverage
Apr 24, 2026
3c6e082
fix: update packages.lock.json files to resolve NU1004 and NU1102 CI …
Apr 24, 2026
3390787
fix: address final code review findings and stabilize messaging
Apr 24, 2026
a1281e1
fix: resolve CS1997 build errors in RabbitMqDeadLetterService
Apr 24, 2026
00c8545
fix: resolve failing E2E test by linking service to provider
Apr 24, 2026
10ea010
fix: finalize coverage improvements and legitimate exclusions
Apr 24, 2026
2f2844a
fix: address final code review findings and stabilize messaging system
Apr 24, 2026
eb91710
fix: recover test coverage and ensure build stability
Apr 24, 2026
f6e450f
fix: resolve Rebus.ServiceProvider version conflict with .NET 10 exte…
Apr 24, 2026
87d0baa
fix: resolve ArgumentNullException in ProvidersModuleApiTests
Apr 24, 2026
9de497f
fix: address final code review findings and stabilize tests
Apr 24, 2026
47635a8
fix: resolve failing tests in Bookings and Outbox
Apr 24, 2026
13b049d
test: major coverage boost for Shared, ApiService and Bookings
Apr 24, 2026
5a49685
test: module refinement and edge cases coverage boost
Apr 25, 2026
d0fe76c
fix: resolve NullReferenceException in OutboxProcessorBase and stabil…
Apr 25, 2026
ba70b65
feat: implement core infrastructure, messaging services, and unit tes…
Apr 25, 2026
0b27f45
feat: implement MessagingExtensions for Rebus and RabbitMQ configurat…
Apr 25, 2026
c8d8d57
feat: implement CreateBookingCommandHandler to handle booking validat…
Apr 25, 2026
94f4c5f
feat: implement BookingRepository with atomic overlap validation and …
Apr 25, 2026
e2fbe38
feat: implement booking creation handler, add infrastructure DI tests…
Apr 25, 2026
ce5a42b
feat: implement ProvidersModuleApi for cross-module communication and…
Apr 25, 2026
42a4780
feat: implement provider authorization resolver with caching and add …
Apr 25, 2026
ee72551
feat: implement booking domain logic with lifecycle state management …
Apr 25, 2026
5dc3ea1
feat: implement BookingRepository with paged queries and atomic overl…
Apr 25, 2026
1e3358d
feat: implement bookings module infrastructure and domain logic, incl…
Apr 25, 2026
72cef9a
feat: implement bookings module workflow and messaging infrastructure…
Apr 25, 2026
0283228
test: add unit tests for booking command handlers and TimeSlot value …
Apr 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
49 changes: 47 additions & 2 deletions .github/workflows/ci-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ jobs:
"src/Modules/Ratings/Tests/MeAjudaAi.Modules.Ratings.Tests.csproj"
"src/Modules/SearchProviders/Tests/MeAjudaAi.Modules.SearchProviders.Tests.csproj"
"src/Modules/Payments/Tests/MeAjudaAi.Modules.Payments.Tests.csproj"
"src/Modules/Bookings/Tests/MeAjudaAi.Modules.Bookings.Tests.csproj"
"tests/MeAjudaAi.Shared.Tests/MeAjudaAi.Shared.Tests.csproj"
"tests/MeAjudaAi.ApiService.Tests/MeAjudaAi.ApiService.Tests.csproj"
"tests/MeAjudaAi.Architecture.Tests/MeAjudaAi.Architecture.Tests.csproj"
Expand Down Expand Up @@ -268,7 +269,7 @@ jobs:
reporttypes: "Cobertura;JsonSummary"
groupby: "Namespace"
assemblyfilters: "+MeAjudaAi.*;-MeAjudaAi.AppHost;-MeAjudaAi.ServiceDefaults;-MeAjudaAi.Contracts;-MeAjudaAi.Modules.Ratings.API"
classfilters: "+*;-*.Tests;-*.Tests.*;-*Test*;-testhost;-*.Migrations.*;-*Program*;-*.Seeding.*;-*DbContextFactory;+MeAjudaAi.Modules.Payments.API.*Endpoint;-*Endpoint;-*Options;-*IntegrationEvent;-*Request;-*Response;-*Dto;-*DTO"
classfilters: "+*;-*.Tests;-*.Tests.*;-*Test*;-testhost;-*.Migrations.*;-*Program*;-*.Seeding.*;-*DbContextFactory;+MeAjudaAi.Modules.Payments.API.*Endpoint;+MeAjudaAi.Modules.Bookings.API.*Endpoint;-*Endpoint;-*Options;-*IntegrationEvent;-*Request;-*Response;-*Dto;-*DTO"

- name: Upload coverage reports
uses: actions/upload-artifact@v4
Expand All @@ -285,7 +286,7 @@ jobs:
badge: true
format: markdown
output: both
thresholds: "85 75" # line branch (temporário - reverter para 90/80 em sprints futuras)
thresholds: "90 80" # line branch
fail_below_min: true

- name: Generate Coverage PR Comment
Expand Down Expand Up @@ -363,11 +364,55 @@ jobs:
fi

- name: Check for Breaking Changes
id: breaking-changes
uses: oasdiff/oasdiff-action/breaking@v0.0.39
continue-on-error: true # Permitir falhas durante a Sprint 12 para evolução de contrato
with:
base: 'api-base.json'
revision: 'api-current/api-spec.json'
fail-on: 'ERR'
err-ignore: '.oasdiff-ignore.yaml'
Comment thread
frigini marked this conversation as resolved.

- name: Warn if Breaking Changes Found
if: steps.breaking-changes.outcome == 'failure'
run: |
echo "::warning title=Breaking Changes Detected::Changes that break the API contract were found. Review the oasdiff output above."

- name: Post Breaking Changes PR Comment
if: steps.breaking-changes.outcome == 'failure'
uses: marocchino/sticky-pull-request-comment@v3
with:
recreate: true
header: oasdiff-breaking-changes
message: |
## ⚠️ Breaking Changes Detectados

O `oasdiff` identificou mudanças que quebram o contrato da API em relação à branch base (`${{ github.base_ref }}`).

**Ação necessária:** Revise os logs do step _Check for Breaking Changes_ acima e garanta que as alterações são intencionais e documentadas em `.oasdiff-ignore.yaml`.

- name: Clear Breaking Changes PR Comment
if: steps.breaking-changes.outcome == 'success'
uses: marocchino/sticky-pull-request-comment@v3
with:
recreate: true
header: oasdiff-breaking-changes
message: |
## ✅ Contrato da API Validado

Nenhuma breaking change detectada pelo `oasdiff` em relação à branch base.

- name: Ensure Breaking Changes PR Comment State
if: always() && (steps.breaking-changes.outcome == 'skipped' || steps.breaking-changes.outcome == 'cancelled')
uses: marocchino/sticky-pull-request-comment@v3
with:
recreate: true
header: oasdiff-breaking-changes
message: |
## ℹ️ Validação de Contrato Indisponível

A verificação de breaking changes foi **${{ steps.breaking-changes.outcome }}**.
Consulte os logs para mais detalhes se necessário.

security-scan:
name: Security Scan
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ legacy-analysis-report.*
*-analysis-report.html
*-analysis-report.json
*QUALITY_ANALYSIS.md
*.sarif
**/errors.json

# Archived scripts
.archive/
Expand Down
5 changes: 5 additions & 0 deletions .oasdiff-ignore.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Configuração para ignorar breaking changes intencionais.
# Formato: METHOD PATH ERROR_ID

GET /api/v1/providers/public/{idOrSlug} response-property-type-changed
GET /api/v1/providers/public/{idOrSlug} response-body-type-changed
Comment thread
frigini marked this conversation as resolved.
5 changes: 4 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
<!-- Microsoft.OpenApi: Mantido em 2.x devido a incompatibilidade com geradores do .NET 10 -->
<!-- Analisado em 2026-04-12: Versão 3.5.1 causa erro CS0200 em IOpenApiMediaType.Example -->
<PackageVersion Include="Microsoft.OpenApi" Version="2.7.3" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.4" />
<PackageVersion Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.1" />
<PackageVersion Include="Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite" Version="10.0.1" />
<!-- Acesso a Dados -->
Expand Down Expand Up @@ -113,7 +114,9 @@
<PackageVersion Include="RabbitMQ.Client" Version="7.2.1" />
<PackageVersion Include="Rebus" Version="8.9.2" />
<PackageVersion Include="Rebus.RabbitMq" Version="10.1.1" />
<PackageVersion Include="Rebus.Serialization.Json" Version="8.9.2" />
<PackageVersion Include="Rebus.ServiceProvider" Version="10.7.2" />

<!-- Autenticação e Autorização -->
<PackageVersion Include="System.IdentityModel.Tokens.Jwt" Version="8.17.0" />
<PackageVersion Include="Microsoft.IdentityModel.Protocols" Version="8.16.0" />
Expand Down Expand Up @@ -178,4 +181,4 @@
<!-- Testes Blazor -->
<PackageVersion Include="bUnit" Version="2.6.2" />
</ItemGroup>
</Project>
</Project>
16 changes: 16 additions & 0 deletions MeAjudaAi.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,22 @@
<Project Path="src/Client/MeAjudaAi.Client.Contracts/MeAjudaAi.Client.Contracts.csproj" />
</Folder>
<Folder Name="/src/Modules/" />
<Folder Name="/src/Modules/Bookings/" />
<Folder Name="/src/Modules/Bookings/API/">
<Project Path="src/Modules/Bookings/API/MeAjudaAi.Modules.Bookings.API.csproj" />
</Folder>
<Folder Name="/src/Modules/Bookings/Application/">
<Project Path="src/Modules/Bookings/Application/MeAjudaAi.Modules.Bookings.Application.csproj" />
</Folder>
<Folder Name="/src/Modules/Bookings/Domain/">
<Project Path="src/Modules/Bookings/Domain/MeAjudaAi.Modules.Bookings.Domain.csproj" />
</Folder>
<Folder Name="/src/Modules/Bookings/Infrastructure/">
<Project Path="src/Modules/Bookings/Infrastructure/MeAjudaAi.Modules.Bookings.Infrastructure.csproj" />
</Folder>
<Folder Name="/src/Modules/Bookings/Tests/">
<Project Path="src/Modules/Bookings/Tests/MeAjudaAi.Modules.Bookings.Tests.csproj" />
</Folder>
<Folder Name="/src/Modules/Communications/" />
<Folder Name="/src/Modules/Communications/API/">
<Project Path="src/Modules/Communications/API/MeAjudaAi.Modules.Communications.API.csproj" />
Expand Down
5 changes: 3 additions & 2 deletions coverlet.runsettings
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
<Configuration>
<Format>cobertura</Format>
<Include>[MeAjudaAi*]*</Include>
<!-- Exclude only glue/DTO/Endpoints patterns, keep Configuration, Extensions and Monitoring -->
<Exclude>[*.Tests*]*,[*Test*]*,[testhost]*,[*]*Migrations*,[*]*.DbContextFactory,[*Microsoft.AspNetCore.OpenApi.Generated*]*,[*System.Runtime.CompilerServices*]*,[*System.Text.RegularExpressions.Generated*]*,[*]*.Enums.*</Exclude>
<ExcludeByFile>**/Migrations/*.cs,**/Migrations/**/*.cs,**/*DbContextFactory.cs</ExcludeByFile>
<ExcludeByAttribute>Obsolete,GeneratedCode,CompilerGenerated</ExcludeByAttribute>
<ExcludeByAttribute>Obsolete,GeneratedCode,CompilerGenerated,ExcludeFromCodeCoverage</ExcludeByAttribute>
<!-- Threshold set to 0 to allow full report generation. Final check is done by CodeCoverageSummary -->
<Threshold>0</Threshold>
<ThresholdType>line</ThresholdType>
Expand All @@ -17,4 +18,4 @@
</DataCollector>
</DataCollectors>
</DataCollectionRunSettings>
</RunSettings>
</RunSettings>
37 changes: 37 additions & 0 deletions docs/api-automation.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,43 @@ python -m http.server 8000
- ✅ Validação automática
- ✅ Deploy sem intervenção

## 🛡️ Gestão de Mudanças e Versionamento

### 1. Detecção de Breaking Changes

O CI do backend utiliza a ferramenta `oasdiff` para comparar a especificação da API da branch atual com a branch de destino (`master` ou `develop`). O passo de CI `Check for Breaking Changes` identifica mudanças que quebram a compatibilidade (ex: remover campo, mudar tipo, alterar rota) e posta avisos e comentários detalhados no Pull Request para revisão humana, sem interromper o pipeline (`continue-on-error: true`).

### 2. Mudanças Intencionais (Fase de Desenvolvimento)

Durante o desenvolvimento ativo, breaking changes podem ser necessárias. Para aprová-las e permitir que o CI passe:

1. Edite o arquivo `.oasdiff-ignore.yaml` na raiz do projeto.
2. Adicione a linha com o método, rota e o ID do erro que deseja ignorar:
```text
METHOD PATH ERROR_ID
```
Exemplo: `GET /api/v1/providers/public/{idOrSlug} response-property-type-changed`
3. Documente no commit o motivo da mudança e inclua o PR rationale.

### 3. Estratégias para Produção (Futuro)

Quando o sistema tiver consumidores externos (Mobile ou Terceiros), as seguintes estratégias devem ser adotadas:

* **Versionamento por Path**: Criar `/api/v2/...` para mudanças estruturais profundas.
* **Expansão e Depreciação (Parallel Change)**:
1. Adicionar o novo campo/funcionalidade.
2. Marcar o antigo como `[Obsolete]` no C# e `deprecated: true` no OpenAPI.
3. Monitorar o uso e remover o antigo apenas após migração total dos clientes.
* **Versionamento por Header**: Utilizar headers como `X-API-Version` para selecionar a lógica de resposta.

### 4. Política de Limpeza do arquivo Ignore

O arquivo `.oasdiff-ignore.yaml` deve ser revisado periodicamente para evitar o acúmulo de supressões obsoletas:
- **Revisão Periódica**: A cada ciclo de release ou a cada 3 meses. As entradas com mais de 3 meses devem ser removidas ou justificadas novamente.
- **Rastreabilidade**: Cada entrada deve estar vinculada a um ticket ou PR explicando o motivo.
- **Validação de CI**: O passo de CI `Check for Breaking Changes` validará as entradas ativas no arquivo `.oasdiff-ignore.yaml` para manter a rastreabilidade das exceções concedidas.
- **Alternativas**: Antes de adicionar uma supressão, verifique se estratégias de retrocompatibilidade (ex: `/api/v2`, `[Obsolete]`, versionamento por header) são mais adequadas.
Comment thread
frigini marked this conversation as resolved.

## 📝 Troubleshooting

### Workflow falhou
Expand Down
4 changes: 2 additions & 2 deletions docs/ci-cd.md
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ variables:

# Quality Gates
- name: CodeCoverageThreshold
value: "80"
value: "90"
- name: SonarQualityGate
value: "OK"

Expand Down Expand Up @@ -722,7 +722,7 @@ Write-Host "✅ Configuração de CI/CD (apenas setup) concluída!" -ForegroundC

#### Build Quality
- ✅ Compilação sem erros ou warnings
- ✅ Cobertura de código > 80%
- ✅ Cobertura de código ≥ 90%
- ✅ Testes unitários 100% passing
- ✅ Análise estática sem issues críticos

Expand Down
7 changes: 3 additions & 4 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -703,9 +703,8 @@ public async Task CheckPermission_WithAuthorizedUser_ShouldReturnTrue()
### **6. Code Coverage Guidelines**

#### Coverage Thresholds
- **Minimum**: 70% (warning threshold)
- **Good**: 85% (recommended threshold)
- **Excellent**: 90%+
- **Minimum**: 90% (required threshold for CI/CD)
- **Excellent**: 95%+

#### Viewing Coverage Reports
```bash
Expand All @@ -721,7 +720,7 @@ reportgenerator -reports:"./coverage/**/coverage.opencover.xml" -targetdir:"./co
O pipeline automaticamente:
- Gera relatórios de coverage para cada PR
- Comenta automaticamente nos PRs com estatísticas
- Falha se o coverage cair abaixo de 70%
- Falha se o coverage cair abaixo de 90%

### **7. Integration Test Setup**

Expand Down
Loading
Loading