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

eclipse-aascw / aas-core-codegen / 35295170671
90%

Build:
DEFAULT BRANCH: main
Ran 18 Sep 2026 01:28AM UTC
Jobs 3
Files 264
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

18 Sep 2026 01:24AM UTC coverage: 85.776% (+0.03%) from 85.751%
35295170671

push

github

web-flow
Reject non-finite floats in the TypeScript JSON (#716)

JSON knows neither an infinity nor a not-a-number. Up to now the
TypeScript jsonization put a number into the object as it came, leaving
it to `JSON.stringify` to write it out as `null` -- so an infinite or
not-a-number property left the SDK as a JSON document which no longer
said what the instance held. An integer went out unchecked as well,
however large.

As in Python, the TypeScript jsonization had no error channel at all, so
this introduces one. `SerializationError` mirrors the one which
the TypeScript *XML* serialization already has, so that the two sides of
the SDK read alike. Its `path` is a plain string, unlike the structured
`Path` of the de-serialization in this very module: a segment of
the latter carries the JSON value it was read from, and while serializing
there is no such value to carry.

`integerToJsonable` and `numberToJsonable` do the refusing. Mind that
both an integer and a floating-point number are a `number` in TypeScript,
so the former has to ask for `Number.isFinite` *before* it compares
against the range: a not-a-number satisfies neither `<` nor `>`, and
would pass a bare range check unnoticed.

A list of numbers consequently loses its `Array.from` fast path and goes
through `serializeArray`, which now records the index of the item which
is refused. A tuple loses its array literal for the same reason: a literal
has nowhere to record which of its items was refused, so the items are
pushed one by one, and only the ones which can be refused at all are
pushed under a recorded position.

`numberFromJsonable` rejects a non-finite value as well. A conformant
parser can never produce one, but the caller gives us a `JsonValue` which
may have been constructed programmatically.

Only a value which can be refused at all is worth guarding. The
reachability of a number is the same question in every target, so
`collect_ids_of_types_reaching_a_number` and `reaches_a_number` live in
``in... (continued)

111 of 115 new or added lines in 5 files covered. (96.52%)

34656 of 40403 relevant lines covered (85.78%)

2.57 hits per line

Uncovered Changes

Lines Coverage ∆ File
4
94.58
-0.22% aas_core_codegen/intermediate/_types.py
Jobs
ID Job ID Ran Files Coverage
1 3.12 - 35295170671.1 18 Sep 2026 01:31AM UTC 264
85.78
GitHub Action Run
2 3.10 - 35295170671.2 18 Sep 2026 01:31AM UTC 264
85.78
GitHub Action Run
3 3.11 - 35295170671.3 18 Sep 2026 01:31AM UTC 264
85.78
GitHub Action Run
Source Files on build 35295170671
  • Tree
  • List 264
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 3b9833e8 on github
  • Prev Build on main (#35290737109)
  • Next Build on main (#35297640074)
  • 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