Skip to content
This repository was archived by the owner on Jun 9, 2026. It is now read-only.

chore: force env variables - #1080

Open
tomer-tgp wants to merge 1 commit into
developfrom
remove-credentials-fallback
Open

chore: force env variables#1080
tomer-tgp wants to merge 1 commit into
developfrom
remove-credentials-fallback

Conversation

@tomer-tgp

@tomer-tgp tomer-tgp commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

Note

Low Risk
Low risk: only affects the seed script startup behavior by failing fast when required env vars are missing; no runtime application logic changes.

Overview
Removes hardcoded fallback credentials from seed/users.ts and requires ADMIN_EMAIL, ADMIN_PASSWORD, CANDIDATE_EMAIL, and CANDIDATE_PASSWORD to be present in the environment.

The seed script now throws a clear error early if any of these variables are unset, preventing seeds from running with default test accounts.

Written by Cursor Bugbot for commit 312561c. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

Comment thread seed/users.ts
throw new Error(
'ADMIN_EMAIL, ADMIN_PASSWORD, CANDIDATE_EMAIL, and CANDIDATE_PASSWORD must be set in the environment variables',
)
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Module validation breaks CSV-only seeding in production

Medium Severity

The validation check runs at module load time, meaning it executes whenever seed/users.ts is imported - even in production/qa/dev environments where only CSV seeds run and seedUsers is never called. The import in seed/seed.ts (line 7) triggers this validation unconditionally, so the seed script now fails in production environments that don't have ADMIN_EMAIL, ADMIN_PASSWORD, CANDIDATE_EMAIL, and CANDIDATE_PASSWORD set, even though those values are only needed for factory seeds.

Fix in Cursor Fix in Web

@github-actions

github-actions Bot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔴 Lines 22.36% 1676 / 7493
🔴 Statements 22.14% 1702 / 7684
🔴 Functions 29.72% 448 / 1507
🔴 Branches 12.86% 573 / 4453
File CoverageNo changed files found.
Generated in workflow #1210 for commit 312561c by the Vitest Coverage Report Action

@github-actions

github-actions Bot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

📊 Overall Test Coverage

21.77% (average of lines, statements, functions, and branches)

@github-actions

github-actions Bot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

Preview Environment

Your preview environment is ready!

Resource URL
API https://pr-1080.preview.goodparty.org
Health Check https://pr-1080.preview.goodparty.org/v1/health

This environment will be automatically destroyed when the PR is closed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant