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

datatug / datatug-core / 34380550779
100%

Build:
DEFAULT BRANCH: main
Ran 09 Sep 2026 05:03PM UTC
Jobs 1
Files 111
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

09 Sep 2026 05:03PM UTC coverage: 91.998% (+1.0%) from 90.994%
34380550779

push

github

web-flow
feat(apicontract): schema authority for the Task 12 normative transport (#312)

New pkg/apicontract: Go types mirroring every shared JSON type and envelope
in spec/features/core-investigation-loop/api-contract.md (hub datatug/datatug,
the normative transport appendix), with the exact json:"..." field names -
Scope, SourceRef, TypedValue, PhysicalRef, Fact, Limitation, Binding, Result
(+ Provenance, Recordset, Column), Candidate (+ CandidateTarget, ChainStep,
Ambiguous), ExecutionRequest (+ BindingOriginEntry), AgentInfo, the three
response envelopes, and ErrorEnvelope with the closed ErrorCode set mapped
to exact HTTP statuses. Every type has a Validate() enforcing the appendix's
own stated rules.

DecodeStrict (decode.go) rejects unknown fields (encoding/json's
DisallowUnknownFields), duplicate JSON keys at any nesting level
(encoding/json otherwise silently keeps only the last occurrence), trailing
data, and explicitly named forbidden fields (client-supplied principal/role).
TypedValue's own UnmarshalJSON runs the same duplicate-key check
independently, since it is invoked by encoding/json's machinery whenever
embedded in a larger structure, bypassing any caller's own DecodeStrict call.

pkg/apicontract/fixtures: 40 frozen JSON fixtures (Manifest() returns
name+SHA-256 for each, so server/client can pin an exact set and detect
drift) covering every envelope, every one of the 13 closed error codes,
TypedValue's null/false/zero/large-integer edge cases, empty-array cases,
ambiguous/missing-input Candidate states, a generic-policy/no-visible-names
Limitation (the "omitted unauthorized metadata" case), and a live/snapshot
Result pair. Every fixture round-trips through its Go type byte-for-byte
(json.MarshalIndent, 2-space) and passes its own Validate().

100% statement coverage on both pkg/apicontract and pkg/apicontract/fixtures.


Claude-Session: https://claude.ai/code/session_01TBRZM85u8kayPG3UVHydaz

Co-authored-by: Alexander Trakhimenok <trakhimeno... (continued)

563 of 0 new or added lines in 0 files covered. (NaN%)

4645 of 5049 relevant lines covered (92.0%)

0.92 hits per line

Jobs
ID Job ID Ran Files Coverage
1 34380550779.1 09 Sep 2026 05:03PM UTC 111
92.0
GitHub Action Run
Source Files on build 34380550779
  • Tree
  • List 111
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • eff47b8b on github
  • Prev Build on main (#34379361439)
  • Next Build on main (#34389064767)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc