Skip to content

chore: archive dps-test-reorganization-and-coverage change and sync s…#92

Merged
john182 merged 1 commit into
masterfrom
chore/archive-dps-test-reorganization
Mar 28, 2026
Merged

chore: archive dps-test-reorganization-and-coverage change and sync s…#92
john182 merged 1 commit into
masterfrom
chore/archive-dps-test-reorganization

Conversation

@john182

@john182 john182 commented Mar 28, 2026

Copy link
Copy Markdown
Owner

…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/

…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>
Copilot AI review requested due to automatic review settings March 28, 2026 00:05
@john182
john182 merged commit 6701fe2 into master Mar 28, 2026
2 of 3 checks passed
@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Copilot AI Mar 28, 2026

Copy link

Choose a reason for hiding this comment

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

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].

Suggested change
- **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

Copilot uses AI. Check for mistakes.

### 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.

Copilot AI Mar 28, 2026

Copy link

Choose a reason for hiding this comment

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

Spelling: in Portuguese this should be "suíte" (with accent) instead of "suite" to match the terminology used elsewhere in the specs.

Copilot uses AI. Check for mistakes.

### 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.

Copilot AI Mar 28, 2026

Copy link

Choose a reason for hiding this comment

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

Spelling: use "suíte" (with accent) instead of "suite" for consistency with the rest of the documentation.

Copilot uses AI. Check for mistakes.
Comment on lines +77 to +78
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.

Copilot AI Mar 28, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment on lines +98 to +99
- **WHEN** testes de múltiplos providers executam em paralelo
- **THEN** não MUST haver race condition ou estado compartilhado mutável

Copilot AI Mar 28, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.

#### 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

Copilot AI Mar 28, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Suggested change
- **THEN** não MUST haver race condition ou estado compartilhado mutável
- **THEN** MUST NOT haver race condition ou estado compartilhado mutável

Copilot uses AI. Check for mistakes.
Comment on lines +32 to +36
- **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/`

Copilot AI Mar 28, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Suggested change
- **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`)

Copilot uses AI. Check for mistakes.
Comment on lines +72 to +73
- **THEN** MUST ser documentada com `[Skip]` e motivo explícito
- **AND** não deve falhar silenciosamente

Copilot AI Mar 28, 2026

Copy link

Choose a reason for hiding this comment

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

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].

Suggested change
- **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

Copilot uses AI. Check for mistakes.
Comment on lines +33 to +36

#### 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/`

Copilot AI Mar 28, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Suggested change
#### 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`

Copilot uses AI. Check for mistakes.

### 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.

Copilot AI Mar 28, 2026

Copy link

Choose a reason for hiding this comment

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

Spelling: use "suíte" (with accent) instead of "suite" for consistency with the rest of the documentation.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants