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

moonbitlang / core / 6520
89%

Build:
DEFAULT BRANCH: main
Ran 03 Sep 2026 06:13AM UTC
Jobs 1
Files 442
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

03 Sep 2026 06:10AM UTC coverage: 90.841% (+0.001%) from 90.84%
6520

push

github

bobzhang
refactor(deque): skip the survivor shift on a tail drain, tighten two comments

Follow-up to #4189 from its review.

`Deque::drain` handled a drain ending at the end of the front run with one
`else` arm: shift the front survivors right by the drained length and advance
`head`. That is needed when something survives after the drained range -- the
rest of the front, or a non-empty back run -- so the survivors stay contiguous
with it. When the deque is unwrapped and the drain takes its tail, nothing
survives after the range, the survivors already sit at `[head, head + start)`,
and the shift was O(start) work that moved every survivor one slot for no
reason. The arm is now guarded on `len < front_max_drain || back.length() != 0`
and the tail case falls through with `head` untouched.

A new test pins the behaviour through a view taken before the drain: with the
survivors left in place the view still reads them at their original offsets,
whereas the old shift made it read the first survivor twice. Reverting the
guard fails that test and nothing else.

Two comments in `clear` and `truncate` called "an emptied deque restarts at
offset zero" an invariant. It is not one: `pop_front` and `extract_if` can
empty a deque without resetting `head`, and nothing depends on it. They now say
the three functions arrange it, which is what they do.

Also adds a `release_unused` test where the unused capacity sits on both sides
of an unwrapped run, so each of the two `fill_slots` calls in the unwrapped
branch is pinned by a test on its own.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WjN1QF3HbJohHocMPBRcuw

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

16543 of 18211 relevant lines covered (90.84%)

274509.2 hits per line

Jobs
ID Job ID Ran Files Coverage
1 6520.1 03 Sep 2026 06:13AM UTC 443
90.86
GitHub Action Run
Source Files on build 6520
  • Tree
  • List 442
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • bc4bb122 on github
  • Prev Build on main (#6519)
  • Next Build on main (#6521)
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