Skip to content

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

Merged
thymikee merged 2 commits into
mainfrom
refactor/colocate-root-repo-guards
Oct 15, 2026
Merged

thymikee merged 2 commits into
mainfrom
refactor/colocate-root-repo-guards

Conversation

@thymikee

@thymikee thymikee commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

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__/.

Guard Artifact
apple-runner-log-redaction runner commit-deadline Swift
apple-runner-package-source scripts/package-apple-runner-source.mjs
exec-wrap-guard exec-failure wraps across src
npm-package-scripts package.json scripts + workflows
package-exports package.json exports + tsdown.config.ts
client-api-examples-drift examples/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

View guided diff Turn on auto-fix

thymikee and others added 2 commits October 15, 2026 14:35
Specifier and root-path fixes follow in the next commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…epo-guards

Root-relative path fixes, comment references, and the unit-core include entries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 10 files

View guided diff | Turn on auto-fix | Re-trigger cubic

@thymikee

Copy link
Copy Markdown
Member Author

Reviewed 5b52407. The move of the artifact guards to test/repo-guards looks correct, and I found no problems in the diff. The change only moves tests and edits one test config. I ran no tests locally, so the result rests on reading the diff. I grepped package.json, scripts and .github for the old src/tests paths. I did not check whether other lanes, such as mutation or coverage, point at them. The path root in exec-wrap-guard I inferred from the two-line diff, not from the full file. CI is still pending: 17 jobs are queued and none have failed. Nothing else blocks this once the queue goes green. I know of no conflicts.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Oct 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 5.25 MB 5.25 MB 0 B
Package (unpacked) 5.25 MB 5.25 MB 0 B
Package (download) 1.58 MB 1.58 MB +5 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 24.4 ms 24.7 ms +0.3 ms
CLI --help 65.9 ms 64.9 ms -1.0 ms

@thymikee
thymikee merged commit 46e6a17 into main Oct 15, 2026
20 checks passed
@thymikee
thymikee deleted the refactor/colocate-root-repo-guards branch October 15, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant