feat(qa): provision-qa-user.ts — dedicated QA login provisioning#2255
Open
Mikecranesync wants to merge 1 commit into
Open
feat(qa): provision-qa-user.ts — dedicated QA login provisioning#2255Mikecranesync wants to merge 1 commit into
Mikecranesync wants to merge 1 commit into
Conversation
Companion to set-qa-member-password.ts. Idempotently CREATES a dedicated, attributable QA account (default hermes-qa@factorylm.com) in a target tenant (default Stardust e88bd0e8) and sets its password, so a headless QA agent can sign in via the NextAuth password path. ON CONFLICT(email_lower) rotates the password rather than duplicating; status=active passes the middleware gate; verifies the tenant exists first. Operator runs it (prod write). Revoke via DELETE FROM hub_users WHERE email_lower=... Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
🤖 AI Code ReviewReview by: groq (llama-3.3-70b-versatile) Review of
|
MIRA staging gate — ✅ PASSEngine + NeonDB staging branch + Groq cascade against fixed questions, graded on the 5-dimension rubric in
Rubric: |
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.
What & why
Adds
mira-hub/scripts/provision-qa-user.ts— a companion toset-qa-member-password.ts(PR #2205). It idempotently creates a dedicated, attributable QA account in a target tenant and sets its password, so a headless QA agent (Hermes) can sign in via the NextAuth password path.Used to unblock secret-shopper testing: provisioned
hermes-qa@factorylm.com(technician) in the Stardust Racers tenante88bd0e8. Login was verified end-to-end against prod (NextAuth/api/auth/callback/credentials→ valid session minted).Behavior / safety
INSERT … ON CONFLICT (email_lower) DO UPDATE— re-running rotates the password and re-pins tenant/role/status; never duplicates.status='active'(passes the middlewaregateRedirect; nottrial, which expires).DELETE FROM hub_users WHERE email_lower='<QA_EMAIL>';Why a second script
set-qa-member-password.tsonly passwords an existing member (won't create). When you want a clean, revocable QA identity (hermes-qa@…) instead of borrowing a real persona (rico@…), this one creates it.Verification
/api/auth/session/returned the authenticatedHermes QAuser in tenante88bd0e8.VERSION3.39.13 → 3.39.14.🤖 Generated with Claude Code