Skip to content

test: skip the gitignored StrykerJS sandbox in two worktree walks - #1773

Merged
mrbobbytables merged 2 commits into
mainfrom
quality/test-skip-stryker-sandbox
Oct 22, 2026
Merged

mrbobbytables merged 2 commits into
mainfrom
quality/test-skip-stryker-sandbox

Conversation

@hivecommons-hive

@hivecommons-hive hivecommons-hive Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Keep the two repository walks from scanning Stryker's gitignored copy of
the checkout. Leftover .stryker-tmp/ content must not become duplicate
Markdown-reference or npm-configuration failures on an otherwise unchanged
checkout.

  • Exclude .stryker-tmp from the Markdown scan and candidate root paths.
  • Exclude it from the npm-configuration walk.
  • Remove the newly proposed harness-of-harness tests and their unused
    fixture imports. The existing content/configuration contracts remain.

This is the maintainer-approved repair of the existing suite's false
positives, not authorization for new test-tree guards or an ADR0006
exception. No production code, workflow, acceptance rule or threshold changes.

Evidence

The existing two test files pass all 12 cases both with a leftover
.stryker-tmp/sandbox-P23/ containing copied AGENTS.md,
CONTRIBUTING.md and .npmrc, and after that fixture is removed.
The full required unit coverage gate, all six lint gates and production
build pass after trimming the two proposed meta-tests.

Maintainer authorization

The maintainer explicitly approved trimming the new meta-tests, preserving
the sandbox repair, and releasing this designated P2 hold for exact-head
protected queue submission after required checks pass. Agent inspection is
not independent human approval. No protections are bypassed.

Closes #1772.

tests/markdown-references.test.mjs and tests/npm-lifecycle-scripts.test.mjs
each walk the whole checkout with a hand-maintained skip list, and neither
named .stryker-tmp. StrykerJS copies the entire tree into
.stryker-tmp/sandbox-<id>/ while npm run test:mutation runs, and leaves the
copy behind whenever the run is interrupted. A later npm run test:unit then
failed twice on an untouched main: the prose-reference scan reported sandbox
copies of AGENTS.md, CONTRIBUTING.md and adr/*.md as naming things the
repository does not have, and the .npmrc contract saw the sandbox copy as a
second npm config overriding the root install hardening. Both diagnostics
point at generated duplicates rather than at anything a contributor changed.

.gitignore already declares /.stryker-tmp/ as mutation-testing output, so the
walks simply follow it. Adds a regression test to each file so the skip
cannot be dropped again.

Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Important

Held for human review by the hive's ACMM level gate.

This PR was opened by the "quality" agent while Hive policy required a human checkpoint for that agent. Agent PRs are held at ACMM L3–L5; an outreach PR that targets a repository this hive does not manage is held at every level because it publishes project-facing communication into someone else's project.

Hive will keep the hold label until a human removes it. Operators can make a deliberate one-off release during an ACMM level change with release_level_holds=true, but level changes never release this hold automatically.

@netlify

netlify Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for endusers ready!

Name Link
🔨 Latest commit 5049f78
🔍 Latest deploy log https://app.netlify.com/projects/endusers/deploys/6ada2b52cc854f4b56fe8228
😎 Deploy Preview https://deploy-preview-1773--endusers.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified locally at head eacecf4 against a fresh clone. This looks correct to me.

Reproduced the failure mode: at origin/main (b490a7f) with a leftover .stryker-tmp/sandbox-REPRO/ containing copies of AGENTS.md, CONTRIBUTING.md, adr/ and .npmrc, node --test tests/markdown-references.test.mjs tests/npm-lifecycle-scripts.test.mjs fails 2. At this PR's head with the same sandbox present: 14 pass, 0 fail. Clean tree: 14 pass, 0 fail.

Code checks:

  • tests/markdown-references.test.mjs:77 adds .stryker-tmp to UNSCANNED_DIRS, which feeds skipDir (line 83) used by both walk entry points (lines 169, 224), and line 110 removes it from repoDirs — both ways the sandbox could leak in are covered.
  • tests/npm-lifecycle-scripts.test.mjs:72 — the new UNWALKED_DIRS set is a faithful refactor of the old inline node_modules/.git skips plus .stryker-tmp.
  • .gitignore:241 already declares /.stryker-tmp/, so skipping it matches the repo's own classification of the directory as scratch output.
  • The regression test fixture cleans up with rmSync in a finally, so no tmpdir litter on assertion failure.

No production code touched; file set matches the body's claim exactly (2 files).

— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.88

Retain the two Stryker sandbox exclusions and existing content/configuration contracts without adding harness-of-harness guards.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com>

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read both walks at this head, not just the diff — this looks correct to me.

  • tests/markdown-references.test.mjs:74-82 adds .stryker-tmp to UNSCANNED_DIRS and (:102-112) to the candidate-root filter. Without it, a leftover sandbox (a full copy of the tree) would both double-report every scanned Markdown file and inject itself as a bogus path root.
  • tests/npm-lifecycle-scripts.test.mjs:58-66 moves the skip list to UNWALKED_DIRS and adds .stryker-tmp, so the sandbox's copied root .npmrc can no longer fail the single-npm-config contract.
  • .stryker-tmp is StrykerJS's default tempDirName (no override in stryker.config.mjs) and is gitignored at .gitignore:241, so skipping it matches what git already treats as scratch.

The PR body's mention of removing "harness-of-harness" meta-tests leaves no trace in the net diff against main — the branch history trimmed them before this head, so the final change is exactly the two exclusions. No production code, workflow, or threshold changes. Checks are green.

— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.88

@mrbobbytables

Copy link
Copy Markdown
Member

Maintainer-delegated P2 merge disposition: repaired exact head 5049f78 preserves the two Stryker sandbox exclusions and trims the new meta-tests and unused fixture imports as explicitly approved. The existing 12 focused cases pass with a leftover sandbox and on a clean tree; full coverage, all six lint gates and build pass locally. All fresh-head CI checks are now green. No ADR exception or policy change. The maintainer authorized this hold release and exact-head protected merge; agent inspection is not independent human approval. Submitting through normal protections, with no bypass.

@mrbobbytables
mrbobbytables added this pull request to the merge queue Oct 22, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

🔒 Hold-gate integrity: branch changed while hold-gated — fresh review required

This PR's branch moved while it sat hold-gated: the head recorded when the hold was applied was eacecf4923c6, but the branch now sits at 5049f789cb36. The diff a reviewer saw under the hold is no longer the diff that would merge, so auto-merge is blocked and the hold label has been re-applied.

Commits not present in the hold-time snapshot (1):

  • 5049f789cb36 by mrbobbytables — test: keep sandbox repair within the approved scope

Authors not in the hold-time author set: mrbobbytables

A human should review the FULL diff at the current head — a rebase or force-push renames every commit, so everything above needs eyes even if it looks familiar. Removing the hold label after that review is the fresh approval: the guard has re-pinned its snapshot to the current head, so a clean lift re-opens the merge lanes.

Merged via the queue into main with commit 264f507 Oct 22, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[quality] Unit suite fails after npm run test:mutation: two worktree walks scan the gitignored .stryker-tmp/ sandbox

1 participant