Fix/tests - #166
Conversation
|
Warning Review limit reached
Next review available in: 38 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (59)
📝 WalkthroughWalkthroughThe change migrates configuration and tests from SigNoz/Redis naming toward OpenTelemetry/Valkey, adds HTTP metrics and conditional tracing startup, updates route and JWT handling, refreshes test containers and coverage data, and regenerates Graphify project artifacts. ChangesRuntime configuration and validation
Generated project artifacts
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (2 warnings, 1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 8
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
test/unit/providers/mfa_code.repository.test.ts (1)
66-85: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winCleanup key no longer matches the written key.
Line 66 writes
strategy:${mockHash}while line 85 deletes the unprefixedmockHash, so the cleanup is a no-op. Harmless today only becausebeforeEachflushes, but it's misleading.🧹 Align the delete key
- await valkey.del(mockHash) + await valkey.del(`strategy:${mockHash}`)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test/unit/providers/mfa_code.repository.test.ts` around lines 66 - 85, Update the cleanup at the end of the findByHash test to delete the same strategy:${mockHash} key written by valkey.set, instead of deleting the unprefixed mockHash key.
🧹 Nitpick comments (3)
graphify-out/graph.json (1)
1-10: 🧹 Nitpick | 🔵 TrivialConsider excluding generated Graphify scan output from version control.
This file is a fully machine-generated dependency graph snapshot (confirmed by the trailing
built_at_commitfield) that will regenerate on virtually every commit, including timestamped subdirectories (e.g.graphify-out/2026-07-29/). Committing ~30k lines of regenerated graph data per PR adds repo bloat, noisy diffs, and merge-conflict risk without reviewable value. Since.gitignoreis already being updated in this PR, consider addinggraphify-out/(or at least its timestamped/cache subpaths) there instead of checking in the generated output.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@graphify-out/graph.json` around lines 1 - 10, Exclude the generated Graphify scan output from version control by adding the graphify-out/ directory to the existing ignore configuration. Remove the tracked graph.json and any timestamped generated subdirectories so future scans do not create committed dependency snapshots.graphify-out/cache/last_query_stamp (1)
1-1: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winKeep the query timestamp out of versioned output.
Line 1 is volatile local cache state and will create non-reproducible churn on every Graphify run. Store it outside the repository or ignore this cache file.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@graphify-out/cache/last_query_stamp` at line 1, Remove the volatile query timestamp from the versioned graphify-out cache output by storing last_query_stamp outside the repository or adding this cache file to the appropriate ignore configuration. Ensure future Graphify runs do not modify tracked output with local timestamp state.coverage/lcov.info (1)
1-96: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUntrack
coverage/lcov.infofrom the PR.
coverage/lcov.infois generated test output that the repo’s own.gitignorealready excludes except as an intentional publish artifact. Committing it would make the repo depend on a specific test run in the working tree; keep the CI upload step instead of tracking the file.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@coverage/lcov.info` around lines 1 - 96, Remove the generated coverage/lcov.info artifact from the change and repository tracking, while preserving the existing CI coverage upload step and intentional publish-artifact behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docker-compose.yml`:
- Line 20: Remove the /var/run/docker.sock bind mount from the API service in
docker-compose.yml. Keep Docker access limited to a dedicated test-only
service/profile or a rootless/remote daemon, ensuring the API container cannot
control the host Docker daemon.
In `@graphify-out/.graphify_incremental.json`:
- Line 1: Remove all workstation-specific /home/andrew/... values from the
Graphify artifacts. In graphify-out/.graphify_incremental.json, use
repository-relative scan_root and file entries; update
graphify-out/.graphify_labels.json and graphify-out/.graphify_uncached.txt to
use relative or hosted paths; render stable repository links in
graphify-out/GRAPH_REPORT.md; and regenerate both specified AST cache JSON files
using IDs derived from repository-relative paths.
In `@src/core/config/cache.ts`:
- Around line 52-54: Update the catch block in the connection URL parsing flow
to stop including the raw host value in logger.error. Log only the parser error,
or sanitize the endpoint so credentials and other sensitive URL components
cannot appear in logs.
- Around line 55-59: Update the host parsing branch in the configuration
resolution flow to handle bracketed IPv6 endpoints such as [::1]:6380 by
extracting the full address and port without splitting every colon. Parse the
port strictly, reject malformed values and any port outside 1–65535, and
validate it before creating the client; preserve normal hostname:port handling.
- Around line 47-62: Update the host parsing flow in the connection setup to
preserve TLS for rediss:// URLs: validate the parsed protocol and pass useTLS
based on parsed.protocol === 'rediss:' when creating the Glide client. Reject
unsupported URL schemes rather than silently connecting without the URI’s
required transport security.
In `@src/presentation/http/routes/login.route.ts`:
- Line 41: Update the refresh route handler around loginRoute.get and
jwtMiddleware so authentication uses one consistent token source: either remove
the unused :token route parameter and retain header-based JWT authentication, or
explicitly validate the parameter against the authenticated token before
invoking core.token.refresh. Ensure core.token.refresh cannot operate on an
unvalidated or divergent URL token.
In `@src/presentation/http/server.ts`:
- Line 23: Remove the startup-time requestHistogram.observe call for the
synthetic GET /metrics request. Ensure histogram_request is populated only by
middleware measuring actual request/response duration, without adding
replacement startup observations.
In `@test/integration/http/login.route.test.ts`:
- Line 70: Complete the telemetry mock migration by removing the obsolete zipkin
block while retaining the opentelemetry configuration in
test/integration/http/login.route.test.ts:70-70,
test/integration/http/mfa.route.test.ts:68-68,
test/integration/http/organization.route.test.ts:68-68,
test/integration/http/reset_password.route.test.ts:69-69, and
test/integration/http/user.route.test.ts:68-68.
---
Outside diff comments:
In `@test/unit/providers/mfa_code.repository.test.ts`:
- Around line 66-85: Update the cleanup at the end of the findByHash test to
delete the same strategy:${mockHash} key written by valkey.set, instead of
deleting the unprefixed mockHash key.
---
Nitpick comments:
In `@coverage/lcov.info`:
- Around line 1-96: Remove the generated coverage/lcov.info artifact from the
change and repository tracking, while preserving the existing CI coverage upload
step and intentional publish-artifact behavior.
In `@graphify-out/cache/last_query_stamp`:
- Line 1: Remove the volatile query timestamp from the versioned graphify-out
cache output by storing last_query_stamp outside the repository or adding this
cache file to the appropriate ignore configuration. Ensure future Graphify runs
do not modify tracked output with local timestamp state.
In `@graphify-out/graph.json`:
- Around line 1-10: Exclude the generated Graphify scan output from version
control by adding the graphify-out/ directory to the existing ignore
configuration. Remove the tracked graph.json and any timestamped generated
subdirectories so future scans do not create committed dependency snapshots.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: aa68661a-d380-4015-aa4c-202d93214c12
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (57)
.gitignore.specify/init-options.json.specify/integration.json.specify/memory/constitution.md.specify/workflows/workflow-registry.jsoncoverage/lcov.infodocker-compose.ymleslint.config.mtsgraphify-out/.graphify_incremental.jsongraphify-out/.graphify_labels.jsongraphify-out/.graphify_labels.json.siggraphify-out/.graphify_uncached.txtgraphify-out/2026-07-29/.graphify_labels.jsongraphify-out/2026-07-29/graph.jsongraphify-out/2026-07-29/manifest.jsongraphify-out/GRAPH_REPORT.mdgraphify-out/cache/ast/v0.9.29/01923eec3f5ae0c34da2c58a3595aed3f66b114059e6e83975056d108e3b09cd.jsongraphify-out/cache/ast/v0.9.29/6b2b2931f2c9b4a44bbeb482c9cab3f72fa875422495984481eec3985a93e94e.jsongraphify-out/cache/last_query_stampgraphify-out/cache/stat-index.jsongraphify-out/cost.jsongraphify-out/graph.htmlgraphify-out/graph.jsongraphify-out/manifest.jsonsrc/@types/express.d.tssrc/config/enviroment_config.tssrc/config/logger.tssrc/core/config/cache.tssrc/core/index.tssrc/core/providers/mfa_choose.repository.tssrc/core/providers/mfa_code.repository.tssrc/core/providers/reset_password.repository.tssrc/core/providers/token.repository.tssrc/core/usecases/login.usecase.tssrc/core/usecases/mfa.usecase.tssrc/core/usecases/mfa_choose.usecase.tssrc/core/usecases/organization.usecase.tssrc/core/usecases/token.usecase.tssrc/presentation/http/app.tssrc/presentation/http/middlewares/jwt.tssrc/presentation/http/routes/login.route.tssrc/presentation/http/server.tssrc/presentation/tracing.tsstryker.config.jsontest/integration/http/login.route.test.tstest/integration/http/logout.route.test.tstest/integration/http/mfa.route.test.tstest/integration/http/organization.route.test.tstest/integration/http/reset_password.route.test.tstest/integration/http/user.route.test.tstest/unit/providers/mfa.repository.test.tstest/unit/providers/mfa_choose.repository.test.tstest/unit/providers/mfa_code.repository.test.tstest/unit/providers/notification.provider.test.tstest/unit/providers/organization.repository.test.tstest/unit/providers/user.repository.test.tstest/unit/usecases/reset_password.usecase.test.ts
💤 Files with no reviewable changes (4)
- src/core/usecases/login.usecase.ts
- .gitignore
- src/presentation/tracing.ts
- src/presentation/http/app.ts
| volumes: | ||
| - .:/app | ||
| - /app/node_modules | ||
| - /var/run/docker.sock:/var/run/docker.sock |
There was a problem hiding this comment.
🔒 Security & Privacy | 🔴 Critical | 🏗️ Heavy lift
Do not mount the host Docker socket into the API container.
This grants any process in api control over the host Docker daemon. If the application or a dependency is compromised, an attacker can create privileged containers or mount the host filesystem. Isolate Testcontainers behind a dedicated test-only service/profile or use a rootless/remote Docker daemon.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docker-compose.yml` at line 20, Remove the /var/run/docker.sock bind mount
from the API service in docker-compose.yml. Keep Docker access limited to a
dedicated test-only service/profile or a rootless/remote daemon, ensuring the
API container cannot control the host Docker daemon.
| @@ -0,0 +1 @@ | |||
| {"files": {"code": ["/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.commitlintrc.json", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.husky/commit-msg", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.husky/pre-commit", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/feature.json", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/init-options.json", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/integration.json", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/integrations/agy.manifest.json", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/integrations/speckit.manifest.json", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/scripts/bash/check-prerequisites.sh", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/scripts/bash/common.sh", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/scripts/bash/create-new-feature.sh", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/scripts/bash/setup-plan.sh", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/scripts/bash/setup-tasks.sh", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/workflows/workflow-registry.json", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/db/migrations/20210526220337_create_user_table.sql", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/db/migrations/20210527202631_create_mfa_table.sql", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/db/migrations/20210703222838_create_admin.sql", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/db/migrations/20211127225354_create_organization.sql", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/db/migrations/20220109235424_create_user_info.sql", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/db/migrations/20260323201209_index.sql", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/eslint.config.mts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/jest.config.js", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/nodemon.json", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/package.json", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/@types/environment.d.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/@types/express.d.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/config/enviroment_config.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/config/logger.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/config/cache.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/config/database.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/config/kafka.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/entities/credentials.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/entities/mfa.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/entities/organization.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/entities/strategy.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/entities/user.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/index.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/providers/mfa.repository.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/providers/mfa_choose.repository.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/providers/mfa_code.repository.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/providers/notification.provider.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/providers/organization.repository.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/providers/reset_password.repository.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/providers/token.repository.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/providers/user.repository.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/services/password.service.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/services/totp.service.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/services/uuid.service.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/adding_user_to_organization.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/creating_mfa.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/creating_mfa_choose.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/creating_mfa_code.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/creating_organization.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/creating_reset_password.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/creating_system_user.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/creating_token.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/creating_user.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/finding_mfa.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/finding_mfa_choose.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/finding_mfa_code.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/finding_organization.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/finding_reset_password.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/finding_user.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/invalidating_token.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/sending_mfa_code.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/sending_mfa_hash.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/sending_reset_email.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/updating_organization.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/updating_user.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/validating_code.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/validating_mfa.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driver/add_user_to_organization.driver.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driver/choose_mfa.driver.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driver/create_mfa.driver.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driver/create_organization.driver.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driver/create_user.driver.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driver/find_mfa_code.driver.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driver/forget_password.driver.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driver/list_mfa.driver.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driver/list_user.driver.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driver/login_user.driver.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driver/logout_user.driver.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driver/recover_password.driver.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driver/refresh_token.driver.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driver/update_organization.driver.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driver/update_user.driver.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driver/validate_mfa.driver.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/login.usecase.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/logout.usecase.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/mfa.usecase.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/mfa_choose.usecase.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/mfa_code.usecase.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/organization.usecase.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/reset_password.usecase.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/token.usecase.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/user.usecase.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/presentation/http/app.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/presentation/http/doc/swagger.json", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/presentation/http/middlewares/jwt.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/presentation/http/middlewares/trace.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/presentation/http/routes/login.route.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/presentation/http/routes/logout.route.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/presentation/http/routes/mfa.route.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/presentation/http/routes/organization.route.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/presentation/http/routes/reset_password.route.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/presentation/http/routes/user.route.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/presentation/http/server.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/presentation/tracing.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/stryker.config.json", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/fixtures/generators.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/fixtures/multi_factor_authentication.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/fixtures/organization.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/fixtures/setup_migration.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/fixtures/user.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/fixtures/user_info.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/integration/http/login.route.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/integration/http/logout.route.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/integration/http/mfa.route.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/integration/http/organization.route.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/integration/http/reset_password.route.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/integration/http/server.route.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/integration/http/user.route.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/loading/k6.js", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/providers/mfa.repository.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/providers/mfa_choose.repository.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/providers/mfa_code.repository.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/providers/notification.provider.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/providers/organization.repository.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/providers/user.repository.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/services/code.services.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/services/password.services.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/services/uuid.services.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/usecases/login.usecase.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/usecases/logout.usecase.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/usecases/mfa.usecase.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/usecases/mfa_choose.usecase.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/usecases/mfa_code.usecase.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/usecases/organization.usecase.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/usecases/reset_password.usecase.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/usecases/token.usecase.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/usecases/user.usecase.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/tsconfig.json"], "document": ["/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.github/pull_request_template.md", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.github/workflows/continuous_integration.yml", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.github/workflows/test_load.yml", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.github/workflows/test_mutation.yml", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/memory/constitution.md", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/templates/checklist-template.md", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/templates/constitution-template.md", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/templates/plan-template.md", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/templates/spec-template.md", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/templates/tasks-template.md", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/workflows/speckit/workflow.yml", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/README.md", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/docker-compose.yml", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/specs/001-add-flow-logging/checklists/requirements.md", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/specs/001-add-flow-logging/data-model.md", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/specs/001-add-flow-logging/plan.md", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/specs/001-add-flow-logging/quickstart.md", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/specs/001-add-flow-logging/research.md", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/specs/001-add-flow-logging/spec.md", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/specs/001-add-flow-logging/tasks.md"], "paper": [], "image": ["/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/db/MER.png", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/graph.svg"], "video": []}, "total_files": 164, "total_words": 43798, "needs_graph": false, "warning": "Corpus is ~43,798 words - fits in a single context window. You may not need a graph.", "skipped_sensitive": [], "unclassified": ["/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.dockerignore", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.git", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.github/CODEOWNERS", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.gitignore", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.nvmrc", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.prettierignore", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.prettierrc", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/Dockerfile", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/makefile", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/sonar-project.properties"], "walk_errors": [], "ignored": ["/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.agents/", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.env"], "pruned_noise_dirs": ["/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/coverage/", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/graphify-out/", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/node_modules/"], "graphifyignore_patterns": 50, "scan_root": "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication", "incremental": true, "new_files": {"code": ["/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/feature.json", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/init-options.json", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/integration.json", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/workflows/workflow-registry.json", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/eslint.config.mts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/@types/express.d.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/config/enviroment_config.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/config/logger.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/config/cache.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/index.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/providers/mfa.repository.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/providers/mfa_choose.repository.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/providers/mfa_code.repository.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/providers/reset_password.repository.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/providers/token.repository.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/providers/user.repository.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/login.usecase.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/logout.usecase.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/mfa.usecase.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/mfa_choose.usecase.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/mfa_code.usecase.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/organization.usecase.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/reset_password.usecase.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/token.usecase.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/user.usecase.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/presentation/http/app.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/presentation/http/middlewares/jwt.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/presentation/http/routes/login.route.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/presentation/http/server.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/presentation/tracing.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/stryker.config.json", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/integration/http/login.route.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/integration/http/logout.route.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/integration/http/mfa.route.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/integration/http/organization.route.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/integration/http/reset_password.route.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/integration/http/user.route.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/providers/mfa.repository.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/providers/mfa_choose.repository.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/providers/mfa_code.repository.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/providers/notification.provider.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/providers/organization.repository.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/providers/user.repository.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/usecases/reset_password.usecase.test.ts"], "document": ["/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.github/pull_request_template.md", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.github/workflows/continuous_integration.yml", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.github/workflows/test_load.yml", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.github/workflows/test_mutation.yml", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/memory/constitution.md", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/templates/checklist-template.md", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/templates/constitution-template.md", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/templates/plan-template.md", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/templates/spec-template.md", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/templates/tasks-template.md", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/workflows/speckit/workflow.yml", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/README.md", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/docker-compose.yml", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/specs/001-add-flow-logging/checklists/requirements.md", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/specs/001-add-flow-logging/data-model.md", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/specs/001-add-flow-logging/plan.md", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/specs/001-add-flow-logging/quickstart.md", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/specs/001-add-flow-logging/research.md", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/specs/001-add-flow-logging/spec.md", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/specs/001-add-flow-logging/tasks.md"], "paper": [], "image": ["/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/db/MER.png", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/graph.svg"], "video": []}, "unchanged_files": {"code": ["/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.commitlintrc.json", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.husky/commit-msg", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.husky/pre-commit", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/integrations/agy.manifest.json", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/integrations/speckit.manifest.json", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/scripts/bash/check-prerequisites.sh", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/scripts/bash/common.sh", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/scripts/bash/create-new-feature.sh", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/scripts/bash/setup-plan.sh", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/.specify/scripts/bash/setup-tasks.sh", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/db/migrations/20210526220337_create_user_table.sql", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/db/migrations/20210527202631_create_mfa_table.sql", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/db/migrations/20210703222838_create_admin.sql", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/db/migrations/20211127225354_create_organization.sql", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/db/migrations/20220109235424_create_user_info.sql", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/db/migrations/20260323201209_index.sql", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/jest.config.js", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/nodemon.json", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/package.json", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/@types/environment.d.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/config/database.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/config/kafka.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/entities/credentials.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/entities/mfa.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/entities/organization.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/entities/strategy.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/entities/user.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/providers/notification.provider.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/providers/organization.repository.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/services/password.service.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/services/totp.service.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/services/uuid.service.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/adding_user_to_organization.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/creating_mfa.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/creating_mfa_choose.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/creating_mfa_code.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/creating_organization.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/creating_reset_password.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/creating_system_user.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/creating_token.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/creating_user.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/finding_mfa.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/finding_mfa_choose.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/finding_mfa_code.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/finding_organization.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/finding_reset_password.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/finding_user.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/invalidating_token.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/sending_mfa_code.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/sending_mfa_hash.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/sending_reset_email.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/updating_organization.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/updating_user.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/validating_code.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driven/validating_mfa.driven.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driver/add_user_to_organization.driver.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driver/choose_mfa.driver.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driver/create_mfa.driver.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driver/create_organization.driver.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driver/create_user.driver.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driver/find_mfa_code.driver.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driver/forget_password.driver.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driver/list_mfa.driver.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driver/list_user.driver.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driver/login_user.driver.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driver/logout_user.driver.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driver/recover_password.driver.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driver/refresh_token.driver.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driver/update_organization.driver.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driver/update_user.driver.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/core/usecases/driver/validate_mfa.driver.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/presentation/http/doc/swagger.json", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/presentation/http/middlewares/trace.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/presentation/http/routes/logout.route.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/presentation/http/routes/mfa.route.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/presentation/http/routes/organization.route.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/presentation/http/routes/reset_password.route.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/src/presentation/http/routes/user.route.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/fixtures/generators.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/fixtures/multi_factor_authentication.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/fixtures/organization.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/fixtures/setup_migration.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/fixtures/user.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/fixtures/user_info.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/integration/http/server.route.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/loading/k6.js", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/services/code.services.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/services/password.services.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/services/uuid.services.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/usecases/login.usecase.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/usecases/logout.usecase.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/usecases/mfa.usecase.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/usecases/mfa_choose.usecase.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/usecases/mfa_code.usecase.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/usecases/organization.usecase.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/usecases/token.usecase.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/test/unit/usecases/user.usecase.test.ts", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/tsconfig.json"], "document": [], "paper": [], "image": [], "video": []}, "new_total": 66, "deleted_files": ["/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/otel-collector.yaml", "/home/andrew/Documents/auth-plus-symphony/auth-plus-authentication/uptrace.yml"], "excluded_files": []} No newline at end of file | |||
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Remove workstation-specific absolute paths from all Graphify artifacts.
The same /home/andrew/... workspace path is embedded in cache paths, report links, labels, and graph node IDs. This both discloses local filesystem details and makes generated artifacts non-portable across CI and other checkouts.
graphify-out/.graphify_incremental.json#L1-L1: storescan_rootand indexed files relative to the repository.graphify-out/.graphify_labels.json#L1-L1: replace localfile://labels with relative or hosted links.graphify-out/.graphify_uncached.txt#L1-L22: emit repository-relative diagnostic paths.graphify-out/GRAPH_REPORT.md#L18-L18: render stable repository links.graphify-out/cache/ast/v0.9.29/01923eec3f5ae0c34da2c58a3595aed3f66b114059e6e83975056d108e3b09cd.json#L4-L15: derive AST IDs from relative paths.graphify-out/cache/ast/v0.9.29/6b2b2931f2c9b4a44bbeb482c9cab3f72fa875422495984481eec3985a93e94e.json#L1-L1: apply the same stable ID scheme.
📍 Affects 6 files
graphify-out/.graphify_incremental.json#L1-L1(this comment)graphify-out/.graphify_labels.json#L1-L1graphify-out/.graphify_uncached.txt#L1-L22graphify-out/GRAPH_REPORT.md#L18-L18graphify-out/cache/ast/v0.9.29/01923eec3f5ae0c34da2c58a3595aed3f66b114059e6e83975056d108e3b09cd.json#L4-L15graphify-out/cache/ast/v0.9.29/6b2b2931f2c9b4a44bbeb482c9cab3f72fa875422495984481eec3985a93e94e.json#L1-L1
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@graphify-out/.graphify_incremental.json` at line 1, Remove all
workstation-specific /home/andrew/... values from the Graphify artifacts. In
graphify-out/.graphify_incremental.json, use repository-relative scan_root and
file entries; update graphify-out/.graphify_labels.json and
graphify-out/.graphify_uncached.txt to use relative or hosted paths; render
stable repository links in graphify-out/GRAPH_REPORT.md; and regenerate both
specified AST cache JSON files using IDs derived from repository-relative paths.
| if (host.includes('://')) { | ||
| try { | ||
| const parsed = new URL(host) | ||
| resolvedHost = parsed.hostname | ||
| resolvedPort = parsed.port ? parseInt(parsed.port, 10) : 6379 | ||
| } catch (e) { | ||
| logger.error(`Failed parsing connection URL: ${host}, error: ${e}`) | ||
| } | ||
| } else if (host.includes(':')) { | ||
| const parts = host.split(':') | ||
| resolvedHost = parts[0] | ||
| resolvedPort = parseInt(parts[1], 10) | ||
| } | ||
|
|
||
| this.client = await GlideClient.createClient({ | ||
| addresses: [{ host, port: 6379 }], | ||
| addresses: [{ host: resolvedHost, port: resolvedPort }], |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
tmp="$(mktemp -d)"
trap 'rm -rf "$tmp"' EXIT
tarball="$(cd "$tmp" && npm pack --silent `@valkey/valkey-glide`@2.4.2)"
tar -xzf "$tmp/$tarball" -C "$tmp"
rg -n "useTLS|TLS" "$tmp/package/README.md" "$tmp/package/types" "$tmp/package/src"Repository: auth-plus/auth-plus-authentication
Length of output: 932
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
# Locate and inspect the cache config around the URL parsing code.
if [ -f src/core/config/cache.ts ]; then
sed -n '1,120p' src/core/config/cache.ts | cat -n
else
fd -a 'cache\.ts$' . | sed n
fi
# Determine the package version and exact URL option handling in the local workspace, if present.
rg -n "'`@valkey/valkey-glide`'|`@valkey/valkey-glide`|GlideClient\.createClient|useTLS|protocol" package.json package-lock.json pnpm-lock.yaml yarn.lock src || true
# Behavioral probe: Node URL hostname/port extraction matches the code pattern.
node - <<'JS'
for (const host of ['rediss://user:pass@example.com:6379', 'redis://example.com:6379', 'example.com:6379']) {
let resolvedHost, resolvedPort
if (host.includes('://')) {
try {
const parsed = new URL(host)
resolvedHost = parsed.hostname
resolvedPort = parsed.port ? parseInt(parsed.port, 10) : 6379
} catch (e) {}
} else if (host.includes(':')) {
const parts = host.split(':')
resolvedHost = parts[0]
resolvedPort = parseInt(parts[1], 10)
}
console.log(JSON.stringify({host, resolvedHost, resolvedPort, tls: false}))
}
JSRepository: auth-plus/auth-plus-authentication
Length of output: 7527
🌐 Web query:
@valkey/valkey-glide 2.4.2 README TLS useTLS rediss GlideClient createClient
💡 Result:
In @valkey/valkey-glide (Node.js), you enable Transport Layer Security (TLS) by setting the useTLS property to true within the configuration object passed to GlideClient.createClient or GlideClusterClient.createClient [1][2][3]. It is important to note that you must explicitly set useTLS: true if your server requires TLS; otherwise, the client connection attempt may time out silently [1][2]. While some Redis client libraries support rediss:// URI schemes for automatic configuration, Valkey GLIDE uses the useTLS boolean flag in its configuration objects [4][5]. For advanced TLS scenarios, such as using self-signed certificates or bypassing certificate validation, you must use the advancedConfiguration property [6][3]. Example of basic TLS configuration: const client = await GlideClient.createClient({ addresses: [{ host: "localhost", port: 6379 }], useTLS: true, }); Example of advanced TLS configuration (e.g., insecure mode): const client = await GlideClient.createClient({ addresses: [{ host: "localhost", port: 6379 }], useTLS: true, advancedConfiguration: { tlsAdvancedConfiguration: { insecure: true } } }); When providing custom root certificates for internal or self-signed CAs, you can specify them via the rootCertificates property (as a string or Buffer in PEM format) within the same tlsAdvancedConfiguration object [6][3]. If this property is omitted, the client defaults to using the system's certificate trust store [7][6][3].
Citations:
- 1: https://github.com/valkey-io/valkey-glide/blob/main/node/README.md
- 2: https://www.npmjs.com/package/@valkey/valkey-glide
- 3: https://github.com/valkey-io/valkey-glide/wiki/NodeJS-wrapper
- 4: https://glide.valkey.io/languages/nodejs/api/interfaces/BaseClient.BaseClientConfiguration.html
- 5: https://valkey.io/valkey-glide/node/BaseClient/interfaces/BaseClientConfiguration/
- 6: https://glide.valkey.io/languages/nodejs/api/interfaces/BaseClient.AdvancedBaseClientConfiguration.html
- 7: https://glide.valkey.io/tutorials/tls/
Preserve TLS semantics for rediss:// host configurations.
rediss://user:pass@example.com:6379 is parsed down to hostname/port, then Glide is initialized without useTLS; this drops the TLS requirement from the URI and can cause TLS connections to time out silently. Validate the scheme and pass useTLS: parsed.protocol === 'rediss:', or reject unsupported schemes.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/core/config/cache.ts` around lines 47 - 62, Update the host parsing flow
in the connection setup to preserve TLS for rediss:// URLs: validate the parsed
protocol and pass useTLS based on parsed.protocol === 'rediss:' when creating
the Glide client. Reject unsupported URL schemes rather than silently connecting
without the URI’s required transport security.
| } catch (e) { | ||
| logger.error(`Failed parsing connection URL: ${host}, error: ${e}`) | ||
| } |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Do not log raw connection URLs.
If a malformed URL contains credentials, this error message writes the full password-bearing connection string to logs. Log only the parser error or a sanitized endpoint.
🛡️ Proposed fix
} catch (e) {
- logger.error(`Failed parsing connection URL: ${host}, error: ${e}`)
+ logger.error(
+ `Failed parsing connection URL: ${
+ e instanceof Error ? e.message : String(e)
+ }`
+ )
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| } catch (e) { | |
| logger.error(`Failed parsing connection URL: ${host}, error: ${e}`) | |
| } | |
| } catch (e) { | |
| logger.error( | |
| `Failed parsing connection URL: ${ | |
| e instanceof Error ? e.message : String(e) | |
| }` | |
| ) | |
| } |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/core/config/cache.ts` around lines 52 - 54, Update the catch block in the
connection URL parsing flow to stop including the raw host value in
logger.error. Log only the parser error, or sanitize the endpoint so credentials
and other sensitive URL components cannot appear in logs.
| } else if (host.includes(':')) { | ||
| const parts = host.split(':') | ||
| resolvedHost = parts[0] | ||
| resolvedPort = parseInt(parts[1], 10) | ||
| } |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Handle IPv6 endpoints and validate ports.
Splitting every colon-delimited value breaks valid addresses such as [::1]:6380, producing an invalid host and NaN port. parseInt also accepts malformed suffixes. Parse bracketed IPv6 explicitly and reject ports outside 1–65535 before creating the client.
🐛 Proposed fix
} else if (host.includes(':')) {
- const parts = host.split(':')
- resolvedHost = parts[0]
- resolvedPort = parseInt(parts[1], 10)
+ const parsed = new URL(`redis://${host}`)
+ resolvedHost = parsed.hostname
+ resolvedPort = parsed.port ? Number(parsed.port) : 6379
+ if (!Number.isInteger(resolvedPort) || resolvedPort < 1 || resolvedPort > 65535) {
+ throw new Error('Invalid Valkey port')
+ }
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| } else if (host.includes(':')) { | |
| const parts = host.split(':') | |
| resolvedHost = parts[0] | |
| resolvedPort = parseInt(parts[1], 10) | |
| } | |
| } else if (host.includes(':')) { | |
| const parsed = new URL(`redis://${host}`) | |
| resolvedHost = parsed.hostname | |
| resolvedPort = parsed.port ? Number(parsed.port) : 6379 | |
| if (!Number.isInteger(resolvedPort) || resolvedPort < 1 || resolvedPort > 65535) { | |
| throw new Error('Invalid Valkey port') | |
| } | |
| } |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/core/config/cache.ts` around lines 55 - 59, Update the host parsing
branch in the configuration resolution flow to handle bracketed IPv6 endpoints
such as [::1]:6380 by extracting the full address and port without splitting
every colon. Parse the port strictly, reject malformed values and any port
outside 1–65535, and validate it before creating the client; preserve normal
hostname:port handling.
| }) as RequestHandler) | ||
|
|
||
| loginRoute.get('/refresh/', jwtMiddleware, (async ( | ||
| loginRoute.get('/refresh/:token', jwtMiddleware, (async ( |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== files =="
git ls-files | rg 'src/presentation/http/routes/login.route.ts|jwtMiddleware|auth|middleware' || true
echo
echo "== login route outline and relevant content =="
if [ -f src/presentation/http/routes/login.route.ts ]; then
wc -l src/presentation/http/routes/login.route.ts
sed -n '1,120p' src/presentation/http/routes/login.route.ts | cat -n
fi
echo
echo "== jwtMiddleware definition/usages =="
rg -n "jwtMiddleware|refresh/:token|Authorization|req\.token|req\.params\.token" -S .Repository: auth-plus/auth-plus-authentication
Length of output: 50391
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== login route =="
wc -l src/presentation/http/routes/login.route.ts
sed -n '1,140p' src/presentation/http/routes/login.route.ts | cat -n
echo
echo "== jwtMiddleware definitions/usages (precise) =="
rg -n "export \* jwtMiddleware|jwtMiddleware|Authorization|Bearer|req\.token|req\.params\.token|refresh/:token|/refresh/:token" src middleware configuration test --glob '!**/node_modules/**' || true
echo
echo "== focused middleware files =="
fd -i 'jwt|auth|middleware' src | sed -n '1,120p'Repository: auth-plus/auth-plus-authentication
Length of output: 4269
Consume the :token route parameter or keep header auth only.
jwtMiddleware only reads Authorization: Bearer ..., while refresh reads req.token. Requests to /refresh/<new-token> without the Bearer header will fail, and if the parameter is trusted, the refreshed token can diverge from the token passed in the URL. Keep this as the existing header-based refresh route, or validate the parameter before calling core.token.refresh.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/presentation/http/routes/login.route.ts` at line 41, Update the refresh
route handler around loginRoute.get and jwtMiddleware so authentication uses one
consistent token source: either remove the unused :token route parameter and
retain header-based JWT authentication, or explicitly validate the parameter
against the authenticated token before invoking core.token.refresh. Ensure
core.token.refresh cannot operate on an unvalidated or divergent URL token.
| labelNames: ['method', 'route', 'code'], | ||
| buckets: [0.1, 5, 15, 50, 100, 500], | ||
| }) | ||
| requestHistogram.observe({ method: 'GET', route: '/metrics', code: '200' }, 1) |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
rg -nP '\brequestHistogram\.(observe|startTimer)\b' src/presentation/http/server.tsRepository: auth-plus/auth-plus-authentication
Length of output: 254
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '--- relevant server.ts section ---\n'
sed -n '1,80p' src/presentation/http/server.ts
printf '\n--- requestHistogram definitions/usages ---\n'
rg -n 'requestHistogram|histogramMetrics|startTimer|observe\(' src/presentation src -g '!*.test.*' -g '!*.spec.*' || true
printf '\n--- route/middleware setup references ---\n'
rg -n "app\.use|router|metrics|requestHistogram|Express|Koa|Fastify|Server\(" src/presentation src -g '!*.test.*' -g '!*.spec.*' | head -200Repository: auth-plus/auth-plus-authentication
Length of output: 263
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo '--- relevant server.ts section ---'
sed -n '1,80p' src/presentation/http/server.ts
echo
echo '--- requestHistogram definitions/usages ---'
rg -n 'requestHistogram|histogramMetrics|startTimer|observe\(' src/presentation src -g '!*.test.*' -g '!*.spec.*' || true
echo
echo '--- route/middleware setup references ---'
rg -n "app\.use|router|metrics|requestHistogram|Express|Koa|Fastify|Server\(" src/presentation src -g '!*.test.*' -g '!*.spec.*' | head -200Repository: auth-plus/auth-plus-authentication
Length of output: 5433
Remove the synthetic histogram observation.
This records a fake 1 ms /metrics request at startup, so histogram_request metrics start non-zero without reflecting real request latency. Measure actual request/response duration via middleware instead.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/presentation/http/server.ts` at line 23, Remove the startup-time
requestHistogram.observe call for the synthetic GET /metrics request. Ensure
histogram_request is populated only by middleware measuring actual
request/response duration, without adding replacement startup observations.
9b85791 to
3853163
Compare
|


Summary by CodeRabbit
New Features
/metricsfor monitoring application performance.Improvements
Tests