GitHubivarvong
ply
main
1name: mutate
3# Stryker, out of band (since 2026-11-10): the same shards, plan and gate (scripts/mutate.mjs, thresholds and
4# rules unchanged) that ci.yml ran as its `mutate` job, in a workflow of its own, so a push's ci run (tests, lint, fuzz,
5# limit sweep) finishes without waiting about an hour for mutation. It still runs on every push to main and every pull
6# request, and the check is still named `mutate`. A newer push to main (or a workflow_dispatch) does not cancel a
7# running main run: the running run finishes so it always reaches a verdict, and GitHub keeps at most one pending run
8# in the group (the newest pending replaces older pending ones). A pull request uses its own group, so a later push
9# on that PR likewise waits rather than cancelling. A failed verdict on main opens or comments on the issue
10# "mutation survivors <date>" with the survivor list, the way nightly.yml reports.
11on:
12 pull_request:
13 push:
14 branches: [main]
15 workflow_dispatch:
17permissions: {}
19concurrency:
20 group: mutate-${{ github.event.pull_request.number || github.ref }}
21 cancel-in-progress: false
23jobs:
24 # Stryker over the src lines a PR changed plus every strictly gated line (each parser function and bounds file, changed
25 # or not: a moved parser is not a changed line), all of src/ on main, split into 36 shards balanced by measured cost
26 # (scripts/mutate.mjs --plan 36, weights in scripts/mutate-weights.json). A file is the unit, or a line range of a file
27 # costing more than a shard's share. Shards only run Stryker; the job named `mutate` merges their reports, checks
28 # every mutant of every planned file is there exactly once, and judges them with the same rules as an unsharded run.
29 # The 36 appears here four times (job name, matrix, --shard, --shards); the merge refuses a missing or extra shard, so
30 # changing one and not the others fails the gate. 36, not 20 (#313): scripts/mutate.mjs --budget (ci.yml) requires the
31 # heaviest planned shard to finish within 60 of the 90 minutes on a runner twice as slow as the reference one (shard
32 # 9 of 43273467698 dry-ran at 1.99x and took 79 min 17 s). Planned max 25.4 min at the reference, 50.8 at 2x (with
33 # weights for the ply/probes files, measured on 43639075968).
34 mutate-shard:
35 name: mutate-shard (${{ matrix.shard }}/36)
36 runs-on: ubuntu-latest
37 # Planned from measured seconds (scripts/mutate.mjs --plan 36): a pull request from scripts/mutate-weights-pr.json
38 # (refresh with --weights-pr from recent PR shard reports), main from scripts/mutate-weights.json (--weights from a
39 # full run). Without a limit a runaway shard holds the job, and the mutate gate, for GitHub's 6 h default.
40 timeout-minutes: 90
41 permissions:
42 contents: read
43 actions: write # setup-node persists the npm cache
44 strategy:
45 fail-fast: false
46 matrix:
47 shard: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36]
48 steps:
49 - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
50 with:
51 fetch-depth: 0
52 persist-credentials: false
53 - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
54 with:
55 node-version: 22
56 cache: npm
57 - run: npm ci
58 - name: stryker
59 env:
60 GITHUB_EVENT_NAME: ${{ github.event_name }}
61 MUTATE_BASE: ${{ github.event.pull_request.base.sha || 'origin/main' }}
62 SHARD: ${{ matrix.shard }}
63 run: node scripts/mutate.mjs --shard "${SHARD}/36"
64 - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
65 with:
66 name: mutation-shard-${{ matrix.shard }}
67 path: reports/mutation/shard-${{ matrix.shard }}.json
68 if-no-files-found: error
69 retention-days: 14
71 # The gate. Its name stays `mutate` so anything waiting on that check still works. It runs even when a shard
72 # fails or is cancelled (a skipped required check would count as passing), and fails unless every shard succeeded.
73 mutate:
74 name: mutate
75 needs: mutate-shard
76 # not always(): a cancelled run (manual, or a pending run replaced in the concurrency group) is not a failure to report
77 if: ${{ !cancelled() }}
78 runs-on: ubuntu-latest
79 permissions:
80 contents: read
81 actions: write # setup-node persists the npm cache
82 steps:
83 - name: every shard succeeded
84 env:
85 SHARDS: ${{ needs.mutate-shard.result }}
86 run: |
87 if [ "$SHARDS" != success ]; then
88 echo "mutate-shard result: $SHARDS"
89 exit 1
90 fi
91 - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
92 with:
93 fetch-depth: 0
94 persist-credentials: false
95 - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
96 with:
97 node-version: 22
98 cache: npm
99 - run: npm ci
100 - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
101 with:
102 pattern: mutation-shard-*
103 path: shard-reports
104 - run: mkdir -p reports/mutation
105 - name: merge and judge
106 env:
107 GITHUB_EVENT_NAME: ${{ github.event_name }}
108 MUTATE_BASE: ${{ github.event.pull_request.base.sha || 'origin/main' }}
109 run: |
110 set -o pipefail
111 node scripts/mutate.mjs --merge shard-reports --shards 36 2>&1 | tee reports/mutation/verdict.txt
112 # The merged report, for per-file history (weights for a future partition, or a look at what survived).
113 - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
114 if: success() || failure()
115 with:
116 name: mutation-report
117 path: |
118 reports/mutation/mutation.json
119 reports/mutation/verdict.txt
120 if-no-files-found: ignore
121 retention-days: 14
123 report:
124 name: report survivors
125 needs: [mutate-shard, mutate]
126 if: ${{ failure() && github.event_name != 'pull_request' }}
127 runs-on: ubuntu-latest
128 permissions:
129 issues: write
130 actions: read
131 steps:
132 - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
133 continue-on-error: true
134 with:
135 name: mutation-report
136 path: report
137 - name: open or update the issue
138 env:
139 GH_TOKEN: ${{ github.token }}
140 GH_REPO: ${{ github.repository }}
141 RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
142 SHA: ${{ github.sha }}
143 SHARDS: ${{ needs.mutate-shard.result }}
144 run: |
145 set -euo pipefail
146 title="mutation survivors $(date -u +%Y-%m-%d)"
147 body=$(mktemp)
148 {
149 echo "Mutation run $RUN_URL failed on main at \`$SHA\` (shards: $SHARDS)."
150 echo
151 echo '```'
152 if [ -s report/verdict.txt ]; then
153 # the verdict's failure lines: the gated survivors (path:line function mutator status -> replacement) and
154 # any refusal of the merge; the per-file table is in the run's mutation-report artifact
155 grep -E '^(src/[^ ]+:[0-9]+ |[0-9]+ surviving mutant|mutate: |score )' report/verdict.txt | head -150 || true
156 else
157 echo "(no verdict: a shard did not finish; open the run above)"
158 fi
159 echo '```'
160 } > "$body"
161 cat "$body"
162 num=$(gh issue list --state open --search "\"$title\" in:title" --json number,title --jq ".[] | select(.title == \"$title\") | .number" | head -1)
163 if [ -n "$num" ]; then
164 gh issue comment "$num" --body-file "$body"
165 else
166 gh issue create --title "$title" --body-file "$body"
167 fi
Diagnostics9 git calls · 304 ms
CallStatusSizeTime0304 ms
discover200191 B3 ms
git.upload-pack discover http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=ls-refs git.upstream.dur_ms=3 git.response.bytes=191 git.server.agent=git/github-9922ec520325-Linux git.server.object_format=sha1 git.server.caps=agent ls-refs fetch server-option object-format git.server.fetch=shallow wait-for-done filter git.protocol.version=2 git.pkt.frames=9 git.pkt.data=7 git.pkt.flush=2 git.pkt.delim=0 git.pkt.bytes=191 git.pkt.payload.max=36
ls-refs20012 KiB85 ms
git.upload-pack ls-refs http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=ls-refs git.upstream.dur_ms=85 git.response.bytes=11990 git.response.cache=EXPIRED git.response.duration_ms=85 git.protocol.version=2 git.pkt.frames=152 git.pkt.data=151 git.pkt.flush=1 git.pkt.delim=0 git.pkt.bytes=11990 git.pkt.payload.max=122 git.ls_refs.count=151 git.ls_refs.head=refs/heads/main
fetchtree:0 · deepen 1200347 B · hit3 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=3 git.response.bytes=347 git.response.cache=HIT git.response.duration_ms=3 git.fetch.filter=tree:0 git.fetch.wants=19912563f540228593df0c489082e5e2508e21e4 git.fetch.haves.count=0 git.fetch.deepen=1 git.fetch.thin_pack=false git.fetch.ofs_delta=true git.protocol.version=2 git.pkt.frames=7 git.pkt.data=5 git.pkt.flush=1 git.pkt.delim=1 git.pkt.bytes=347 git.pkt.payload.max=247 git.sideband.band1.bytes=247 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0 git.pack.objects=1 git.pack.bytes=247 git.pack.trailer=4b72f39b5ea57c5ae3009f90b53e3a6a155093e7Open pack map
fetchtree:0 · deepen 102004.2 KiB · hit3 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=61 git.response.bytes=4347 git.response.cache=HIT git.response.duration_ms=3 git.fetch.filter=tree:0 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=7 git.pkt.data=5 git.pkt.flush=1 git.pkt.delim=1 git.pkt.bytes=4347 git.pkt.payload.max=4247 git.sideband.band1.bytes=4247 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0 git.pack.objects=10 git.pack.bytes=4247 git.pack.ofs_delta=0 git.pack.ref_delta=0 git.pack.chain.max=0 git.pack.trailer=a6caf8e129bea82c9bae4cbc7c130c9205add400 git.pack.full=10Open pack map
fetchcombine:blob:none+tree:2 · deepen 1429—61 ms
git.upload-pack fetch
http.response.status_code=429
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=3
git.response.cache=BYPASS
git.fetch.filter=combine:blob:none+tree:2
git.fetch.wants=19912563f540228593df0c489082e5e2508e21e4
git.fetch.haves.count=0
git.fetch.deepen=1
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
error.type=rate_limited
error=HTTP 429 git-upload-pack: \u000d
<html>\u000d
<head>\u000d
<meta content="origin" name="referrer">\u000d
<title>Rate limit · GitHub</title>\u000d
<meta name="vfetchtree:0200919 B · hit3 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=3 git.response.bytes=919 git.response.cache=HIT git.response.duration_ms=3 git.fetch.filter=tree:0 git.fetch.wants=800d30ba8923860bfc460ca884b7f9ba22083588 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=4 git.pkt.data=3 git.pkt.flush=1 git.pkt.delim=0 git.pkt.bytes=919 git.pkt.payload.max=892 git.sideband.band1.bytes=892 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0 git.pack.objects=1 git.pack.bytes=892 git.pack.trailer=5323b9266eea5ded637285d1c5320699f12be76eOpen pack map
fetchtree:0200143 B · hit4 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=4 git.response.bytes=143 git.response.cache=HIT git.response.duration_ms=4 git.fetch.filter=tree:0 git.fetch.wants=acaa5a302ae76735950954bedde15c5073911dff 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=4 git.pkt.data=3 git.pkt.flush=1 git.pkt.delim=0 git.pkt.bytes=143 git.pkt.payload.max=116 git.sideband.band1.bytes=116 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0 git.pack.objects=1 git.pack.bytes=116 git.pack.trailer=14c5da7c3898ed3ab371e1548304ea110a893c7fOpen pack map
fetchtree:0200206 B · hit3 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=3 git.response.bytes=206 git.response.cache=HIT git.response.duration_ms=3 git.fetch.filter=tree:0 git.fetch.wants=1d0ad94ed315cb03775b57547f074d530e4acc80 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=4 git.pkt.data=3 git.pkt.flush=1 git.pkt.delim=0 git.pkt.bytes=206 git.pkt.payload.max=179 git.sideband.band1.bytes=179 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0 git.pack.objects=1 git.pack.bytes=179 git.pack.trailer=c9ad2e83a5acba191285d2448625f70de0746fabOpen pack map
fetch2003.0 KiB148 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=148 git.response.bytes=3034 git.response.cache=MISS git.response.duration_ms=148 git.fetch.wants=71b0a045dffaef31746cd5b4bdeb6d570ebbe33d 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=4 git.pkt.data=3 git.pkt.flush=1 git.pkt.delim=0 git.pkt.bytes=3034 git.pkt.payload.max=3007 git.sideband.band1.bytes=3007 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://github.com/ivarvong/ply
- Ref
- refs/heads/main
- Commit
- 19912563f540228593df0c489082e5e2508e21e4
- cf-ray
- a5e2705cfae6d806
- Request
- 122ab72f…
- Protocol
- v2 · sha1
- Agent
- git/github-9922ec520325-Linux
- Filter
- advertised
- Fetch
- shallow wait-for-done filter
- Capabilities
- agent ls-refs fetch server-option object-format