Your Name
6d5fd3c124
feat(ws2): ADR-093 路由統一 — BIGINT + NotificationMatrix + feature flag
## 修復
### T2.1 BigInteger overflow 修復
- `db/models.py`: telegram_chat_id Integer → BigInteger
(原 int32 無法容納群組 ID -1003711974679)
### T2.2 移除 CAST workaround
- `approval_db.py:739`: 移除 CAST(:telegram_chat_id AS BIGINT)
ORM 已正確使用 BigInteger,workaround 可退役
### T2.3 Redis key 一致性修復
- `heartbeat_report_service.py:575`: telegram:polling_leader → telegram:polling:leader
(telegram_gateway.py 使用冒號分隔,heartbeat 用底線是 bug)
## 新增
### T2.4 notification_matrix.py
- `services/notification_matrix.py`: ADR-093 路由矩陣
- Destination(DM/GROUP/BOTH) + RoutingRule dataclass
- NOTIFICATION_ROUTING dict(TYPE-1 ~ TYPE-8M 完整映射)
- resolve_chat_ids(type, dm, group, *, tg_group_cutover=False) 灰階切流 API
### T2.5 telegram_gateway.py feature flag 保護
- line 43: 加 notification_matrix import
- line 1827-1834: TG_GROUP_CUTOVER=False 時維持舊行為
TG_GROUP_CUTOVER=True 時解除 _interactive_types 黑名單,由矩陣控制
### T2.6 Migration SQL
- `migrations/adr093_notification_routing.sql`:
- CREATE TABLE approval_records (telegram_chat_id BIGINT)
- CREATE ROLE awoooi_migrator (IF NOT EXISTS)
- 含舊環境 ALTER COLUMN int→bigint 保護
## 測試同步
- `tests/integration/setup_test_schema.sql`: telegram_chat_id BIGINT
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 02:10:06 +08:00
..
2026-04-11 02:24:20 +08:00
2026-04-17 16:14:44 +08:00
2026-04-18 13:18:46 +08:00
2026-04-18 13:23:39 +08:00
2026-04-18 16:04:23 +08:00
2026-04-19 00:00:31 +08:00
2026-04-20 04:04:13 +08:00
2026-04-20 04:23:09 +08:00
2026-04-24 15:41:35 +08:00
2026-04-25 02:10:06 +08:00
2026-04-24 10:55:50 +08:00
2026-04-15 22:03:59 +08:00
2026-04-10 11:04:56 +08:00
2026-04-04 12:02:03 +08:00
2026-04-04 12:35:05 +08:00
2026-04-04 12:35:05 +08:00
2026-04-08 11:16:37 +08:00
2026-04-08 11:22:03 +08:00
2026-04-08 11:22:03 +08:00
2026-03-26 16:06:20 +08:00
2026-04-01 21:36:15 +08:00
2026-04-06 11:46:05 +08:00
2026-04-10 01:06:51 +08:00
2026-04-10 01:50:22 +08:00
2026-04-10 01:50:22 +08:00
2026-04-10 01:37:43 +08:00
2026-04-10 10:33:32 +08:00
2026-04-15 22:02:17 +08:00
2026-04-09 18:38:08 +08:00
2026-04-08 16:24:09 +08:00
2026-04-08 16:24:09 +08:00