Skip to content

build: restore mutation audit - #267

Merged
goanpeca merged 3 commits into
mainfrom
codex/restore-mutation-audit
Nov 24, 2026
Merged

goanpeca merged 3 commits into
mainfrom
codex/restore-mutation-audit

Conversation

@sophiecarreras

Copy link
Copy Markdown
Contributor

Summary

  • pin patched transitive versions for the lockfile audit advisories
  • keep local-path tests isolated under Stryker's shared worker
  • restore mutation execution without weakening the 65% threshold or schedule

Checklist

  • pnpm all stages pass locally (lint + release policy + typecheck + test + build + spellcheck).
  • If src/ changed, dist/index.js was rebuilt and is included in this PR. CI will fail otherwise. (N/A: no source change)
  • Test coverage for new logic added under __tests__/ (and passes the 95%/85%/100%/95% coverage gate).
  • If a new action: verb was added: it's listed in src/inputs.ts ActionName, wired in src/main.ts, documented in action.yml, and has a usage entry in the README. (N/A)
  • If a new input or output was added: documented in action.yml and the README table. (N/A)
  • If user-visible behavior changed: a CHANGELOG.md entry under [Unreleased]. (N/A)
  • If a new example workflow was added: listed in .github/workflows/README.md and runs against the project's test bucket. (N/A)

How to test this

  • node scripts/full-lockfile-audit.mjs
  • pnpm test:coverage
  • pnpm exec stryker run --mutate src/sse.ts

Notes for reviewers

Clean Node 24 Linux verification passed 477 tests and a real focused Stryker run: 53 of 61 mutants killed, 86.89% mutation score. The final lockfile audit reported zero high or critical vulnerabilities. Addresses #213 and #159.

@github-actions

Copy link
Copy Markdown

Build artifact for this PR: build.tar.gz (valid 1 hour)

Signed-off-by: Gonzalo Peña-Castellanos <goanpeca@gmail.com>
Signed-off-by: Gonzalo Peña-Castellanos <goanpeca@gmail.com>
@github-actions

Copy link
Copy Markdown

Build artifact for this PR: build.tar.gz (valid 1 hour)

@goanpeca goanpeca added the skip-changelog No user-visible change; the changelog fragment check skips this PR label Nov 24, 2026
@goanpeca

Copy link
Copy Markdown
Contributor

Review against REVIEW.md, after merging current main (#258, #272) into this branch: 0 Important, 1 Nit, 0 Pre-existing (one test-scope finding fixed in 9247d90).

Merge with main (1577601). Only pnpm-lock.yaml conflicted; it is regenerated from main's lockfile with this PR's overrides. Every override still matters on top of #272: on current main the full-lockfile audit still reports five highs (source-map-js GHSA-68fv-2mgg-jv7q, markdown-it GHSA-r7fv-28h4-cvq7 and GHSA-gfr2-rv44-r23c, vite GHSA-587h-7wmj-h5pm, zod GHSA-mrhx-c7xc-m3w5). With this PR it resolves vite 7.3.7, markdown-it 14.3.3, source-map-js 1.2.4, and zod 4.6.7, and node scripts/full-lockfile-audit.mjs exits 0 (3 low, 8 moderate left). vite 7.3.7 is inside vitest 5's ^6.4 || ^7 || ^8 peer range, and nothing in the tree needs zod 3.

Test isolation. The node:os mock is sound: src/fs.ts imports homedir by name, so the mock reaches it, and reading HOME/USERPROFILE at call time also survives process.env being replaced, which the old comment warned about. Replacing process.chdir with a process.cwd spy works because the upload and download paths resolve through path.resolve and process.cwd().

Fixed (9247d90): keep relative inputs. The outside-cwd tests had switched ./restored and build/**/*.js to absolute paths, so they no longer covered the relative inputs a workflow actually passes, which is what "keeps historical keys for globs inside the working directory" is about. With the cwd spy the original relative inputs pass and write only under the fixture directory (checked: nothing lands in the real working directory), so they are restored.

Nit. vite: 7.3.7 is an exact pin where the old entry was a range; '>=7.3.7 <8.0.0' would keep later 7.3.x patches flowing, matching the esbuild, source-map-js, and zod entries.

Changelog. The lockfile and pnpm-workspace.yaml are shipped paths, but every package touched here is dev or test tooling, so I added skip-changelog instead of a fragment.

Verification on 9247d90: pnpm ci:local passes except the changelog step the label covers (545 tests, coverage 97.67 / 94.59 / 100 / 98.61, docs, markdownlint, lychee, prod audit at high), and a focused pnpm exec stryker run --mutate src/fs.ts passes at 86.67% (39 killed, 6 survived) against the 65% break threshold. Approval is a code owner's call.

@goanpeca
goanpeca merged commit dd31296 into main Nov 24, 2026
34 of 35 checks passed
@goanpeca
goanpeca deleted the codex/restore-mutation-audit branch November 24, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog No user-visible change; the changelog fragment check skips this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants