Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion apps/alerting/alchemy.run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,13 @@ export const createAlertingWorker = ({ stage, mapleDb, chatFlue }: CreateAlertin
MAPLE_APP_BASE_URL: process.env.MAPLE_APP_BASE_URL?.trim() || "https://app.maple.dev",
EMAIL_FROM: process.env.EMAIL_FROM?.trim() || "Maple <notifications@noreply.maple.dev>",
...optionalPlain("MAPLE_ENDPOINT"),
...optionalPlain("MAPLE_ENVIRONMENT", resolveDeploymentEnvironment(stage)),
// Derived from the stage, deliberately NOT `optionalPlain` — that helper
// lets `process.env` win over the fallback, so a stray
// MAPLE_ENVIRONMENT=production in a pr-N deploy environment would open
// both email gates at once (the worker's scheduled() early-return and
// EmailService.emailAllowed both derive from this one value), leaving
// the prd-only EMAIL binding as the sole guard.
MAPLE_ENVIRONMENT: resolveDeploymentEnvironment(stage),
// Non-prod stages skip all crons (they share live org data via the prod
// DB); set to "1" on a stage to deliberately exercise crons there.
...optionalPlain("MAPLE_ALERTING_ALLOW_NONPROD"),
Expand Down
6 changes: 5 additions & 1 deletion apps/api/alchemy.run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,11 @@ export const createMapleApi = ({ stage, domains }: CreateMapleApiOptions) =>
SERVICE_OPERATIONS_ROLLUP_ENABLED:
process.env.SERVICE_OPERATIONS_ROLLUP_ENABLED?.trim() || "false",
...optionalPlain("MAPLE_ENDPOINT"),
...optionalPlain("MAPLE_ENVIRONMENT", resolveDeploymentEnvironment(stage)),
// Derived from the stage, deliberately NOT `optionalPlain` — that helper
// lets `process.env` win over the fallback, so a stray
// MAPLE_ENVIRONMENT=production in a pr-N deploy environment would open
// EmailService.emailAllowed on a stage that shares live org data.
MAPLE_ENVIRONMENT: resolveDeploymentEnvironment(stage),
...optionalPlain("COMMIT_SHA"),
MAPLE_INGEST_KEY: Redacted.make(requireEnv("MAPLE_OTEL_INGEST_KEY")),
...optionalSecret("MAPLE_ROOT_PASSWORD"),
Expand Down
Loading