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

moonbitlang / core / 6483
89%

Build:
DEFAULT BRANCH: main
Ran 01 Sep 2026 07:04AM UTC
Jobs 1
Files 453
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

01 Sep 2026 07:01AM UTC coverage: 91.002% (+0.001%) from 91.001%
6483

push

github

web-flow
perf(json): fill indent cache incrementally, plus oracle test and common-path benchmarks (#4183)

* perf(json): build indent cache incrementally

Each cached indentation level is now derived from the previous one plus a
single indentation unit, instead of recomputing " ".repeat(indent * level).
This fills the cache in O(indent) per new level rather than O(indent * level),
and removes the `indent * level` product, which overflows Int to a negative
value for a large indent and is then rejected by String::repeat.

Adds an oracle-driven regression test covering indent widths 0..=6 crossed
with nesting depths 0..=12 (spanning both sides of the 8-space cutoff the
pre-cache implementation special-cased), plus compact-path and realistic
shallow-document benchmarks so the common paths are guarded.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014z81qJ5vdYoxZ48JTKCdAy

* refactor(json): use an array pattern for the indent cache tail

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014z81qJ5vdYoxZ48JTKCdAy

* fix(json): do not build the indent unit when no indentation is emitted

Codex review of #4183 caught a regression I introduced: hoisting the
indentation unit to one " ".repeat(indent) per stringify call made
stringify(indent=-1) abort, because String::repeat rejects negative counts,
where main took the compact path. It also allocated a huge unused unit for a
scalar document with a large indent.

The unit is now built inside write_indent, which callers reach only when
indent > 0, and only once per new cache level. Adds regression tests for
non-positive indent and for a huge indent on documents that emit none.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014z81qJ5vdYoxZ48JTKCdAy

* docs(json): correct the complexity claim on the indent cache fill

Codex revi... (continued)

3 of 3 new or added lines in 1 file covered. (100.0%)

16869 of 18537 relevant lines covered (91.0%)

283205.49 hits per line

Jobs
ID Job ID Ran Files Coverage
1 6483.1 01 Sep 2026 07:04AM UTC 454
91.02
GitHub Action Run
Source Files on build 6483
  • Tree
  • List 453
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 2c2286d5 on github
  • Prev Build on main (#6471)
  • Next Build on main (#6487)
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