Repository navigation
test: kill the surviving mutants in the MDX and architecture content gates - #1795
Merged
Merged
Conversation
…gates Pins every exported allowlist entry of mdx-active-content.mjs with a table of inert documents, the string-literal expression boundary, the URL-attribute guard, the ESM trim, the expression-type fallback, snippet trimming and capping, the unwrapped-line mapping and finding order; the exact cleanMarkdown rewrites (regex anchors, shortcode removal, GFM grammar, bracket escaping, link unwrapping), firstParagraph edges and the joined mirror warnings in architecture-content.mjs; the page-extension anchor and sorted listing in architecture-pages.mjs; and the missing position guards in mdx-code-blocks.mjs. The scoped score over these four files rises from 83.82% (431 killed, 84 survived) to 97.30% (501 killed, 14 survived). The 14 left are equivalent: dead allowlist entry, regex pre-filters JSON.parse already enforces, guards on values normalizeUri already neutralises, an unreachable loop bound, an inert default text, a duplicate scan the dedup removes, an undefined-vs-false catch result, a regex anchor on a constant set, and an empty encoding Node reads as utf8. Refs cncf#1788 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com>
mrbobbytables
enabled auto-merge
October 22, 2026 19:34
✅ Deploy Preview for endusers ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Closed
6 tasks done
This was referenced Oct 22, 2026
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Oct 22, 2026
…rayDeclaration (#1807) Annotate the 41 surviving mutants that the backlog groups in #1788 verified as equivalent (#1789, #1790, #1793, #1794, #1795) with Stryker disable directives that carry the reason, so they report as Ignored instead of Survived and no longer surface as mutation findings. Exclude the ArrayDeclaration mutator in stryker.config.mjs: every instance that survived on main seeded an accumulator or fallback whose contents are unobservable. Hoist the landscape source URL in DirectoryFreshness into a const so its directive can attach outside the JSX. Document the directive placement rules in CONTRIBUTING. Refs #1788 Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com> Co-authored-by: mrbobbytables <mrbobbytables@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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 B of #1788: kills the surviving mutants in the MDX and architecture content gates (
scripts/lib/mdx-active-content.mjs,architecture-content.mjs,architecture-pages.mjs,mdx-code-blocks.mjs). Tests only; no source changes.tests/mdx-active-content-allowlists.test.mjs: table-driven acceptance of every allowlisted MDX node type, HTML element and attribute, so dropping an entry fails a test.tests/mdx-code-blocks.test.mjs: pins fence handling, info-string parsing and the exact rewritten output.architecture-content-*andarchitecture-pagestests gain exact message, path and encoding assertions for each conditional branch.Mutation score (scoped to the four files)
Per file: mdx-active-content 240/251, architecture-content 193/194, architecture-pages 55/57, mdx-code-blocks 17/17.
The 14 survivors are equivalent mutants, left without suppression:
mdx-active-content.mjs:108'mdxjsEsm'entry inMDX_NODE_TYPES: dead entry, thenode.type === 'mdxjsEsm'branch precedes it.:164regex anchors: a pre-filter forJSON.parse, which only accepts a lone string anyway.:282,:298,:304left-operandtrue: only passnull/undefinedintodisallowedScheme/remoteTarget, whichnormalizeUriturns into text with no scheme.:344loop bound: unreachable, unwrap is a pure line deletion so a match is always found.:390default sentinel array: mdast ignores a string extension.:391sentinel for nullish input: inert text yields[]like''.:403form === texttofalse: the duplicate scan is removed by the dedup filter.architecture-pages.mjs:44/\.mdx?/applied to the constant['index.md', 'submit.md'];:78catch {}yieldsundefinedvsfalseunder||.architecture-content.mjs:230encoding'': Node treats a falsy encoding as utf8.Validation
npm run test:unit:coverage:check: passnpm run check:format,check:lint,check:duplication(247/251 clones, unchanged),check:unused,check:spelling,check:markdown: passRefs #1788