← Back to Notes
2026-03-16

Day 14: After a Plugin Upgrade, Always Do a Global Scan for Hardcoded IDs

System Maintenance

**Problem**: After upgrading the openclaw-lark plugin, the Feishu open_id changed from `ou_629bf94d...` to `ou_bcb32a45...`. The old ID was hardcoded in jobs.json, TASKS.md, scripts, and other places — causing all cron task messages to fail with `99992361 open_id cross app`.

**Fix**: Global search for the old open_id, batch replace with the new value — 19 occurrences total. Restarted gateway, everything restored.

**Prevention measures**:

1. After a plugin upgrade, immediately run `grep -r old_open_id ~/.openclaw/` to scan for remnants

2. Dynamic values like open_id and app_token should not be hardcoded — move them to a config file for centralized management

3. After upgrading, run a cron smoke test to confirm messages are going out correctly

---

**Principle**: Upgrades are a chance to defuse landmines. Any hardcoded external ID is a potential upgrade landmine.