Repository navigation
feat: version NT009 domains and publish review-only DPS XML preview (#95) - #100
Merged
Merged
Conversation
…rsions Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…al XLSX Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…y in CI Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
… legacy output Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…gacy isolation Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…ypes Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…ates Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…rsion Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…outs Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…icial manifest Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
vitormattos
marked this pull request as ready for review
October 9, 2026 01:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #95 — NT009 v1.01, source-verified implementation and unresolved deployment gate
Review scope: versioned offline domain access, full normative field-diff evidence, a strictly opt-in non-emitting structural preview, and reproducible official XSD package comparison. This PR does not close #95 and does not activate an unsupported production or restricted-production emitter.
Completed and directly verified
OfficialDomainCatalog::operationIndicator($code, $version)andhasOperationIndicator($code, $version)support explicit Annex C v1.01 (26 codes) or Annex VII v1.03.00 (40 codes). The original one-argument default and existing behavior are unchanged. All 40 exact triplets remain from PRs refactor: replace Python domain utilities with isolated PHP tooling #97/feat: audit official NT009 indicators and layout evidence in PHP (#95) #99.resources/contracts/nt009-dps-v1.04.01-matrix.tsv: every included XML path, original/new source row, kind, datatype, cardinality, length, description and condition, from checksum-pinned official Anexo I (production, 2026-02-09) and Anexo VI (NT009). Counts: 168 unchanged, 38 modified, 135 added, 109 removed/moved.composer domains:contract-matrixrecreates the complete file, checked byte-for-byte by the NT009 CI job.XmlBuilder::previewNt009Dps(DpsData, Nt009DpsPreviewData): Nt009DpsPreview, an explicitly non-emitting typed preview, leavingXmlBuilder::buildDps(), theDpsDataconstructor,NfseClient::emit()and the old productionDpsSchemaValidatoruntouched.finNFSe,tpNFSeDebito,tpNFSeCredito,indDest,regApIBSCBSSN,IBSCBS/indFinal,cIndOp,CST,cClassTrib,gIBSCBSandgIBSCBSAjuste, with externally verifiedind_gIBSCBS. PHPUnit proves old output unchanged, structural paths, omissions, invalid combinations, official Annex VII code lookup and the rejection of NT009 preview XML by the old production XSD. No restrictive correlation is inferred from consultative Annex VIII.resources/domains/sources.json:20260209:e7935cbd9470527c6cc32984c1b2263e614183bf0139ce2733eaaed2de9a807220260727:6c7e0510d3ecff4454f291f4e10b742d27a4818f23aab181494f96d0ea79f3dcdocs/NT009-CONTRACT-IMPLEMENTATION.mdcontains source provenance, representative hierarchy diffs, reproducibility instructions, explicit preview API and migration boundaries. It identifiesakaunting-nfse's existing pindev-main#f179d7f723bec80f5b19a25dfbc385a612c2447f, itsRuntimeDpsFactory,InvoiceDpsBuilderandIssueInvoiceNfse, and why the consumer must not be updated before a validated new emitting contract exists.Critical unresolved official blockers
gIBSCBSAjustedirectly beneathtrib, whereas the newer Anexo VI v1.04.01 worksheet places it undertrib/gIBSCBS(source row 428). The preview follows the worksheet only for review; this conflict requires authoritative XSD clarification.vAjusteBC, recipientdest,gPgtoVinc,imovel,bensMoveis,condominiosand other complex conditional groups. It cannot be used for issuance. An accepted official XSD and correct applicable environment are prerequisites to an approved versioned emission API.ind_gIBSCBSrules must be verified independently, without enforcing advisory Annex VIII.See government RTC: https://www.gov.br/nfse/pt-br/biblioteca/documentacao-tecnica/rtc , production: https://www.gov.br/nfse/pt-br/biblioteca/documentacao-tecnica/documentacao-atual , restricted: https://www.gov.br/nfse/pt-br/biblioteca/documentacao-tecnica/producao-restrita .
CI & review
PHPUnit, Psalm, PHP CS Fixer, minimum dependency gates, REUSE, offline domain-tool tests, 5 production TSV snapshots, complete 40-indicator comparison and the entire 450-row normative matrix have passed on this feature branch. The actual official XSD ZIP comparison job has also passed after baselining and fixing duplicate filenames in distinct directory trees. Confirm all checks on the latest commit before approving.
Do not merge without the maintainer's explicit authorization. Do not close issue #95 or claim fiscal conformity.