fix: 每日进销存截图按业务日期归档,并补充幂等与执行记录测试 #47
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "codex/daily-inventory-notify-0928"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
目的与范围
daily-inventory/2026-09-26/...装的其实是 09-25 的数据),不利于按数据日期检索与核对。backend/src/services/dailyInventoryScreenshot.js:新增buildScreenshotNames,对象键/文件名统一使用业务日期、时间用执行时刻;captureAndUploadDailyInventory支持bizDate入参。backend/src/jobs/dailyInventoryNotificationJob.js:调用截图时显式传入业务日期。backend/test/dailyInventoryNotification.test.js:新增 5 条测试(归档命名 3 条、幂等 1 条、执行记录 1 条)。同步与兼容性
git fetch origin后 origin/main 未前进)chinaTimeParts与其调用方保持不变,captureAndUploadDailyInventory未传bizDate时回退原行为(执行时刻的业务日期),无破坏性变更。验证
npm --prefix backend run syntax:178 个文件语法检查通过node --test test/dailyInventoryNotification.test.js:# tests 24 / # pass 24 / # fail 0node --test test/*.test.js(全量):# tests 386 / # pass 385 / # fail 1secret backup survives outside the repository with owner-only permissions失败,属既有失败项,与本次改动无关(Windows 文件系统不支持 POSIX owner-only 权限语义,用例校验0o600在本地恒不满足)。本次改动未涉及resilientSecretStore。daily-inventory/<业务日期>/daily-inventory-<YYYYMMDD>-<HHmmss>.png。本次按所有者要求未配置收件人、未执行真实推送。风险与回退
合并授权(仓库所有者/管理员)
main,并按《服务器部署规范》更新生产环境117d59c9f0dbff89955dd7f7cc8b668284533256f815751634924e9196444df08b0297c412678f2e)创建,无冲突;后端语法检查通过,通知相关单测 24/24 通过,全量测试 385/386 通过(唯一失败项为与本次改动无关的既有 Windows 权限用例)。