You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4019726
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(mutation): keep the summary script to the shape the review asked for
Review threads on #2149:
- normalizeReportPath rejects only a leading .. component (relative === ".." or a "../"
prefix), so a file legitimately named "..foo.ts" is no longer rejected.
- Append with fs.appendFileSync inside the existing try, the way appendSummary() in
scripts/stryker-diff.mjs does: the runner gives this step its own summary file, so the
temp file, rename and stale sweep were solving a problem this step does not have.
- Drop escapeMarkdownCell. A string reaches the table only after REPORT_NAME or
SAFE_RELATIVE_PATH matched, so no Markdown table or link character can be rendered from
a report; the rejection path is now tested with pipe, backtick, bracket/link, space,
absolute and both outside-path keys instead of testing an unreachable escaper.
- Cap the table at the 40 worst rows (GitHub caps a step's job summary at 1 MiB and fails
the upload above it) and count the remainder in a pointer to the artifact.
- Run the script as a subprocess in the tests: writing GITHUB_STEP_SUMMARY appends and
prints nothing, and an unwritable GITHUB_STEP_SUMMARY emits a ::warning and still exits
0. A broken entry guard would have written nothing while every in-process test passed.
- Assert the whole row with distinct Survived and NoCoverage counts, so a swapped column
pair cannot pass.
- AGENTS.md: the summary lists every file with counted mutants, not every mutated file.
Negative controls: with the old startsWith("..") guard the path test fails; with the row
cap removed the cap test fails; with the entry guard disabled both subprocess tests fail.
node --test scripts/stryker-diff.test.mjs scripts/mutation-summary.test.mjs: 58/58 green.
Copy file name to clipboardExpand all lines: AGENTS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,7 @@ Prefer the narrowest test layer that proves the behavior. This follows standard
62
62
63
63
The `mutation-diff` job publishes the changed-code mutation report in two places:
64
64
65
-
- The job summary (`mutation-diff` → Summary tab) lists every mutated file with its `Survived` and `NoCoverage` counts, worst file first. Use the `changed-code-mutation-report` artifact to inspect each surviving or uncovered mutant's line, mutator, and replacement.
65
+
- The job summary (`mutation-diff` → Summary tab) lists every file with counted mutants (a file whose mutants are all `Ignored` or `CompileError` gets no row), worst file first, capped at the 40 worst rows with the rest counted in a pointer to the artifact. Use the `changed-code-mutation-report` artifact to inspect each surviving or uncovered mutant's line, mutator, and replacement.
66
66
- The report is uploaded as the `changed-code-mutation-report` artifact (`reports/mutation/<package>/mutation.json` and `mutation.html`, retained 7 days) for a browsable view.
67
67
68
68
Close a listed mutant by adding or strengthening a focused test that fails under the mutation. If a suppression is genuinely unavoidable, follow the existing `Stryker disable` reason rule under Test Placement Guidelines above.
"Close a surviving or uncovered mutant with a focused test that fails under the mutation; the artifact does not need to be downloaded to read this table.",
0 commit comments