Repository navigation
test: kill the surviving mutants in the MDX escape and data validators - #1808
Merged
Merged
Conversation
Pin the grammar decisions in escapeMdx() with fixtures whose code spans differ between the MDX+GFM, MDX-only and fallback CommonMark views while staying inert after escaping, so the verification pass cannot mask a wrong code range: a JSX flow element holding a code span, GFM table rows whose cell split creates or destroys a span, and list-indented tables that only one grammar sees as live. Also pin the import/export entries of the unescape table, the mdx-code-block skip keeping surrounding code verbatim, and publishLandscapeSnapshot() backing up the previous output before any staged asset moves. Survivors fall from 40 to 18 in mdx-escape.mjs and from 19 to 16 in enduser-collector.mjs; the remaining 68 across the seven files (mdx-escape 18, enduser-collector 16, validate-utils 11, enduser-landscape 10, validate-architecture-assets 8, enduser-assets 7, profile-image 3) are equivalent: unreachable branches behind earlier guards, encoding arguments that default to utf8, rmSync force flags on paths that always exist, and round-trip checks Date.parse already makes. Refs cncf#1788 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com>
…ors as ignored Add Stryker disable directives for the equivalent survivors documented in the previous commit: 41 next-line directives plus 3 disable/restore block pairs where Babel attaches no leading comment (the ISO 8601 regex const, the roundTrips member chain and the records.push call). The ArrayDeclaration survivors are left for the global mutator exclusion. Exclude tests/coverage-report-file-region-floor.test.mjs from the Stryker dry run: ignored mutants are not instrumented in the sandbox copy, which shifts the import-only region ratio of validate-utils.mjs below the 50% floor that test pins on the on-disk source. Refs cncf#1788 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com>
✅ Deploy Preview for endusers ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Group F of the surviving-mutant backlog: the seven
scripts/lib/files left untriaged after #1788 (mdx-escape,enduser-collector,enduser-landscape,enduser-assets,validate-architecture-assets,validate-utils,profile-image).true/falseplacement, encoding fallbacks, idempotent sorts and guards that cannot be reached).ArrayDeclarationequivalents with// Stryker disable next-line <Mutator>: <reason>directives (threedisable/restorespans where the node sits in a call chain) so they report as Ignored with the reason attached. The remaining 10ArrayDeclarationsurvivors are removed by the mutator exclusion in chore: mark the verified equivalent mutants as ignored and exclude ArrayDeclaration #1807.coverage-report-file-region-floortoSOURCE_TEXT_TEST_FILESinstryker.config.mjs: ignored mutants are not instrumented, which skews that harness-over-source test's region ratio inside the sandbox.Verification
Scoped
npm run test:mutationover the seven files: 99.13%, every non-ArrayDeclarationmutant Killed or Ignored.npm run test:unit:coverage:checkand the six lint gates pass.Refs #1788