• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

vocdoni / saas-backend / 28188283899
63%

Build:
DEFAULT BRANCH: main
Ran 25 Jun 2026 05:31PM UTC
Jobs 1
Files 113
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

25 Jun 2026 05:24PM UTC coverage: 62.203% (+0.1%) from 62.083%
28188283899

push

github

web-flow
fix(api): resolve election metadata from a stored reference on GET /process/{id} (#553)

* fix(api): resolve election metadata from a stored reference on GET /process/{id}

The Vochain node only resolves ipfs:// metadata pointers, so the https
/storage pointer this service publishes is never resolved downstream and the
election metadata goes missing.

Store a generic reference (Process.MetadataURL) and resolve it on read:
- our own object storage (matched first, works even when serverURL is empty) ->
  read locally;
- ipfs:// -> resolve via the Vochain, then cache locally and promote the
  reference so later reads stay local;
- other http(s) -> best-effort external fetch (3s timeout, 1 MiB cap).

The reference is bootstrapped from the on-chain pointer when missing (covers
pre-existing/external processes, no migration). Resolution is best-effort: any
error logs and returns the stored value. Drafts (no on-chain address) keep
their stored metadata map.

* fix(api): cache externally-fetched metadata too, not just ipfs

Metadata is immutable (a change is a republish through this API), so the
external http(s) case is as safe to cache as ipfs. Unify both remote branches:
any remotely-resolved document is stored locally and the reference promoted, so
later reads resolve from our own storage with no external/Vochain round-trip.

* fix(api): address Copilot review on metadata resolution

- match relative /storage/ references and trim a trailing slash from serverURL
  so local resolution survives a serverURL change/misconfig. This lives in
  objectstorage (Client.LocalName / Client.LocalURL) so URL parse+format stay
  with the storage layer, not the api package.
- persist the promoted reference with a targeted SetProcessMetadataURL ($set
  metadataURL only) instead of a full SetProcess rewrite, so the read path can't
  clobber concurrent updates to other process fields.
- add tests: fetchExternalMetadata (ok/non-200/over-cap) and the remote->local
  cache+promot... (continued)

91 of 119 new or added lines in 4 files covered. (76.47%)

9909 of 15930 relevant lines covered (62.2%)

44.47 hits per line

Uncovered Changes

Lines Coverage ∆ File
20
53.03
3.15% api/process.go
6
76.5
-1.22% db/process.go
2
83.17
4.0% objectstorage/objectstorage.go
Jobs
ID Job ID Ran Files Coverage
1 28188283899.1 25 Jun 2026 05:31PM UTC 113
62.2
GitHub Action Run
Source Files on build 28188283899
  • Tree
  • List 113
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • d75beba4 on github
  • Prev Build on main (#28178332752)
  • Next Build on main (#28234317268)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc