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

moonbitlang / core / 6617
89%

Build:
DEFAULT BRANCH: main
Ran 12 Sep 2026 06:09AM 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

12 Sep 2026 06:06AM UTC coverage: 89.314% (+0.03%) from 89.28%
6617

push

github

web-flow
feat(encoding): add encoding/percent for RFC 3986 URI components (#4214)

Add `encoding/percent`, a string-to-string percent-encoding codec for URI
components, so applications stop hand-rolling it or shimming JavaScript's
`encodeURIComponent`/`decodeURIComponent` (moonbitlang/openseek#1408).

- `encode` converts the text to UTF-8 and escapes every byte outside the
  RFC 3986 unreserved set as uppercase `%XX`. It walks UTF-16 code units
  itself and replaces unpaired surrogates with U+FFFD, because
  `@utf8.encode` panics on them on the non-JS backends.
- `decode` decodes every `%XX` (either hex case) once, interprets each
  maximal escape run as UTF-8, copies literal code units through unchanged
  (including `+`, BOMs and unpaired surrogates) and raises `Malformed` with
  the whole input on a bad escape or invalid escaped UTF-8.
- `decode_lossy` keeps a malformed `%` literally, resumes at the next code
  unit, and replaces invalid escaped UTF-8 with U+FFFD; it agrees with
  `decode` whenever `decode` succeeds.

Literal spans are sliced with `StringView::view`, which checks bounds but
not surrogate boundaries, so views that split a pair are handled instead of
aborting. Tests cover the ASCII table, UTF-8 boundaries, surrogate cases,
nonzero-offset views, the malformed table from openseek, lossy replacement
counts, and quickcheck properties against an independent UTF-16 repair
oracle. Ten single-point mutations each fail between 2 and 8 of the 24
tests.

Codex CLI review: "No blocking issues found ... An independent
transcription check passed for every code point and surrogate pair."



Claude-Session: https://claude.ai/code/session_01MVKQs2BgHmc3VBDXBU8AgD

Signed-off-by: Codex CLI <codex@openai.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>

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

16441 of 18408 relevant lines covered (89.31%)

273494.8 hits per line

Jobs
ID Job ID Ran Files Coverage
1 6617.1 12 Sep 2026 06:09AM UTC 449
89.33
GitHub Action Run
Source Files on build 6617
  • Tree
  • List 448
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 6e373fa7 on github
  • Prev Build on main (#6615)
  • Next Build on main (#6620)
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