Skip to content

Commit db3d8e4

Browse files
committed
Strengthen ingestion rules: document 1-cron limit as critical rule
1 parent da4dd32 commit db3d8e4

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

CLAUDE.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,18 @@
99
- If a user shares a credential in conversation, do NOT echo it back in code, commits, or file contents
1010
- `.env.local` is gitignored — secrets belong there, never in tracked files
1111

12-
### Data Ingestion Pipeline — DO NOT MODIFY
13-
- **NEVER** change the ingestion configuration, cron schedule, or `CRON_SECRET` / auth logic in `src/app/api/ingest/route.ts` without explicit user approval
12+
### Data Ingestion Pipeline — DO NOT MODIFY (CRITICAL)
13+
- **NEVER** change the ingestion configuration, cron schedule, or auth logic in `src/app/api/ingest/route.ts` without explicit user approval
1414
- **NEVER** add, remove, or modify Vercel environment variables (`CRON_SECRET`, `DATABASE_URL`, `INGEST_API_KEY`) without explicit user approval
1515
- **NEVER** modify `vercel.json` cron schedules without explicit user approval
1616
- **NEVER** change USGS site mappings, station IDs, or the `USGS_SITES` array without verifying against live USGS API data first
17-
- The pipeline was broken for 13 days (March 17-30, 2026) because a `CRON_SECRET` env var was added that mismatched Vercel's internal cron auth. Any change to ingestion auth can silently break data flow.
18-
- If you need to debug ingestion, check the `/api/health` endpoint and ingestion logs first — never modify the pipeline as a troubleshooting step
19-
- Current working cron schedule: USGS daily 06:00 UTC (single cron — Vercel Hobby plan allows only 1 cron job per day)
20-
- EPA and WQP ingestion must be triggered manually from admin panel (or upgrade Vercel plan for more crons)
21-
- **NEVER add more than 1 cron job** on the free plan — having multiple crons caused Vercel to disable ALL cron execution
17+
- **NEVER add more than 1 cron job in `vercel.json`** — Vercel Hobby (free) plan allows only 1 cron per day. Adding more silently disables ALL cron execution. This rule stands until user confirms they have upgraded the Vercel plan.
18+
- Two data loss incidents caused by unauthorized changes:
19+
1. `CRON_SECRET` env var added → broke auth for 13 days (March 17-30, 2026)
20+
2. Three cron jobs added → exceeded free plan limit, disabled all crons (March 30-31, 2026)
21+
- Current working configuration: **single USGS cron at 06:00 UTC daily** in `vercel.json`
22+
- EPA and WQP ingestion: trigger manually from admin panel only
23+
- If you need to debug ingestion, check `/api/health` endpoint and ingestion logs first — never modify the pipeline as a troubleshooting step
2224

2325
### Git Commit & Push Rules — IP Protection
2426
- **NEVER** use Claude/Anthropic as the git author or committer — always commit as the repository owner:

0 commit comments

Comments
 (0)