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

source-academy / py-slang / 28920042345
78%

Build:
DEFAULT BRANCH: main
Ran 08 Jul 2026 05:38AM UTC
Jobs 1
Files 87
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 Jul 2026 05:33AM UTC coverage: 77.363% (+0.1%) from 77.236%
28920042345

push

github

web-flow
Fix CSE Machine visualizer display bugs: position-0 node mislabeling, verbose builtin display (#230)

* Fix CSE Machine mislabeling real nodes at source position 0 as synthetic

serializeControlItem inferred "synthetic runtime-generated node" (e.g.
implicit range() start/step bounds) from indexInSource being pinned to
0, but a real node whose token is literally the first token of the
source also has indexInSource 0. Single-token leaf nodes (Identifier,
bare Literal) at that position were misclassified and rendered with a
generic KIND_LABEL fallback and no line metadata instead of their real
text — e.g. `print(1)` on line 1 showed the callee as "var" instead of
"print" at the step it's pushed onto control, while the identical code
one line down rendered correctly.

Fix: mark runtime-fabricated tokens with an explicit `synthetic` flag
on Token instead of inferring syntheticness from position, and check
that flag in serializeControlItem.

Fixes #228.

* Show builtin function name only on CSE Machine stash, not full repr()

formatValue()'s "builtin" case rendered the same verbose Python-repr()
string used for actual print()/repr() output (<built-in function xxx>),
unlike every other callable value in the visualizer: closures already
show just their bare name (funcName / "lambda"), with the "this is a
function" fact carried separately via `label`/metadata rather than
baked into the display string.

Bring builtins in line with that: formatValue() now returns just the
name, and typeTranslator() gains a "builtin" case
("builtin_function_or_method", matching CPython's
type(print).__name__) so `label` still distinguishes builtins from
user-defined closures ("function") without parsing the display text.

Scoped to the CSE Machine's own serialization layer
(PyCseMachinePlugin.ts / types.ts) only — src/utils/stringify.ts and
src/stdlib/utils.ts, which produce real Python repr()/print() output,
are untouched.

Fixes #229.

* Address review feedback: dedupe typeTran... (continued)

2602 of 3643 branches covered (71.42%)

Branch coverage included in aggregate %.

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

6106 of 7613 relevant lines covered (80.2%)

14070.68 hits per line

Jobs
ID Job ID Ran Files Coverage
1 28920042345.1 08 Jul 2026 05:37AM UTC 87
77.36
GitHub Action Run
Source Files on build 28920042345
  • Tree
  • List 87
  • Changed 5
  • Source Changed 5
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #28920042345
  • 9f6df225 on github
  • Prev Build on main (#28910718226)
  • Next Build on main (#28924131249)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc