Files
AskaEth 89434e4f99
CI / Backend (build / vet / test / cross-compile) (push) Has been cancelled
CI / Frontend (tsc + vite build) (push) Has been cancelled
fix(contract): enums 的 MODES 漂移守卫改按目录收集,抗前端类型拆分
TestModeTableMatchesFrontendModes 原先写死读 frontend/web/src/lib/types.ts;阶段 0 把该
文件拆成 barrel + lib/types/*.ts 后 MODES 住进了 types/chat.ts ⇒ 测试红。

改为读 barrel + 目录下全部 .ts(新增 frontendTypesDir 常量与 readFrontendTypes 辅助):
「MODES 住哪个文件」不再是本测试的耦合点,以后再搬也不用改它;barrel 缺失
(backend-only checkout)仍按 fs.ErrNotExist 跳过。

验证:go test ./internal/contract/enums/ 绿;全树 go test ./... = 58 包 ok / 0 FAIL;
gofmt -l 干净。
2026-10-04 10:54:07 +08:00
..