My Agent Migration Finished. Every Gate Looked Wired. None of Them Ran.
说明与用途
迁移代理门控后,所有门都已注册并编译通过,但运行时仍出现错误。通过三层故障链分析,进行五项代码和数据修复,最终门控功能恢复正常。
问题
After migrating an agent’s gate harness to a new framework, all gates were registered and compiled, yet none executed correctly.
结果
The migration revealed a three-layer failure chain: compile-time success, runtime NameErrors, and self-check failures due to data drift. Fixing constants, parser syntax, provenance markers, and route table paths restored gate functionality.
工作流
- 1. Run migrated gate (route_gate.before.py) – exit code 3, NameError AGENT_MEM.
- 2. Run gate with partial fix (route_gate.py) – exit code 2, NameError MEMORY_ROOT.
- 3. Run fully fixed gate (route_gate.fixed.py) – exit code 0, verdict GREEN.
- 4. Inspect inventory (gate_inventory.py) – shows registered/compile status and exit codes.
- 5. Apply five fixes: define AGENT_MEM and MEMORY_ROOT, adjust resident parser syntax, update provenance markers, correct route table paths, create missing report file.
证据
I finished migrating my agent's gate harness to a new framework. Files were on disk. Byte counts were sane. Markdown rendered. Every gate was "registered."
Then I actually ran them. None of them worked, and none of them ever had.
route_gate — is the route layer actually wired? target : <repo>/memory/MEMORY.md routes : 3 declared resident: 0 blocks parsed ... [FAIL] ROUTE_PATH_MISSING :: cases.md -> <repo>/arch/cases.md ... [FAIL] NONVACUOUS_SECTION :: parser returned an empty set (routes=3, resident=0) => checks (1)(2) ran over nothing; this gate cannot discriminate
Five changes separate rc=3 from rc=0. The code first: 1) Two constants referenced but never defined — AGENT_MEM, MEMORY_ROOT. 2) The resident parser expected ### N ·; the target writes ## <section> plus 1. item. 3) The provenance marks were ASCII-only (= >); the target writes ⇒. Fixes 2 and 3 are the same failure in different clothes: the gate and its target had drifted apart, and nothing was watching for the drift.
The takeaway is narrower than "migrations are hard": copying is not wiring.
- 记录日期: 2026-10-09T17:56:04.883Z