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

moonbitlang / core / 4492
94%

Build:
DEFAULT BRANCH: main
Ran 25 May 2026 10:44AM UTC
Jobs 1
Files 369
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 May 2026 10:43AM UTC coverage: 94.078% (-0.01%) from 94.089%
4492

push

github

bobzhang
docs(json): document safe-int precondition; add defensive scan.exponent==0 guard

Address review feedback on the safe-int fast path:

  1. Spell out the precondition that lets the fast path reuse
     scan.mantissa directly: scan_json_number sets is_integer iff no
     '.' and no 'e/E' are seen, which structurally forces
     scan.exponent == 0L and makes scan.mantissa exactly the unsigned
     absolute value.

  2. Add an explicit scan.exponent == 0L check so the invariant is
     local to the call site. A future change to is_integer's
     definition cannot silently make this branch return an unscaled
     value: such cases now fall through to lex_integer_end.

  3. Note that the reinterpret_as_uint64 / reinterpret_as_int64 pair
     is value-preserving here because the mantissa is bounded by 2^53
     - 1, well inside the [0, 2^63) overlap of Int64+ and UInt64.

Tests still pass on all four targets (6500 / 6500 / 6459 / 6411).

14918 of 15857 relevant lines covered (94.08%)

207278.65 hits per line

Coverage Regressions

Lines Coverage ∆ File
2
86.21
-1.18% json/lex_number.mbt
Jobs
ID Job ID Ran Files Coverage
1 4492.1 25 May 2026 10:44AM UTC 370
94.09
GitHub Action Run
Source Files on build 4492
  • Tree
  • List 369
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • eacbd536 on github
  • Prev Build on main (#4490)
  • Next Build on main (#4497)
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