refactor(move): move artifact guards to test/repo-guards

Merged
TH
15h ago
+8-4

Summary

Class i, repo-level artifact guards: six tests assert on Swift sources, package.json, workflows, docs or the src tree rather than on one module, so they leave src/__tests__ for test/repo-guards/. Their names already say what they guard, so none is renamed. vitest-slow-test-reporter tests a script module and moves beside its sibling script tests in scripts/__tests__/.

GuardArtifact
apple-runner-log-redactionrunner commit-deadline Swift
apple-runner-package-sourcescripts/package-apple-runner-source.mjs
exec-wrap-guardexec-failure wraps across src
npm-package-scriptspackage.json scripts + workflows
package-exportspackage.json exports + tsdown.config.ts
client-api-examples-driftexamples/sdk vs the API docs

Commit 1 is a pure git mv (7 renames, 0 content lines). Commit 2 fixes the one root-relative path (exec-wrap-guard scans src), the slow-reporter import, two comments naming the old path, and adds the unit-core include entries: test/repo-guards/*.test.ts and the slow-reporter file (the scripts list is explicit). No new vitest project, no exports, barrel or fixture change.

Validation

Head 5b52407ab: check:quick, check:layering, check:fallow, check:gate-manifest, check:affected --run, pnpm format pass.

  • Parity: 37 before, 37 after: log-redaction 1, package-source 12, exec-wrap 1, npm-package-scripts 9, package-exports 4, examples-drift 5, slow-reporter 5.
  • Selection: vitest list shows every new path under [unit-core]; the full affected run covers them.
  • Still guards: planting an AppError with the stdout/stderr/exitCode trio under src makes exec-wrap-guard fail naming it; removed afterwards.
  • Orphans: 76 โ†’ 69 on this branch. Swift comments naming apple-runner-log-redaction.test.ts stay valid (bare filename) and are untouched to avoid selecting Apple lanes.

๐Ÿค– Generated with Claude Code