Repository navigation
test: cover compiler and Actions configuration integration - #1753
Conversation
Exercise the real configured Docusaurus compiler against security and benign content, and import the actual mutation configuration under explicit Actions events. Keep legacy compatibility cases distinct from the current site settings. Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
9b75f5e
ℹ️ Sentinel notice — informational; author is trusted (owner), merge is not blockedHive flagged this PR (author @mrbobbytables, head
Hive did not add the |
✅ Deploy Preview for endusers ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Read the tree at the PR head, not just the diff. This looks correct to me.
Verified:
stryker.config.mjs:71setsthresholds.break: breakThreshold(process.env.GITHUB_EVENT_NAME), so the new subprocess tests intests/stryker-config.test.mjsgenuinely exercise the env→exported-config wiring that the existing purebreakThreshold()tests (lines 40–53) cannot — the exact gap #1741/#1744 were about. Expected values (83 for local/pull_request,nullotherwise) matchbreakThresholdatstryker.config.mjs:41-43.- The compiler-integration reasons asserted by the new corpus exist in the gate:
disallowed URL schemeatscripts/lib/mdx-active-content.mjs:248anddisallowed element <…>at:265. Rejected MDX is compiled viacompileToJSXand inspected with SWC'sparseSynconly — never evaluated. - Site config claims hold: the
classicpreset withdocsoptions is atdocusaurus.config.js:356-365, andfutureflags at:161back the body's statement that the legacy-compat case opts in explicitly rather than claiming it is live today. - Dependency changes are consistent:
@docusaurus/mdx-loaderand@docusaurus/plugin-content-docspinned at 3.10.2 (already the locked transitive version), and the now-direct dependency makes removing the knip exemption inknip.config.jscorrect rather than cosmetic.
No production logic changes; diff matches the body's description. The author asks that it be left unmerged pending maintainer review, so flagging for a maintainer to make the landing call — nothing here blocks it from my read.
— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.88
Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
980631f
ℹ️ Sentinel notice — informational; author is trusted (owner), merge is not blockedHive flagged this PR (author @mrbobbytables, head
Hive did not add the |
Summary
Address the two P1 regression-testing gaps identified in the recent issue/PR
review:
compileToJSXpipeline, using the normalized site Markdown configuration and the docs
plugin's defaults/configured options. Inspect the resulting JavaScript AST
independently with the existing SWC dependency; never evaluate rejected MDX.
pull_request,merge_group,schedule, andworkflow_dispatchcontexts.Assert the effective exported threshold, not merely the helper's return value.
dependencies at 3.10.2, and remove the obsolete knip exemption for the now-used
docs plugin. The lockfile changes only in the two root dependency entries.
configured mutation run may use reproducible or historical regression evidence,
while mutation-covered assertion gaps still require surviving-mutant evidence.
Production behavior protected
Without these tests, the publish gate could regress to scanning raw source while
Docusaurus turns mismatched fences, encoded URLs, or apparent GFM code into live
links/images. The corpus demonstrates those effects in the real compiler and
asserts rejection by
scripts/lib/mdx-active-content.mjs. Positive cases preservevalid links, admonitions, inline code, and fenced YAML.
The current site's
future.v4settings disable legacy heading/admonitioncompatibility rewrites. The legacy composed-bypass case explicitly enables that
compatibility profile; this PR does not claim legacy title syntax is an active
bypass under the current configuration or change that configuration.
The Actions cases protect
stryker.config.mjsfrom incorrect event-to-thresholdwiring that pure
breakThreshold()tests would miss. Related prior fixes:#1741 and #1744.
No production logic, workflows, thresholds, or browser fixtures are changed.
ADR clarification
The addendum preserves ADR 0007's original decision and browser restrictions.
Findings using integration-boundary evidence must name the production failure,
explain why the mutation run does not exercise it, and test the actual consumer
or exported configuration. It does not permit test-tree guards, data-shape browser
fixtures, or coverage-floor changes.
Validation
GITHUB_EVENT_NAME=merge_group.event wiring and a raw-source-only security scan. Both production files were
fully restored before validation.
npm run test:unit:coverage:check: 3,010 tests pass; source lines/regions remain100%/100%, and the harness coverage gate passes.
npm run check:audit, andnpm run build:productionpass.checks; it changes no executable code.
Prepared with the maintainer's approval of the focused regression-only design
and the dated ADR clarification. Leave unmerged pending maintainer review.