Conversation
- Add .cursorrules with repo summary, Node backend rules, security and workflow guidance - Add .cursor/agents for: node_backend, openhands_migrated_agents, auth0, codereview, security, github, schema_generator, feature_lifecycle - Preserve .openhands/ unchanged; mirror agents for Cursor discovery - Ensure Cursor understands stack, layout, and conventions for MWAP backend
…, .cursor/, .specstory/)
|
Looks like there are a few issues preventing this PR from being merged!
If you'd like me to help, just leave a comment, like Feel free to include any additional details that might help me get this PR into a better state. You can manage your notification settings |
There was a problem hiding this comment.
Pull Request Overview
This refactoring PR modernizes the codebase by updating file imports to use TypeScript extensions, implements input sanitization, adds minimal Heroku-optimized testing strategy, enhances logging with correlation IDs, and includes comprehensive documentation updates.
- Updates file imports from
.jsto.tsextensions across test files - Implements input sanitization for tenant and project schemas
- Adds minimal testing strategy optimized for Heroku deployments with fast release gates
Reviewed Changes
Copilot reviewed 39 out of 43 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/utils/*.test.ts | New unit tests for TenantService and ProjectsService |
| tests/setupTests.ts | Enhanced mock setup with multiple import specifier support |
| tests/middleware/auth.test.ts | Updated imports and improved mock handling |
| tests/oauth/oauthCallbackSecurity.test.ts | Modernized import syntax and test structure |
| src/utils/validate.ts | Added sanitizeString utility function |
| src/utils/logger.ts | Enhanced logging with correlation IDs |
| src/schemas/*.schema.ts | Integrated input sanitization via transform |
| src/middleware/validateRequest.ts | New request validation middleware |
| docs/* | Updated documentation to reflect current architecture |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
|
||
|
|
There was a problem hiding this comment.
[nitpick] Remove the extra blank lines at the end of the file. The file should end with a single newline.
|
|
||
|
|
There was a problem hiding this comment.
[nitpick] Remove the extra blank lines at the end of the file. The file should end with a single newline.
| }); | ||
|
|
||
| // Ensure mocks also match other specifiers used by tests/services | ||
| vi.mock('../../src/config/db', () => { |
There was a problem hiding this comment.
There is duplicate mock configuration for the database module with different import specifiers. Consider consolidating these into a single mock definition to reduce code duplication.
| return { getDB: () => db, db }; | ||
| }); | ||
|
|
||
| vi.mock('../../src/config/db.js', () => { |
There was a problem hiding this comment.
There is duplicate mock configuration for the database module with different import specifiers. Consider consolidating these into a single mock definition to reduce code duplication.
|
|
||
|
|
There was a problem hiding this comment.
[nitpick] Remove the extra blank lines at the end of the file. The file should end with a single newline.
|
|
||
|
|
There was a problem hiding this comment.
[nitpick] Remove the extra blank lines at the end of the file. The file should end with a single newline.
Pull Request
Description
Brief description of the changes in this PR.
Type of Change
Related Issues
Closes #(issue number)
Changes Made
Documentation Impact
Testing
npm run docs:validateto check documentation linksSecurity Considerations
Architecture Compliance
Checklist
Screenshots (if applicable)
Add screenshots to help explain your changes.
Additional Notes
Any additional information that reviewers should know.