Skip to content

EN16931 1.3.17 as opt-in, 1.3.16 stays default (v1.2.0) - #11

Merged
euphyra-dev merged 3 commits into
mainfrom
feat/en16931-1.3.17
Oct 18, 2026
Merged

euphyra-dev merged 3 commits into
mainfrom
feat/en16931-1.3.17

Conversation

@euphyra-dev

@euphyra-dev euphyra-dev commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Adds the official ConnectingEurope EN16931 validation-1.3.17 artefacts, published 2026-10-12, as an opt-in; the default stays 1.3.16. The plan is to release this as v1.2.0 and move v1 onto it after merge.

Effective date. The Commission registry lists 1.3.17 as published 12/10/26 and in force from 15/11/26. Until then, 1.3.16 stays the default and version: '1.3.17' opts in. A separate PR (#12) switches the default to 1.3.17 for a v1.3.0 release on 16/11/26.

What changes

  • Vendored XSLT. vendor/en16931-1.3.17/ holds the release XSLT byte for byte (checked with cmp against the zips).

    • CII 0757f07909938b1b297b8356ab7b66406c89f1b342325385d6a2def998c817f0; UBL fc4e6cfa8596bba0c2abd19038a98960c6ee9fc1f44566787c115efd4f4aca7c.
    • The licence text comes from the tag, and XSLT.SHA256SUMS is regenerated.
    • vendor/upstream.json pins validation-1.3.17 for the drift probe, with zip hashes e5f32358… (CII) and bf02a0e3… (UBL).
    • vendor/en16931-1.3.16/ is unchanged and remains the default.
  • Renamed and removed rules. 1.3.17 renames the IGIC and IPSI rules (#519), and not the same way in both syntaxes. This was measured from the vendored XSLT by matching each rule's text across the two releases:

    Rules 1.3.16 1.3.17 CII 1.3.17 UBL
    IGIC (L) BR-AF-01..10 BR-IP-01..10 BR-IG-01..10
    IPSI (M) BR-AG-01..10 BR-IG-01..10 BR-IP-01..10

    It also removes CII-SR-471 (#514), and adds CII-DT-105/106, CII-SR-495..497 and UBL-SR-57..59.

  • fail-on with renamed ids.

    • An id written for the other version no longer fails the job. The Action prints a ::warning naming the id it uses instead, per syntax, and keeps filtering on it. For example fail-on: BR-AF-01 with version: '1.3.17' filters on BR-IP-01 for CII files and BR-IG-01 for UBL files.
    • A 1.3.17 id used with version: '1.3.16' is translated the same way.
    • CII-SR-471 is ignored with a warning under 1.3.17.
    • An id that neither version contains is still a configuration error (exit 2), because it could never fire.
  • Tests.

    • One unit test per case: renamed, 1.3.17 id on 1.3.16, removed, unknown, known, duplicates after translation, modes without ids.
    • A test checks that each rename pair carries the same rule text, per syntax.
    • End-to-end tests on two IGIC invoices built at test time from official examples. They check that fail-on: BR-AF-01 still fails the job on 1.3.17 with the warning, that the filter follows the syntax, and that main() prints the warning.
    • Two mutations were checked: a UBL table copied from CII, and a filter that ignores the translation. The first turns 7 tests red, the second 3.
  • CI. The Action jobs of the self-test (action official, action mutants) now run on both 1.3.16 and 1.3.17, on all three OS.

  • Test data.

    • Official examples are refreshed from 1.3.17; they also pass 1.3.16. Only CII_example3.xml changed upstream: one SpecifiedTradeSettlementPaymentMeans block was removed.
    • The CII_example3 mutant is re-derived from it with the same one-line change (CalculatedAmount 225 → 226).

Measured

Set 1.3.16 (default) 1.3.17 (version: '1.3.17')
10 official examples 0 failed-assert, pass 0 failed-assert, pass
10 mutants exact expected ids (testdata/expected-ids.json) same ids
report-sha256, official d46955b924e88ce203ea39e5498669aa5d3204c22a87cae68f89236718382e0d 5ab42d1f115a524f9ce524f65b8755bfab9cdc750d30d1b35548264716b3b95e
report-sha256, mutants 26b49d80dcf82e0b256a415564cc67bf68362ce2903c2e41d6cf9b79d85050b6 35cb6995e323611b8e774be6b4e59e885bb8ea7b10a330a5d59b8c550c6ab803

The 1.3.16 hashes differ from those of v1.1.2 only because CII_example3.xml is now the 1.3.17 copy.

Mutant Expected ids 1.3.16 1.3.17
CII-BR-CO-10-RoundingIssue.xml BR-01 same same
CII_business_example_01.xml BR-CO-10, BR-CO-13 same same
CII_business_example_02.xml BR-CL-01 same same
CII_business_example_Z.xml BR-CO-09 same same
CII_example1.xml BR-CO-15, BR-CO-16 same same
CII_example3.xml BR-S-09, BR-CO-14 same same
CII_example5.xml BR-02 same same
XRechnung-O.xml CII-DT-097 same same
huf_example_cii.xml BR-CO-17, BR-S-08, BR-S-09 same same
ubl-tc434-creditnote1.xml BR-CO-16 same same

Local results: scripts/selftest.py is green (114 unit tests, determinism, identity gate, supply-chain gate, saxonche==13.0.0).

Docs

  • README:
    • description and Pinning (@v1 → v1.2.0, 1.3.16 by default, 1.3.17 opt-in);
    • a section "EN16931 1.3.17: opt-in until 15/11/26" with the rename table and the fail-on behaviour;
    • inputs, reproducibility table and an opt-in example.
  • action.yml: the version default is 1.3.16. The Marketplace description is "Run the official EN16931 1.3.16 XSLT (1.3.17 opt-in) on Factur-X / ZUGFeRD CII XML and UBL XML; fail on svrl:failed-assert." (123 characters).
  • Also updated: NOTICE, LICENSE, SECURITY, RELEASE_AND_RULESET, the example workflow (no version: line, so it follows the default), and the testdata READMEs.

After merge (not in this PR)

  1. Annotated tag v1.2.0 on the merge commit.
  2. Consumer check of @v1.2.0 from a throwaway branch (expected hashes above, both versions), then delete the branch.
  3. Move v1.
  4. Publish the v1.2.0 release to the Marketplace.
  5. A one-line README follow-up that replaces <full-commit-sha> with the real SHA.

Vendor the official ConnectingEurope validation-1.3.17 XSLT unmodified
(CII 0757f079…, UBL fc4e6cfa…) next to 1.3.16 and make 1.3.17 the
default `version`. A workflow that sets `version: '1.3.16'` keeps the
previous rules.

1.3.17 renames BR-AF-* to BR-IP-* and BR-AG-* to BR-IG-* (upstream
#519) and removes CII-SR-471 (#514). A `fail-on` id that the selected
XSLT does not contain could never fire; it is now a configuration error
(exit 2) that names the replacement, e.g. "BR-AF-05 (renamed BR-IP-05
in 1.3.17)".

Official examples refreshed from 1.3.17 (only CII_example3.xml changed
upstream); the CII_example3 mutant is re-derived from it with the same
one-line change. All ten mutants still fail with exactly the expected
ids, on 1.3.17 and on 1.3.16. New report hashes: official 5ab42d1f…,
mutants 35cb6995…. vendor/upstream.json pins validation-1.3.17.
The Commission registry lists EN16931 1.3.17 as effective from
15/11/26, so v1.2.0 keeps 1.3.16 as the default and offers 1.3.17 as
an opt-in (`version: '1.3.17'`). The default switches in a later
release.

A fail-on id renamed by 1.3.17 no longer fails the job: the Action
prints a ::warning with the id it uses instead and keeps filtering on
it. The rename is not the same in both syntaxes (IGIC became BR-IP in
CII and BR-IG in UBL, IPSI the reverse), so translation is per syntax,
and the test now checks that each pair carries the same rule text.
CII-SR-471 is ignored with a warning under 1.3.17; an id that neither
version contains is still a configuration error.

The Action jobs of the self-test now run both versions, and the
cross-OS test pins the report hashes for each.
@euphyra-dev euphyra-dev changed the title EN16931 1.3.17 by default (1.3.16 still selectable); refuse fail-on ids that cannot fire EN16931 1.3.17 as opt-in, 1.3.16 stays default (v1.2.0) Oct 18, 2026
@euphyra-dev
euphyra-dev merged commit 172c8b8 into main Oct 18, 2026
40 checks passed
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.

1 participant