本卡屬 FR-167(母卡 CM-3241),卡 P3-2a,階段 P3 更新中心、批 2。只改 BE(主 repo,Repo 欄空著)。依賴:P3-1。

這張卡做什麼(白話)

主系統裡新開一個「產品更新」模組的骨架:一張紀錄表、四層程式、兩支讀端點(狀態、歷史)。狀態端點會把主機寫的進度檔讀進來。模組登記與 DI 這張卡一次做完,後面三張 P3-2 卡只往裡面加方法。

為什麼切這一張

DDD 四層+RLS 表+進度檔對應;後面三張卡都往這裡填

reuse/extend/new

new(新模組)照 app/source_scan_vulndb 的 settings service 形狀;讀進度檔用唯讀掛載;登記型檔集中:config/app_modules.py 與 di_containers/ 這張卡一次登記完

在哪裡

repo:~/Projects/Billows/Audit-Manager/compliance-manager-be
改既有:config/app_modules.py
改既有:di_containers/__init__.py(或對應容器)
新開:scripts/sql/2026-xx-xx-fr167-product-update-jobs.sql
新開:domain/product_update/*
新開:infra/product_update/*
新開:app/product_update/service/product_update_app_service.py
新開:api/product_update/routes/product_update_route.py
新開:api/product_update/serializers/*

怎麼做

細節在 design.md §5 對應段(~/Projects/Billows/Audit-Manager/compliance-manager-be/docs/features/FR-167-2610-online-update-channel/design.md,開 design.html 看導覽);本段只列本卡要做到的點:

怎麼驗(開發期:你在本機/DEV 就要能做完)

DEV 套 migration 後表在、RLS 四指令;GET /system/product-update/status 回目前版本、最近檢查、進度檔內容;GET .../history 分頁;無能力點 403;守衛測試綠

對照雛形:~/Projects/Billows/Audit-Manager/compliance-manager-be/docs/features/FR-167-2610-online-update-channel/prototype/index.html(上方「跟著走」)。

紀律