{"id":50960046,"url":"https://github.com/rbbydotdev/stackblitz","last_synced_at":"2026-06-18T12:30:50.354Z","repository":{"id":362745703,"uuid":"1260572296","full_name":"rbbydotdev/stackblitz","owner":"rbbydotdev","description":null,"archived":false,"fork":false,"pushed_at":"2026-06-05T18:47:21.000Z","size":9061,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-05T19:16:52.972Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rbbydotdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-05T16:28:19.000Z","updated_at":"2026-06-05T18:47:18.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/rbbydotdev/stackblitz","commit_stats":null,"previous_names":["rbbydotdev/stackblitz"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/rbbydotdev/stackblitz","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbbydotdev%2Fstackblitz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbbydotdev%2Fstackblitz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbbydotdev%2Fstackblitz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbbydotdev%2Fstackblitz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rbbydotdev","download_url":"https://codeload.github.com/rbbydotdev/stackblitz/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbbydotdev%2Fstackblitz/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34491225,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-18T12:30:49.225Z","updated_at":"2026-06-18T12:30:50.349Z","avatar_url":"https://github.com/rbbydotdev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# edgejs-web — Node corpus on StackBlitz WebContainer\n\nRuns the real **Node.js `test/parallel`** suite (3,792 tests) inside a StackBlitz\nWebContainer to measure what WebContainer's native `node` actually covers. The\noutput is written in the **same schema** as the edgejs corpus runner\n(`corpus/full/corpus-results.json`) so the two can be diffed directly — what WC\npasses that edgejs fails = the target list.\n\n## Why this is the gold-standard baseline\n\nWebContainer runs a real `node` (v22, linux/x64) with a real process model, so\neach test runs as its own `node \u003cfile\u003e` child process. Exit code 0 = pass, and\n`process.on('exit')` / `mustCall`-at-exit verification fire for real — none of\nthe hidden-pass inflation the in-worker edgejs runner has.\n\nThe engine is `child_process` per test (not worker_threads): the WC probe showed\nspawn ≈ 28 ms vs worker ≈ 132 ms, and — decisively — worker `execArgv` is\nsilently dropped in WC while real argv `// Flags:` are honored.\n\n## Getting it onto StackBlitz\n\nThis folder is ~74 MB / ~10k files (the test suite + fixtures). Two ways in:\n\n1. **GitHub import (recommended).** Push this folder to a repo, then open\n   `https://stackblitz.com/github/\u003cyou\u003e/\u003crepo\u003e`. Robust for the file count.\n2. **Drag-drop.** New WebContainer project on stackblitz.com → drag the folder\n   in. Works but the browser may struggle with this many files.\n\nThere are **no dependencies** — nothing to `npm install`.\n\n## Running (in the jsh shell)\n\nAlways smoke-test first to confirm `child_process` spawning works in your WC:\n\n```sh\nnode run-corpus.mjs test-path-      # ~16 tests, should finish in seconds\n```\n\nThen run by module, or the whole thing:\n\n```sh\nnode run-corpus.mjs fs              # every test with \"fs\" in the name\nnode run-corpus.mjs test-buffer-    # exact prefix\nnode run-corpus.mjs                 # FULL corpus (~3,787 tests)\n```\n\nThe full run is resumable: results stream to `results/progress.jsonl` and a\nre-run skips what's already done, so Ctrl-C is safe. Estimated full run ≈\nstartup (~2 min) + test runtimes; module-by-module is the comfortable way.\n\n### Knobs (env vars)\n\n```sh\nCONCURRENCY=8 node run-corpus.mjs            # parallel children (default 4)\nTEST_TIMEOUT_MS=30000 node run-corpus.mjs fs # per-test kill cap (default 30s)\nSTALL_MS=90000 node run-corpus.mjs           # supervisor kill+respawn window\nLIMIT=50 node run-corpus.mjs                  # cap count (quick sample)\nnode run-corpus.mjs --fresh                   # wipe progress + inflight, restart\nnode run-corpus.mjs --list fs                 # print matching tests, don't run\n```\n\n## Resilience (why it won't lock up)\n\n`run-corpus.mjs` is a **supervisor**; it spawns `corpus-worker.mjs` to run the\ntests and watches `progress.jsonl` grow. Node's own suite contains tests that\nspawn servers/workers/forks — some of which WebContainer can't reap — so a long\nsweep can otherwise wedge the container.\n\n- **Soft stall** (worker still alive but a test is stuck): if progress stops for\n  `STALL_MS`, the supervisor kills the worker's whole process tree and respawns\n  it — automatically, mid-run.\n- **Poison test** (one that wedges WC): every test is written to\n  `results/inflight.json` (with its PID) the moment it starts. Whatever killed\n  it, the next pass marks it **`crash`** and **skips** it, and reaps its orphaned\n  PID — so the sweep steps over it instead of re-hitting it forever.\n- **Total WC freeze** (whole WASM thread starved): the in-process supervisor\n  can't rescue this — **manually restart the StackBlitz container and re-run**.\n  Inflight-skip then steps past the culprit automatically.\n\n\u003e Progress lives in untracked `results/`. If reloading the container resets the\n\u003e filesystem, commit or download `results/progress.jsonl` before restarting so\n\u003e the resume ledger survives.\n\n## Output\n\nWritten to `results/`:\n\n- `corpus-results.json` — full per-test results + per-module aggregates (edgejs schema; adds `crash`/`skip`).\n- `corpus-summary.md` — human-readable per-module pass-rate table.\n- `progress.jsonl` — append-only resume ledger.\n- `inflight.json` — tests currently running (used by the supervisor to skip wedgers).\n\nResult statuses: `pass` / `fail` / `timeout` (killed at the per-test cap) /\n`crash` (wedged WC, killed+skipped by the supervisor) / `skip` (`common.skip`).\n\n**To get results back:** download `results/corpus-results.json` from the\nStackBlitz file tree (right-click → download), or `cat results/corpus-summary.md`\nin the shell and copy the table.\n\n## Known WebContainer gaps (from the probe — expect these as failures)\n\nThese are real WC limitations, not runner bugs. They'll show up as honest\nfailures and are part of the coverage map:\n\n- **`--expose-gc` is a no-op** — `global.gc` never appears. Tests calling\n  `global.gc()` fail (~40 tests carry this flag).\n- **`crypto.generateKeyPairSync('rsa')` is broken** (`createJob(...).run is not\n  a function`) — keypair-generation tests fail. (Hashing + `webcrypto.subtle`\n  work.)\n- **`os.totalmem()` → NaN**, **`process.memoryUsage().rss` → 0** — the few\n  tests asserting on these fail.\n- **`--expose-internals` works**, so the ~247 internals tests can run.\n\n## Files\n\n```\nrun-corpus.mjs      supervisor: ledgers, stall watchdog, inflight-skip recovery\ncorpus-worker.mjs   worker: runs `node \u003ctest\u003e` per test (child_process engine)\ncorpus-lib.mjs      shared helpers (test selection, flag parsing, ledgers)\ncorpus-format.mjs   bucketing + summary writer (matches edgejs schema)\npackage.json        no deps; `npm run smoke` / `npm run full`\ntest/parallel/      3,792 Node test files\ntest/common/        test helpers (required by ~all tests; index.js has one WC patch)\ntest/fixtures/      fixture data (~653 tests need it)\n```\n\n`test/common/index.js` carries one WebContainer fix: `net.getDefault­AutoSelect­FamilyAttemptTimeout()`\nreturns `undefined` in WC, which made the original line throw `ERR_OUT_OF_RANGE`\nat load and fail *every* test; it's guarded to load cleanly (real\nautoSelectFamily tests still run against WC and fail honestly).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbbydotdev%2Fstackblitz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frbbydotdev%2Fstackblitz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbbydotdev%2Fstackblitz/lists"}