feat(monorepo): W3 extract @mirrorbuddy/safety (reversed-shim)#369
Merged
feat(monorepo): W3 extract @mirrorbuddy/safety (reversed-shim)#369
Conversation
Closes #356. Same reversed-shim pattern as @mirrorbuddy/tier (#367) / CONTRIBUTING-MONOREPO.md §Test-arch. - packages/safety/src/index.ts → ../../../src/lib/safety - packages/safety/src/server.ts → ../../../src/lib/safety/server Canonical source stays at src/lib/safety/. The 5 test files that mock @/lib/logger keep working because safety code still imports @/lib/logger (the logger shim), which the tests' mock intercepts. No test churn. Wiring: next.config.ts transpilePackages, root package.json deps, pnpm-lock regenerated. Verification: - pnpm --filter @mirrorbuddy/safety typecheck → exits 0 - ci:summary ALL CLEAN - full unit suite: 798/802 files pass, 12029/12044 tests — identical to pre-change baseline - 88 safety tests ✅ Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Dependency ReviewThe following issues were found:
License Issuespackage.json
packages/safety/package.json
OpenSSF Scorecard
Scanned Files
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f1ea5d9331
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codex P2 on #369: safety re-exports src/lib/safety which imports @/lib/{logger,db,greeting/templates}; those shims re-export from @mirrorbuddy/{logger,db,greeting}. The package previously declared only @mirrorbuddy/types, so isolated/filtered install+typecheck of @mirrorbuddy/safety was not self-contained. Add the three missing workspace deps. pnpm --filter … typecheck still passes; ci:summary ALL CLEAN. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #356. Adds the
@mirrorbuddy/safetyworkspace entry using the reversed-shim pattern established in #367.Approach
Nothing moves.
src/lib/safety/remains canonical.packages/safety/src/{index,server}.tsre-export via relative path. The 5 safety test files that mock@/lib/loggerkeep working unchanged because safety code still imports through the logger shim, which the tests intercept. No pre-existing mock surfaces change module identity.Wiring
packages/safety/package.json— workspace package, exports.and./serverpackages/safety/tsconfig.json— extends root; includessrc/**/*and../../src/lib/safety/**/*so isolatedpnpm --filter … typecheckworksnext.config.ts—transpilePackages += '@mirrorbuddy/safety'package.json—@mirrorbuddy/safety: workspace:*pnpm-lock.yaml— regeneratedVerification
pnpm --filter @mirrorbuddy/safety typecheck→ exits 0npm run ci:summary→ ALL CLEAN🤖 Generated with Claude Code