Repository navigation
fix(infra): one warehouse env for every querying Worker, and small Worker fixes - #2441
Merged
Merged
Maple Review Bot / Maple / review
succeeded
Nov 10, 2026 in 2m 12s
Confidence 9/10 · No issues found
🟢 Confidence 9/10 · safe to merge. The warehouse env merge only shows on a real deploy; the status cache change is pinned by three new tests.
no findings · tests partial −1 · risk medium
Consolidates the five warehouse keys into clickhouseEnv bound to the API, alerting and AI Workers, caches a KV host miss in the status Worker, shares queue retry limits, and drops a dead email flag, three consumer shims and the v1 Electric shape. Safe to merge. Neither open McpQueryError nor CancellationReviewError issue is addressed by this diff.
clickhouseEnvbindsCLICKHOUSE_URLto the alerting and AI WorkerspageIdForHostcaches a KV host miss for 30 seconds- Queue retry limits move into one
queue-retry-limitsmodule - The v1
alert_destinationsElectric shape is retired
Before merge
- Infra · Check every environment has what this config now expects ·
alchemy.run.ts - Manual · Every stage that sets
CLICKHOUSE_URLmust let the ai and alerting Workers reach that endpoint
Production impact
Open errors in the changed files (3)
| Issue | Service | Occurrences | File |
|---|---|---|---|
| @maple/mcp/errors/McpQueryError (2 issues) | maple-chat | 6 | apps/electric-sync/src/shapes/registry.ts |
| @maple/mcp/errors/McpQueryError (7 issues) | maple-ai | 21 | apps/electric-sync/src/shapes/registry.ts |
| @maple/backend/cancellation-review/CancellationReviewError | maple-cancellation-reviews | 3 | apps/api/src/cancellation-review-runtime.ts |
After this merges, Maple checks whether they stop.
Production traffic of the changed files (last 7 days)
| File | Calls/day | Busiest operations |
|---|---|---|
apps/api/src/audit-events-runtime.ts |
108k | WarehouseQueryService.ingest 55k/day, 0.0% errWarehouseQueryService.ingest 40k/day, 0.0% errWarehouseQueryService.ingest 12k/day, 0.0% err |
packages/backend/src/platform/EmailService.ts |
221 | EmailService.send 221/day, 0.4% err |
What was checked
- Traced
resolveTarget: a cached host miss still falls through to/s/<slug>(handler.ts:33) - Grep at head: nothing reads
MAPLE_EMAIL_ALLOW_NONPRODor the v1alert_destinationsshape mergespreads nested record configs, soclickhouseEnvlands exactly as the api's five keys did
4ed7f94 · Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.
Loading