MIRROR: javascript for 馃悳's, a tiny runtime with big ambitions
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at master 79 lines 6.2 kB view raw view rendered
1# Technical Debt Tracker 2 3Status: active 4Last reviewed: 2026-04-09 5Owner: theMackabu 6 7Use this file to record debt that is important enough to preserve but not yet 8scheduled. 9 10## Format 11 12- Area: 13- Issue: 14- Impact: 15- Proposed fix: 16- Owner: 17- Status: 18 19## Open Items 20 21- Area: `src/modules/readline.c` 22 - Issue: Rendering assumes readline owns the full visible prompt line, so redraws are anchored to the logical prompt text instead of the terminal position where editing actually begins. 23 - Impact: Full redraw paths can clobber externally rendered prefixes, boxed prompts, or other same-line UI written before `question()` or `prompt()` starts editing. 24 - Proposed fix: Track an explicit render origin / prompt anchor, separate logical prompt text from the screen position where input begins, and make redraws preserve external prefixes and custom prompt chrome. 25 - Status: open 26 27- Area: Silver compiler 28 - Issue: `sv_compiler_t` scratch storage is still allocated per compilation, so repeated compiles in a long-lived process pay allocator churn for locals, bytecode buffers, constants, atoms, upvalue descriptors, loops, srcpos data, and maybe slot-type scratch. 29 - Impact: One-shot CLI compiles are fine, but a REPL, watch mode, embedder, or other long-lived process cannot yet recycle compiler scratch space across compiles. 30 - Proposed fix: Add a real `compile_pool` scratch allocator after the `compile_ctx` extraction. Pool the resizable arrays for `locals`, `local_lookup_heads`, `code`, `constants`, `atoms`, `upval_descs`, `loops`, `srcpos`, and potentially `slot_types`. Keep `line_table` separate or make it poolable scratch, since it is derived from the current source buffer rather than a semantic cache. 31 - Status: backlog 32 33- Area: Shared helper utilities 34 - Issue: Small helper logic such as ASCII character classification, casing, and similar utility code is duplicated across multiple runtime and support modules with local one-off implementations. 35 - Impact: Repeated copies drift over time, make bug fixes harder to apply consistently, and add noise when adding or reviewing new modules. 36 - Proposed fix: Audit duplicated helper patterns across `src/` and `include/`, identify the stable cross-cutting utilities, and centralize them in a small shared header or utility module with repo-wide call sites migrated incrementally. 37 - Status: backlog 38 39- Area: `src/modules/intl.c` 40 - Issue: `Intl` is now present and passes the current compat-table target, but several behaviors are still simplified compatibility implementations rather than fuller ECMA-402 semantics. 41 - Impact: `Intl.Collator`, `Intl.NumberFormat`, `Intl.DateTimeFormat`, and `Intl.Segmenter` can still diverge from web or Node behavior for anything beyond the currently covered compat surface. 42 - Proposed fix: Continue expanding `Intl` incrementally: replace `strcoll`-only collation, deepen `resolvedOptions()`, make `DateTimeFormat` actually honor stored timezone and locale options, and move `Segmenter` closer to the expected iterable/result object shape. 43 - Status: backlog 44 45- Area: `src/modules/timer.c` 46 - Issue: `node:timers/promises setInterval()` is still explicitly unimplemented. 47 - Impact: Promise-based timer APIs remain incomplete and can block compatibility with code that expects the Node timers/promises interval surface. 48 - Proposed fix: Implement `setInterval()` on top of the existing timer promise scheduling machinery, including cancellation and signal handling behavior consistent with the existing `setTimeout()` and `setImmediate()` support. 49 - Status: backlog 50 51- Area: `src/modules/dns.c` 52 - Issue: `node:dns` is still a minimal shim centered on `dns.promises.lookup`. 53 - Impact: Tooling or apps that expect more of the Node DNS surface still need polyfills or will fail outright. 54 - Proposed fix: Expand the module incrementally from the existing lookup path, prioritizing the most commonly used sync, callback, and `promises` APIs needed by current ecosystem packages. 55 - Status: backlog 56 57- Area: `src/modules/crypto.c` 58 - Issue: `crypto.subtle` is only partially implemented and still marked for extension beyond the current digest-oriented support. 59 - Impact: Web Crypto compatibility is incomplete, which blocks packages and runtime features that expect a broader `SubtleCrypto` surface. 60 - Proposed fix: Extend `crypto.subtle` method coverage incrementally, starting with the highest-value operations after digest and preserving the existing algorithm parsing entrypoints. 61 - Status: backlog 62 63- Area: `src/modules/worker_threads.c` 64 - Issue: `node:worker_threads` is still a minimal compatibility implementation, and `Worker.postMessage` remains explicitly unimplemented. 65 - Impact: Build tools and libraries that rely on real worker thread messaging or broader worker lifecycle behavior still cannot use the native surface directly. 66 - Proposed fix: Expand worker thread support incrementally, starting with message passing and the most commonly used worker APIs, while preserving the existing lightweight process-backed architecture where practical. 67 - Status: backlog 68 69- Area: `src/modules/async_hooks.c` 70 - Issue: `node:async_hooks` is still a minimal compatibility layer intended mainly to satisfy framework expectations. 71 - Impact: Async context tracking semantics remain shallow, which can break libraries that rely on realistic async IDs, resources, or hook lifecycle behavior. 72 - Proposed fix: Replace the placeholder async ID and resource behavior with real runtime-backed tracking, while keeping `AsyncLocalStorage` compatibility stable during the transition. 73 - Status: backlog 74 75- Area: `src/streams/readable.c` 76 - Issue: `ReadableStreamBYOBReader` is still explicitly unimplemented, and byte-source support is still called out as incomplete. 77 - Impact: Web Streams byte-oriented consumers cannot rely on BYOB reader semantics, leaving an important platform feature gap for stream-heavy or browser-compatible code. 78 - Proposed fix: Add real byte-source plumbing and implement `ReadableStreamBYOBReader` on top of it instead of routing byte sources through the default reader path. 79 - Status: backlog