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

moonbitlang / core / 6580
89%

Build:
DEFAULT BRANCH: main
Ran 08 Sep 2026 03:42AM UTC
Jobs 1
Files 445
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

08 Sep 2026 03:39AM UTC coverage: 89.27% (+0.03%) from 89.244%
6580

push

github

bobzhang
feat(builtin): add clamped_view for FixedArray/ReadOnlyArray

Completes the total view variant across the whole family. `FixedArray` mirrors
`Array::clamped_view` through
`unsafe_cast_fixedarray_to_uninitializedarray`; `ReadOnlyArray` delegates to
`FixedArray::clamped_view` via `unsafe_reinterpret_to_fixed_array()`, the same
way its existing `view` and `get_view` delegate.

Contract is unchanged: both offsets are clamped independently into
`[0, length()]`, an inverted range yields an empty view at the clamped `start`,
and the result aliases the backing storage.

Codex CLI review: "No blocking issues in the uncommitted diff. `ReadOnlyArray`
correctly forwards `start` in both arms. Omitting `end` produces exactly the
same bounds as explicitly passing `length()` [...] Clamping guarantees
`0 <= lo <= len` and `0 <= count <= len - lo`; subtraction cannot overflow."

It also spotted a real gap: with the `end=None` arm exercised only at starts 0,
-5 and 100, a `start * 2` mutation there survived the suite. The added test
"clamped_view with `end` omitted forwards `start` unchanged" compares the
omitted-`end` result against an explicit `end=5` across every start in -1..=6,
including `start_offset()`; that mutation now fails 1 test.

Signed-off-by: Codex CLI <codex@openai.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F4N5Hc1TYuJW5oRDTY19Wf

11 of 11 new or added lines in 2 files covered. (100.0%)

8 existing lines in 1 file now uncovered.

16365 of 18332 relevant lines covered (89.27%)

273908.83 hits per line

Coverage Regressions

Lines Coverage ∆ File
8
93.44
0.85% builtin/bytesview.mbt
Jobs
ID Job ID Ran Files Coverage
1 6580.1 08 Sep 2026 03:42AM UTC 446
89.29
GitHub Action Run
Source Files on build 6580
  • Tree
  • List 445
  • Changed 4
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 9d086a3e on github
  • Prev Build on main (#6575)
  • Next Build on main (#6584)
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