Skip to content

Bump GOBL to v0.507.0 and refresh addon modules - #57

Merged
samlown merged 3 commits into
mainfrom
bump-gobl-v0.507.0
Sep 17, 2026
Merged

samlown merged 3 commits into
mainfrom
bump-gobl-v0.507.0

Conversation

@samlown

@samlown samlown commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Upgrades the core GOBL requirement to v0.507.0 and moves every addon module to its latest release.

Version changes

Module From To Built against
gobl 0.505.0 0.507.0 —
gobl.br.nfse 0.0.1 0.0.2 0.502.2
gobl.dk.oioubl 0.0.1 0.0.6 0.504.0
gobl.mx.cfdi 0.63.0 0.64.0 0.507.0
gobl.pt.saft 0.0.6 0.0.7 0.507.0
gobl.pl.ksef — 0.45.0 (new) 0.507.0

br.nfe (0.0.4), fi.finvoice (0.0.2), fr.ctc (0.0.8), it.sdi (0.77.0) and sa.zatca (0.0.4) were already at their latest releases.

Incompatibilities resolved

New approved addon pl-favat-v3. GOBL 0.507.0 adds Poland's KSeF addon to its approved list, so TestApprovedAddonsAvailable failed. Added gobl.pl.ksef plus its blank import in bundle/bundle.go. Note this is the one bump that isn't a straight upgrade — v0.44.0 and earlier target gobl 0.402.0; only v0.45.0 is built for 0.507.0.

org/unit schema deregistered upstream. TestBulk/schemas failed because 0.507.0 drops Unit("") from schema.Register and unitRules() from the rules registry in org/org.go. This is a deliberate upstream removal, so the stale entry is removed from the expected schema list.

Verification

  • go build ./..., go vet ./... and the full test suite pass; the WASM target (GOOS=js GOARCH=wasm) builds.
  • All 12 approved addons register, including pl-favat-v3.
  • Several addons still target older GOBL lines (sa.zatca on 0.500.0, br.nfe/br.nfse on 0.502.2), so I built all 166 example and test documents shipped by the nine addon modules through the CLI against the upgraded stack — 166 pass, 0 fail. The older-line addons execute their rule engines correctly, so the lag is benign.
  • next-version.sh computes v0.507.0, so release versioning follows automatically.

Left out of scope

  • gobl.ubl stays at v0.64.0 (v0.74.0 exists). It's a graph-only requirement from gobl.dk.oioubl@v0.0.6 — not in go.mod, not compiled in, and go mod why confirms the main module doesn't need it.
  • Non-GOBL deps have updates available (popui.go, mcp-go, templ, icons). Unrelated to this upgrade, and mcp-go crosses a major version, so they're better handled separately.

🤖 Generated with Claude Code

Upgrade the core GOBL requirement to v0.507.0 and move every addon module
to its latest release:

  gobl.br.nfse   v0.0.1  -> v0.0.2
  gobl.dk.oioubl v0.0.1  -> v0.0.6
  gobl.mx.cfdi   v0.63.0 -> v0.64.0
  gobl.pt.saft   v0.0.6  -> v0.0.7

Two upstream changes needed handling:

GOBL 0.507.0 adds pl-favat-v3 to its approved addon list, so the bundle
registration test failed. Add gobl.pl.ksef and its blank import. Only
v0.45.0 is built against 0.507.0; v0.44.0 and earlier target gobl 0.402.0.

GOBL 0.507.0 also deregisters the org/unit schema — Unit("") is dropped
from schema.Register and unitRules() from the rules registry in
org/org.go. Remove the now-stale entry from the expected schema list.

Verified by building all 166 example and test documents shipped by the
nine addon modules against the upgraded stack. Several addons still
target older GOBL lines (sa.zatca on 0.500.0, br.nfe/br.nfse on 0.502.2)
but execute correctly, so the lag is benign.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@codecov-commenter

codecov-commenter commented Sep 16, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.95652% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.56%. Comparing base (1393401) to head (fb59400).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
internal/ops/addons.go 86.66% 1 Missing and 1 partial ⚠️
api/addons.go 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #57      +/-   ##
==========================================
- Coverage   72.58%   72.56%   -0.02%     
==========================================
  Files          47       48       +1     
  Lines        1988     1994       +6     
==========================================
+ Hits         1443     1447       +4     
- Misses        465      467       +2     
  Partials       80       80              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

samlown and others added 2 commits September 17, 2026 11:25
GET /v0/addons/{key} returned 404 for every addon implemented in its own
module — mx-cfdi-v4, it-sdi-v1, pt-saft-v1, sa-zatca-v1, br-nfe-v4,
br-nfse-v1, dk-oioubl-v2, fi-finvoice-v3 and the three fr-ctc flows.

The handler read addons/<key>.json from core GOBL's embedded data
directory. Addons that moved out to their own modules register themselves
via init() when the bundle blank-imports them, but ship no file in that
directory, so only the addons still compiled into core resolved. The list
endpoint meanwhile reads the in-memory registry, so /v0/addons advertised
25 addons of which 12 could not be fetched.

Render the definition from the registry instead, via a new
ops.AddonData helper shared by the API and MCP server. This mirrors what
core GOBL's addons/generate.go does to produce those files, so output for
the addons still in core is byte-for-byte identical.

The same read was duplicated in the MCP addon tool and the
gobl://addons/{key} resource, and the gobl://addons resource listed the
embedded directory rather than the registry; all now go through the
helper.

Tests assert the invariant that broke — everything the registry reports
must be retrievable — so an addon moving out of core cannot regress this
again. They cover the API endpoint, both MCP paths, and the helper, and
the test packages now blank-import the bundle as the real binaries do;
without it no externally-implemented addon is registered and the gap is
invisible, which is how this shipped.

One deliberate behaviour change: /v0/addons/pl-favat-v2 no longer
resolves. It was a stale file left in core GOBL 0.505's data directory
for an addon that is not registered, so it was never listed by /v0/addons
and could not be used in a document's $addons. It is absent from core
GOBL 0.507 entirely.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Serve addon definitions from the registry, not embedded data
@samlown
samlown merged commit 29b37dd into main Sep 17, 2026
2 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.

2 participants