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

moonbitlang / core / 6846
89%

Build:
DEFAULT BRANCH: main
Ran 27 Sep 2026 02:29AM UTC
Jobs 1
Files 448
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

27 Sep 2026 02:26AM UTC coverage: 89.605% (-0.1%) from 89.74%
6846

push

github

bobzhang
docs(string): require String and StringView to be well-formed UTF-16

State the contract that every `String` and `StringView` must be
well-formed UTF-16: each surrogate is part of a pair and no view starts
or ends between the halves of a pair. The checked APIs (`exact_view`,
`get_view`, clamping `s[i:j]`) enforce it; unchecked ones (`view`,
`unsafe_to_char`, the private `make_view`) leave it to the caller, and
behaviour on ill-formed strings is unspecified. Library code may rely on
it without re-checking, as the SIMD `escape_to` does when it copies
unescaped runs with `make_view`.

- string/DESIGN.mbt.md, string/README.mbt.md: document the contract;
  `view` is not deprecated (the compiler's lexmatch lowering uses it), it
  takes raw offsets and its caller must not split a pair; drop the
  promises about displaying or passing through unpaired surrogates.
- builtin/stringview.mbt: document `make_view`'s obligations, reconcile
  the `String::view`/`StringView::view` docs with the contract, and drop
  the unpaired-surrogate pass-through notes from `clamped_view` and
  `split_at`.
- builtin/show.mbt: name the contract in the SIMD `escape_to` comment.
- escape tests: use only well-formed inputs (whole surrogate pairs,
  `exact_view` instead of `view`, pairs decoded into one `Char` rather
  than passing surrogate halves to `unsafe_to_char`).

Codex review: four rounds; blockers were the wrong "deprecated `view`"
claim, stating the invariant as a fact rather than a contract, tests
passing surrogate halves to `unsafe_to_char` (UB), and older docs
promising behaviour for unpaired surrogates. All resolved.

Signed-off-by: Codex CLI <codex@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

16550 of 18470 relevant lines covered (89.6%)

316622.59 hits per line

Coverage Regressions

Lines Coverage ∆ File
32
66.67
-26.67% builtin/show.mbt
Jobs
ID Job ID Ran Files Coverage
1 6846.1 27 Sep 2026 02:29AM UTC 448
89.6
GitHub Action Run
Source Files on build 6846
  • Tree
  • List 448
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • a0f3d616 on github
  • Prev Build on main (#6843)
  • Next Build on main (#6850)
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