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

source-academy / py-slang / 29975077250
86%

Build:
DEFAULT BRANCH: main
Ran 23 Jul 2026 02:53AM UTC
Jobs 1
Files 114
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

23 Jul 2026 02:42AM UTC coverage: 86.43% (-0.001%) from 86.431%
29975077250

push

github

web-flow
py2js: fix stdlib builtin errors surfacing as "[object Object]" (#330)

Closes #295. bridgeBuiltin (stdlibBridge.ts) calls straight into CSE's own
stdlib implementations (misc.ts, math.ts, ...) at the value boundary. When
one of those raises a runtime error -- handleRuntimeError throws a
RuntimeSourceError -- it propagated uncaught all the way to index.ts's
catch blocks, whose `e instanceof Error ? ... : String(e)` fallback always
hit the String(e) branch: RuntimeSourceError implements SourceError, not
extends Error (see errors/errors.ts), so it's a plain object with no
custom toString(), and String() on that is unconditionally
"[object Object]" regardless of whatever real content .message held.

Fixed at the boundary where the CSE-shaped error actually originates:
bridgeBuiltin now catches a thrown RuntimeSourceError and converts it into
a proper Py2JsRuntimeError, using error.constructor.name (TypeError,
IndexError, ZeroDivisionError, ...) as the kind -- none of these error
classes ever set `.name` themselves, so the constructor is the only
reliable source for it -- and the original .message (CSE's own multi-line
formatted diagnostic) as the message. Not attempting to also clean up that
message's synthetic "at line 1" header here -- stdlibBridge.ts's own file
header already documents py2js not having real error locations through
this bridge yet as a separate, pre-existing gap.


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

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>

4385 of 5461 branches covered (80.3%)

Branch coverage included in aggregate %.

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

9455 of 10552 relevant lines covered (89.6%)

178734.31 hits per line

Jobs
ID Job ID Ran Files Coverage
1 29975077250.1 23 Jul 2026 02:53AM UTC 114
86.43
GitHub Action Run
Source Files on build 29975077250
  • Tree
  • List 114
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #29975077250
  • 8fe54901 on github
  • Prev Build on main (#29974161260)
  • Next Build on main (#29976205292)
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