chore: archive dps-test-reorganization-and-coverage change and sync s…#92
Conversation
…pecs Archive the completed change and sync delta specs to main specs: - NEW: openspec/specs/dps-provider-test-coverage/ - NEW: openspec/specs/dps-test-structure-reorganization/ - MODIFIED: openspec/specs/nfse-provider-test-coverage/ Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
There was a problem hiding this comment.
Pull request overview
Archives the completed “dps test reorganization and coverage” change and syncs its resulting spec deltas back into the main openspec/specs/ set.
Changes:
- Adds new spec documents for provider test coverage and test-structure reorganization.
- Updates the main NFSe provider test coverage spec to require coverage across all 7 providers.
- Archives the change package (proposal/design/tasks + snapshot of the updated specs).
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| openspec/specs/nfse-provider-test-coverage/spec.md | Main spec update describing required provider XML/XSD test coverage and isolation rules. |
| openspec/specs/dps-test-structure-reorganization/spec.md | New main spec defining unit/integration test folder separation and naming conventions. |
| openspec/specs/dps-provider-test-coverage/spec.md | New main spec defining per-provider DPS serialization test coverage expectations. |
| openspec/changes/archive/2026-03-27-dps-test-reorganization-and-coverage/tasks.md | Archived execution log/checklist for the change. |
| openspec/changes/archive/2026-03-27-dps-test-reorganization-and-coverage/specs/nfse-provider-test-coverage/spec.md | Archived snapshot of the NFSe provider test coverage spec. |
| openspec/changes/archive/2026-03-27-dps-test-reorganization-and-coverage/specs/dps-test-structure-reorganization/spec.md | Archived snapshot of the test-structure reorganization spec. |
| openspec/changes/archive/2026-03-27-dps-test-reorganization-and-coverage/specs/dps-provider-test-coverage/spec.md | Archived snapshot of the DPS provider test coverage spec. |
| openspec/changes/archive/2026-03-27-dps-test-reorganization-and-coverage/proposal.md | Archived change proposal (why/what/impact). |
| openspec/changes/archive/2026-03-27-dps-test-reorganization-and-coverage/design.md | Archived design decisions and trade-offs for the change. |
| openspec/changes/archive/2026-03-27-dps-test-reorganization-and-coverage/.openspec.yaml | Archive metadata for the change package. |
|
|
||
| #### Scenario: Unsupported variations are explicitly skipped | ||
| - **WHEN** uma variação de `FillingVariations` não é suportada por um provider | ||
| - **THEN** MUST ser documentada com `[Skip]` e motivo explícito |
There was a problem hiding this comment.
The spec requires using [Skip] to document unsupported filling variations, but xUnit doesn’t provide a [Skip] attribute. To keep this actionable/accurate, describe skipping via [Fact(Skip = "reason")] / [Theory(Skip = "reason")] (or whatever the project standard is) instead of [Skip].
| - **THEN** MUST ser documentada com `[Skip]` e motivo explícito | |
| - **THEN** MUST ser documentada com `[Fact(Skip = "motivo")]` ou `[Theory(Skip = "motivo")]` e motivo explícito |
|
|
||
| ### Requirement: Provider XML generation test coverage with XSD validation | ||
|
|
||
| Cada provider configurado MUST ter uma suite de testes que valide a geração XML end-to-end com validação contra XSD do provider. Os testes MUST usar `ShouldBeValidAgainstProviderSchema(xsdDir)` para providers ABRASF e `ShouldBeValidAgainstDpsSchema()` para nacional. A cobertura MUST se estender a todos os 7 providers (nacional, abrasf, gissonline, issnet, paulistana, simpliss, webiss), não apenas aos MVP providers. |
There was a problem hiding this comment.
Spelling: in Portuguese this should be "suíte" (with accent) instead of "suite" to match the terminology used elsewhere in the specs.
|
|
||
| ### Requirement: Provider test isolation | ||
|
|
||
| Testes de cada provider MUST ser independentes e não compartilhar estado mutável. Cada suite de testes de provider MUST poder executar isoladamente. |
There was a problem hiding this comment.
Spelling: use "suíte" (with accent) instead of "suite" for consistency with the rest of the documentation.
| Testes de provider não MUST ser limitados a validação de schema. MUST incluir validações de conteúdo XML para campos críticos. | ||
|
|
There was a problem hiding this comment.
The phrase "não MUST" is ambiguous/inconsistent with the RFC-style keywords used elsewhere in this repo (e.g., "MUST NOT" in openspec/specs/nfse-runtime-xml-serializer/spec.md:29). Consider rewriting to "MUST NOT" (or plain Portuguese like "não deve") to keep the requirement unambiguous.
| - **WHEN** testes de múltiplos providers executam em paralelo | ||
| - **THEN** não MUST haver race condition ou estado compartilhado mutável |
There was a problem hiding this comment.
Same as above: "não MUST haver" should be expressed as "MUST NOT haver" (or "não deve haver") for consistency with the normative language used in other specs.
|
|
||
| #### Scenario: Provider tests have no shared mutable state | ||
| - **WHEN** testes de múltiplos providers executam em paralelo | ||
| - **THEN** não MUST haver race condition ou estado compartilhado mutável |
There was a problem hiding this comment.
Same as above: "não MUST haver" should be expressed as "MUST NOT haver" (or "não deve haver") for consistency with the normative language used in other specs.
| - **THEN** não MUST haver race condition ou estado compartilhado mutável | |
| - **THEN** MUST NOT haver race condition ou estado compartilhado mutável |
| - **THEN** o arquivo MUST residir sob `IntegrationsTests/Providers/<ProviderName>/` | ||
|
|
||
| #### Scenario: Consistent naming between unit and integration | ||
| - **WHEN** existe um teste unitário para o provider X em `UnitTests/Providers/X/` | ||
| - **THEN** o teste de integração correspondente MUST estar em `IntegrationsTests/Providers/X/` |
There was a problem hiding this comment.
This requirement mandates per-provider integration test subfolders (IntegrationsTests/Providers/<ProviderName>/), but the archived tasks for this change explicitly keep ProviderEndToEndFlowTests.cs monolithic under IntegrationsTests/Providers/ (tasks.md:17). Either relax this requirement to allow a shared provider E2E test file, or update the archived tasks/design to match the intended per-provider split.
| - **THEN** o arquivo MUST residir sob `IntegrationsTests/Providers/<ProviderName>/` | |
| #### Scenario: Consistent naming between unit and integration | |
| - **WHEN** existe um teste unitário para o provider X em `UnitTests/Providers/X/` | |
| - **THEN** o teste de integração correspondente MUST estar em `IntegrationsTests/Providers/X/` | |
| - **THEN** o arquivo MUST residir sob `IntegrationsTests/Providers/<ProviderName>/`, **EXCEPT** quando fizer parte de um fluxo E2E cross-provider compartilhado documentado (por exemplo, `IntegrationsTests/Providers/ProviderEndToEndFlowTests.cs`) | |
| #### Scenario: Consistent naming between unit and integration | |
| - **WHEN** existe um teste unitário para o provider X em `UnitTests/Providers/X/` | |
| - **THEN** o teste de integração correspondente MUST estar em `IntegrationsTests/Providers/X/`, ou ser coberto por um arquivo de fluxo E2E cross-provider compartilhado (`IntegrationsTests/Providers/ProviderEndToEndFlowTests.cs`) |
| - **THEN** MUST ser documentada com `[Skip]` e motivo explícito | ||
| - **AND** não deve falhar silenciosamente |
There was a problem hiding this comment.
The spec requires using [Skip] to document unsupported filling variations, but xUnit doesn’t provide a [Skip] attribute. To keep this actionable/accurate, describe skipping via [Fact(Skip = "reason")] / [Theory(Skip = "reason")] (or whatever the project standard is) instead of [Skip].
| - **THEN** MUST ser documentada com `[Skip]` e motivo explícito | |
| - **AND** não deve falhar silenciosamente | |
| - **THEN** MUST ser documentada usando o atributo de skip do teste (por exemplo, `[Fact(Skip = "motivo")]` ou `[Theory(Skip = "motivo")]`) com motivo explícito | |
| - **AND** a variação MUST ser marcada como ignorada explicitamente e não deve falhar silenciosamente |
|
|
||
| #### Scenario: Consistent naming between unit and integration | ||
| - **WHEN** existe um teste unitário para o provider X em `UnitTests/Providers/X/` | ||
| - **THEN** o teste de integração correspondente MUST estar em `IntegrationsTests/Providers/X/` |
There was a problem hiding this comment.
This requirement mandates per-provider integration test subfolders (IntegrationsTests/Providers/<ProviderName>/), but the archived tasks for this same change explicitly keep ProviderEndToEndFlowTests.cs monolithic under IntegrationsTests/Providers/ (tasks.md:17). Either relax the requirement to allow a shared provider E2E test file, or update the archived tasks/design to match the intended per-provider split.
| #### Scenario: Consistent naming between unit and integration | |
| - **WHEN** existe um teste unitário para o provider X em `UnitTests/Providers/X/` | |
| - **THEN** o teste de integração correspondente MUST estar em `IntegrationsTests/Providers/X/` | |
| - **OR** pode fazer parte do arquivo compartilhado `IntegrationsTests/Providers/ProviderEndToEndFlowTests.cs` que agrega fluxos E2E de múltiplos providers | |
| #### Scenario: Consistent naming between unit and integration | |
| - **WHEN** existe um teste unitário para o provider X em `UnitTests/Providers/X/` | |
| - **THEN** o teste de integração correspondente MUST estar em `IntegrationsTests/Providers/X/` **OU** implementado como cenário específico de X dentro de `ProviderEndToEndFlowTests.cs` |
|
|
||
| ### Requirement: Provider test isolation | ||
|
|
||
| Testes de cada provider MUST ser independentes e não compartilhar estado mutável. Cada suite de testes de provider MUST poder executar isoladamente. |
There was a problem hiding this comment.
Spelling: use "suíte" (with accent) instead of "suite" for consistency with the rest of the documentation.



…pecs
Archive the completed change and sync delta specs to main specs: