main
1// Preloaded into every mutation-run test process (NODE_OPTIONS --require, set by vitest.stryker.config.ts). Two failure modes of a mutant that
2// the test process itself cannot be trusted to stop, since a mutant can block its event loop for good:
3// - memory. Without `out.set(p, …)` in pkt() (src/pktline.js:22) a test process grew past 23 GB resident inside
4// Stryker's timeout window, mostly ArrayBuffers that --max-old-space-size does not bound. On a 16 GB CI runner that
5// took the runner down ("received a shutdown signal", runs 41203243420 and 41204344306), not just the mutant.
6// - orphans. On a timeout Stryker kills its test-runner worker, not the `node <test file>` the worker spawned.
7// So a separate sh watches the process: past PLY_MUTANT_RSS_KB resident (default 3 GB; the unmutated files peak well
8// under 1 GB each), or once the parent is gone, it SIGKILLs it. A killed test process exits without reporting a failed
9// test, which Stryker's vitest runner reports as an error and scripts/mutate.mjs counts as detected, as the command
10// runner counted any crash; left alone the same mutant would have run into Stryker's timeout, also detected.
11'use strict';
12const { spawn } = require('node:child_process');
13const limit = Number(process.env.PLY_MUTANT_RSS_KB ?? 3 * 1024 * 1024);
14const me = process.pid, parent = process.ppid;
15spawn('/bin/sh', ['-c', `
16 while kill -0 ${parent} 2>/dev/null && kill -0 ${me} 2>/dev/null; do
17 rss=$(ps -o rss= -p ${me} 2>/dev/null | tr -d ' ')
18 if [ -n "$rss" ] && [ "$rss" -gt ${limit} ]; then echo "stryker-parent-guard: test process ${me} at $rss KB resident, over ${limit}; killed" >&2; break; fi
19 sleep 0.2
20 done
21 kill -9 ${me} 2>/dev/null`], { detached: true, stdio: ['ignore', 'ignore', 'inherit'] }).unref();
Diagnostics4 git calls · 23 ms
CallStatusSizeTime023 ms
discover200152 B3 ms
git.upload-pack discover http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=3 git.response.bytes=152 git.server.agent=gitty/1.0 git.server.object_format=sha1 git.server.caps=agent ls-refs fetch object-format git.server.fetch=shallow filter sideband-all git.protocol.version=2 git.pkt.frames=8 git.pkt.data=6 git.pkt.flush=2 git.pkt.delim=0 git.pkt.bytes=152 git.pkt.payload.max=34
ls-refs200145 B · hit2 ms
git.upload-pack ls-refs http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=ls-refs git.upstream.dur_ms=2 git.response.bytes=145 git.response.cache=HIT git.response.duration_ms=2 git.protocol.version=2 git.pkt.frames=3 git.pkt.data=2 git.pkt.flush=1 git.pkt.delim=0 git.pkt.bytes=145 git.pkt.payload.max=76 git.ls_refs.count=2 git.ls_refs.head=refs/heads/main
fetchblob:none · deepen 1020038 KiB · hit3 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=17 git.response.bytes=38434 git.response.cache=HIT git.response.duration_ms=3 git.fetch.filter=blob:none git.fetch.filter.requested=tree:0 git.fetch.filter.fallback=blob:none git.fetch.filter.learned=false git.fetch.wants=19912563f540228593df0c489082e5e2508e21e4 git.fetch.haves.count=0 git.fetch.deepen=10 git.fetch.thin_pack=false git.fetch.ofs_delta=true git.protocol.version=2 git.pkt.frames=6 git.pkt.data=4 git.pkt.flush=1 git.pkt.delim=1 git.pkt.bytes=38434 git.pkt.payload.max=38339 git.sideband.band1.bytes=38338 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0 git.pack.objects=63 git.pack.bytes=38338 git.pack.ofs_delta=0 git.pack.ref_delta=8 git.pack.chain.max=8 git.pack.trailer=0bc36ab7adf82d3109177f11f1ea93f1ce071f77 git.pack.full=55Open pack map
fetch2001.0 KiB · hit17 ms
git.upload-pack fetch http.response.status_code=200 git.response.bytes=1049 git.response.cache=HIT git.response.duration_ms=17 git.fetch.wants=71e44f63d7151bfe0f859fe7ae41913152e4e65c git.fetch.haves.count=0 git.fetch.deepen=0 git.fetch.thin_pack=false git.fetch.ofs_delta=true git.protocol.version=2 git.pkt.frames=3 git.pkt.data=2 git.pkt.flush=1 git.pkt.delim=0 git.pkt.bytes=1049 git.pkt.payload.max=1028 git.sideband.band1.bytes=1027 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0
Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.
- Remote
- https://5ad2236b39de4c8bd8f6270ea63f3ea9.artifacts.cloudflare.net/git/public-v0/ply.git
- Ref
- refs/heads/main
- Commit
- 19912563f540228593df0c489082e5e2508e21e4
- cf-ray
- a5e344c46b0af4d4
- Request
- fc6c2759…
- Protocol
- v2 · sha1
- Agent
- gitty/1.0
- Filter
- advertised
- Fetch
- shallow filter sideband-all
- Capabilities
- agent ls-refs fetch object-format