|
9 | 9 | - If a user shares a credential in conversation, do NOT echo it back in code, commits, or file contents |
10 | 10 | - `.env.local` is gitignored — secrets belong there, never in tracked files |
11 | 11 |
|
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 |
14 | 14 | - **NEVER** add, remove, or modify Vercel environment variables (`CRON_SECRET`, `DATABASE_URL`, `INGEST_API_KEY`) without explicit user approval |
15 | 15 | - **NEVER** modify `vercel.json` cron schedules without explicit user approval |
16 | 16 | - **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 |
22 | 24 |
|
23 | 25 | ### Git Commit & Push Rules — IP Protection |
24 | 26 | - **NEVER** use Claude/Anthropic as the git author or committer — always commit as the repository owner: |
|
0 commit comments