[codex] fix(hub): route Atlas links through SSO handoff#2311
Conversation
🤖 AI Code ReviewReview by: groq (llama-3.3-70b-versatile) Review of PR: [codex] fix(hub): route Atlas links through SSO handoff🔴 IMPORTANT: Security vulnerabilities
However, there are some potential issues:
🔴 IMPORTANT: Missing error handling on network/IO operations
🟡 WARNING: Logic bugs or incorrect assumptions
🟡 WARNING: Missing input validation at API boundaries
🔵 SUGGESTION: Code quality improvements, naming, maintainability
✅ GOOD: Noteworthy good practices found
Overall, the code seems well-structured and follows good practices. However, there are some potential security and logic issues that should be addressed before merging the PR. Generated by the MIRA automated code review pipeline (Groq → Cerebras → Gemini cascade) |
MIRA staging gate — ✅ PASSEngine + NeonDB staging branch + Groq cascade against fixed questions, graded on the 5-dimension rubric in
Rubric: |
🤖 AI Code ReviewReview by: groq (llama-3.3-70b-versatile) Review of the Pull Request🔴 IMPORTANT: Security vulnerabilities
🔴 IMPORTANT: Missing error handling on network/IO operations
🟡 WARNING: Logic bugs or incorrect assumptions
🟡 WARNING: Missing input validation at API boundaries
🔵 SUGGESTION: Code quality improvements, naming, maintainability
✅ GOOD: Noteworthy good practices found
Generated by the MIRA automated code review pipeline (Groq → Cerebras → Gemini cascade) |
Summary
GET /api/cmms/ssoto exchange the authenticated Hub session for a short-lived signed assertion, call Atlas/auth/sso/hub, and redirect to the Atlas token handoff page./app/...FactoryLM Works paths are accepted, defaulting to/app/work-orders.HUB_SSO_SECRET,HUB_SSO_ISSUER, andHUB_SSO_AUDIENCE, and bumps deploy identity to3.43.1.Companion to Mikecranesync/factorylm#190. This Hub PR needs that Atlas PR deployed, plus the same
HUB_SSO_SECRETconfigured in both services.Validation
./node_modules/.bin/vitest run src/app/api/cmms/health/__tests__/route.test.ts src/app/api/cmms/sso/__tests__/route.test.ts src/lib/cmms/__tests__/cmms-page-links.test.ts src/lib/cmms/__tests__/atlas-provider.test.ts./node_modules/.bin/eslint src/app/api/cmms/sso/route.ts 'src/app/(hub)/cmms/page.tsx' src/lib/cmms/__tests__/cmms-page-links.test.ts src/app/api/cmms/sso/__tests__/route.test.tsgit diff --cached --checkbefore commit: passed.git diff --check: passed before staging.Atlas CMMS SSO Hubfound only older audit PR fix(hub): hub<->Atlas CMMS audit + P0 honesty fixes (NeonDB-as-SoT) #1022;origin/maindid not contain an existing/api/cmms/ssoor/auth/sso/hubexchange to reuse.Manual acceptance after both PRs deploy
HUB_SSO_SECRETin Hub and Atlas CMMS API./app/...path without a second credential prompt.