Repository navigation
test: skip the gitignored StrykerJS sandbox in two worktree walks - #1773
Conversation
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>
|
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 Hive will keep 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.
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:77adds.stryker-tmptoUNSCANNED_DIRS, which feedsskipDir(line 83) used by both walk entry points (lines 169, 224), and line 110 removes it fromrepoDirs— both ways the sandbox could leak in are covered.tests/npm-lifecycle-scripts.test.mjs:72— the newUNWALKED_DIRSset is a faithful refactor of the old inlinenode_modules/.gitskips plus.stryker-tmp..gitignore:241already 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
rmSyncin afinally, 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>
There was a problem hiding this comment.
Read both walks at this head, not just the diff — this looks correct to me.
tests/markdown-references.test.mjs:74-82adds.stryker-tmptoUNSCANNED_DIRSand (: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-66moves the skip list toUNWALKED_DIRSand adds.stryker-tmp, so the sandbox's copied root.npmrccan no longer fail the single-npm-config contract..stryker-tmpis StrykerJS's defaulttempDirName(no override instryker.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
|
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. |
🔒 Hold-gate integrity: branch changed while hold-gated — fresh review requiredThis PR's branch moved while it sat hold-gated: the head recorded when the hold was applied was Commits not present in the hold-time snapshot (1):
Authors not in the hold-time author set: 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. |
Summary
Keep the two repository walks from scanning Stryker's gitignored copy of
the checkout. Leftover
.stryker-tmp/content must not become duplicateMarkdown-reference or npm-configuration failures on an otherwise unchanged
checkout.
.stryker-tmpfrom the Markdown scan and candidate root paths.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 copiedAGENTS.md,CONTRIBUTING.mdand.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.