本卡屬 FR-196(母卡 CM-3875(已建)),卡 M-7,第三期批 9。只改 BE(主 repo,Repo 欄空著)。依賴:P-4、P-5、S-3、M-4。
主系統第三期接線:登記 SocketIO 頻道、推送實作換成真的、「排定維護」兩條端點(管理員建一筆並通知全員;橫幅讀目前有效的那筆)。🔴 SocketIO 處理類要晚於 DI 接線才建構,紅線在 config/socketio_namespaces.py 檔頭。
extend:config/socketio_namespaces.py 加一列(字串 import);_notification_center_ports.py 的 RealtimeNotifier 換實作;新 route 照 api/notify_config/routes/notify_config_route.py 形狀;守門用 common.authz capability 軸;maintenance 寫表後 notify(system.maintenance_scheduled, Role('tenant_all'))
repo:~/Projects/Billows/Audit-Manager/compliance-manager-be
改既有:config/socketio_namespaces.py
改既有:core/plugins/_notification_center_ports.py
改既有:core/plugins/notification_center.py
改既有:config/app_modules.py(新 blueprint 登記)
新開:api/notification_center/__init__.py
新開:api/notification_center/routes/maintenance_route.py
新開:api/notification_center/serializers/maintenance.py
新開:app/notification_center/service/maintenance_app_service.py
新開:test/test_notification_center_maintenance.py(無能力點 403;建一筆後 current 回它;過期不回)
config/socketio_namespaces.py REGISTERED_NAMESPACES 加 ("jedi_notification_center.realtime.handler", "NotificationCenterNamespace", "/socket/notification-center");讀檔頭紅線(handler 建構晚於 DI wiring)。_notification_center_ports.py RealtimeNotifier 換 SocketIORealtimeNotifier(socketio)(core.extensions.socketio);api 模式下 socketio 未 init 時 emit 要安全 no-op(try/except 寫 debug log)。api/notification_center/:POST /notification-center/maintenance(require_capability('notification.banner.publish'),body starts_at/duration_min/message)、GET /notification-center/maintenance/current(登入即可);app service @transaction,寫 notification_maintenance 後 notify('system.maintenance_scheduled', Role('tenant_all'))(RecipientDirectory 加 tenant_all 展開)。config/app_modules.py 登記。scripts/build/socketio_probe.py 的 NS_NOTIFICATION 改成新 namespace。RUN_MODE=socketio python main.py 起得來且 scripts/build/socketio_probe.py 改連新 namespace 通;兩個瀏覽器:A 指派給 B,B 三秒內紅點變(不重整);POST /maintenance 無能力點 403、有則 200 且全租戶 inbox 各一列;GET /maintenance/current 回該筆;三條測試綠
~/Projects/Billows/Audit-Manager/compliance-manager-be/docs/features/FR-196-2611-notification-center/design.md §3 決策定案、§5 詳細設計(§5.1 套件職責與 port、§5.2 資料表、§5.3 API、§5.5 前端)、§6 拆卡表本卡那列、§8 風險;討論稿(Artifact,連結在 README)只在想知道「為什麼這樣裁」時看~/Projects/Billows/Audit-Manager/compliance-manager-be/docs/features/FR-196-2611-notification-center/prototype/index.html(四個分頁:鈴鐺、通知中心、通知設定、系統橫幅;純畫面,只取結構與資訊順序;文案依 i18n 重寫)infra/task_alert/(entity/model/mapper/repo+domain/task_alert/service/task_alert_notification_domain_service.py claim/mark);排程先例 core/scheduler_update.py;SocketIO 登記 config/socketio_namespaces.py(檔頭紅線)與 handler 先例 jedi-survey app/handler/fill_survey_socketio_handler.py;橫幅先例 FE src/components/ai-quota/AiQuotaBanner.vue、掛點 src/layout/AppLayout.vue 124;iam 通知接口 common/iam_ports.py;十個寄信點行號在 design.md 表 4-1jedi-bulletin/jedi_bulletin/plugin/(contract/assembly/migrations)、jedi-notification/README.md;主系統接線 core/plugins/bulletin.py、core/plugins/_host.py::host_defaults、core/plugins/license.py::TenantAdminDirectory;寄信點 app/flow_engine/service/workflow_execution_service.py:1246、stage_entered_notify_service.py:117、app/task_alert/service/scan_alert_app_service.py:74;既有投遞紀錄表 infra/task_alert/model/task_alert_notification.py;鈴鐺 FE src/layout/AppTopbar.vue 484~540、TopbarStageQueue.vue;seed 先例 scripts/sql/2026-05-22-seed-oscal-ssp-roles.sql、2026-11-10-fr194-ui-routes-entry-gates.sql