The human ledger and the document body are different stores. Record the projection intent in the same transaction as the ledger, and clear it only when the body write succeeds so a retry cannot append a second revision. Co-authored-by: Cursor <cursoragent@cursor.com>
6.4 KiB
6.4 KiB
title, status, created, updated
| title | status | created | updated |
|---|---|---|---|
| 2026-09-19 审计剩余项(medium/low,不挡已合入批 1–4) | planned | 2026-09-19 | 2026-09-19 |
2026-09-19 审计剩余项
动机
系统深度体检 的 C1–C4 与 H1–H10 已按四批合入 dev。下列 medium/low 仍真实存在,但不进入本轮发布回退。
成功标准
- 每条有独立 short-term、负例测试或明确关闭理由后再标 done
- 不把本清单自动写成 gap-matrix blocker
依赖
- 批 1–4 已在
dev:844f757、08f4e0b、a2a49a6、d73bc79
暂不启动原因
本轮范围只到 critical + high。下列项要么是加固、要么需要产品/合规决策,要么改动面大于收益。
进展(2026-09-19,fix/audit-remainder-closeout)
| ID | 结果 |
|---|---|
| M1 | done。nosniff / DENY / Referrer-Policy / 本站 CSP。TestP0_SecurityHeaders |
| M2 | done。TTL 钳到人工 15 分钟、小队 30 分钟;人工租约前 CheckHumanCanEdit。TestAcquireLeaseClampsHumanTTL |
| M3 | done(本项可落地部分)。低置信度才做关键词改道;称呼取用户名。高置信度意图层改造不在本项把模板整段搬走 |
| M4 | done。parseDecimalID 拒绝 u_sess_*。TestParseDecimalIDRejectsSessionTokens |
| M5 | done。Server.Start 不再二次启动并吞错。main 仍调用 Runtime.Start,该方法本身已幂等 |
| M6 | done(上限)。硬上限 4096,淘汰最久未访问。会话 id 仍由客户端提供,因为历史恢复按该 id 查找;改成只接受服务端签发会打断现有对话协议 |
| M9 | done。dev compose 不再声明 SEMANTIC_SUMMARY_REPLACE。dev=MiniMax-M2.7-highspeed、test/main=MiniMax-M3 确认为有意分叉,已写在 compose 注释 |
| M10 | done(写明路径,不放开门闩)。OpsCutoverPromotionPath:dev 观察后用晋升回执写 test,再写 main。ValidateOpsCutover 仍拒绝 test/main |
| M13 | done。SQL 迁到 deploy/postgres/archive/pre-goose/。代码与脚本无引用 |
| M14 | done。冻结计划找不到职责行则报错;显式空三权仍为 0。TestResolveDocTask_NoneDutiesStayZero |
| L1 | done。健康检查 2 秒缓存 + 2 秒 DB 超时 |
| L2 | done。SSE marshal 失败写 event: error 帧 |
| L3 | done。ReplayPlan.Digest 含 DryRun;dry-run 摘要不能授权 apply |
| M15 | done。生产 claimSQL 与 MemoryBus 共用 VersionClaimable:版本 0 可领,版本化事件不能跳过 checkpoint。checkpoint 只前进。TestVersionClaimableMatchesMemoryBusGap、TestGapDoesNotSkipVersion |
| H3 负例 | done。TestListChatSessions_CrossUserIs403 |
| FE 缓存 | done(版本字段)。窗口缓存写入 {schema,data},无 schema 的旧载荷丢弃。window cache: 无 schema |
| FE lucide | 关闭理由:package-lock.json 锁定 lucide-react@1.42.0,来源 registry.npmjs.org,带 integrity。^1.16.0 是合法的 1.x 范围,不是来源不明的包 |
| M7 | done(出站意图 + 同键重放)。document_content_projections 与账本同一事务写入;投影成功才销账。TestDocRevision_PatchOrder_RetryProjectsWithoutSecondLedgerCommit。账本库与正文库仍不是一个 SQL 事务,进程退出后靠未投影行重放,不靠客户端记忆 |
| FE App.tsx | 仍开放。4600 行拆 hook 是独立重构,本轮未拆,避免在没有行为变更需求时改写工作台 |
| H1-del | 关闭理由:allowLegacyTestPrincipal 仍被 AllowInMemory && ContextDbHost=="" 的 dev/test 内存测试使用。删除会把这批测试变成未登录 401。保留告警,删除另开、先改测试夹具 |
仍开放:FE App.tsx 拆分、rdev S2/S3 与 P2–P4、首次加载 U1/U3–U7、晋升前置(dev rebuild、治理 PG、npm test/npm run build)。M7 的投影意图已随账本提交(goose 00053);容器 schema 仍是 52,要等占槽重建后才升到 53。
红线关闭(不是实现):
- SWBOOT-10:保持 fail-closed stub。未获独立授权前不接真实仓库写入。
- FAV live:禁止整支 merge;
FAV_DEGRADED_READ=false;live 需要各阶段至少 7 天观察窗,本轮不放量。 - D7:合规签字前禁止按留存口径物理删除。盘点已完成,口径仍
pending-compliance-signoff。
清单
| ID | 项 | 位置 | 说明 |
|---|---|---|---|
| M1 | 安全响应头 | internal/server/server.go CORS 中间件 |
补 nosniff / X-Frame-Options / Referrer-Policy / 收敛 CSP |
| M2 | 租约 TTL 无上限 | handlers.go AcquireLease |
clamp 到 DefaultHumanLeaseTTL,Acquire 前校验编辑权 |
| M3 | 关键词改写意图 + 硬编码「张工」 | internal/coordinator/engine.go |
移到意图层并加置信度;称呼取用户名 |
| M4 | fmt.Sscanf 解析 u_sess_* 得到 UserID=0 |
同上 | 统一数字 ID |
| M5 | Runtime.Start 双调用且吞错 |
cmd/server/main.go 与 server.go |
sync.Once 或删 Server.Start 内调用 |
| M6 | sessions 无硬上限 | server.go cleanStaleSessionsLocked |
LRU + 服务端发 session id |
| M7 | 修订三阶段写无事务 | document_revision_handlers.go |
已落地:00053 投影意图与账本同事务;成功后销账。见进展表 |
| M9 | SEMANTIC_SUMMARY_REPLACE 只在 dev compose 声明;dev/test 默认模型不一致 |
compose | 删未接线 flag 并钉死测试;确认 M3 是否刻意 |
| M10 | cutover 只允许 dev |
internal/events/cutover.go |
写明 test/main 切换路径 |
| M13 | deploy/postgres/migrations/ 死目录 |
与 goose 重复 | 确认无外部依赖后归档 |
| M14 | ResolveDocTask 静默 0 值三权 | orchestrator.go |
找不到 duties 应报错 |
| M15 | PG 投递允许乱序,MemoryBus 有 gap | dispatcher.go vs bus.go |
对齐测试替身与生产顺序语义 |
| L1 | health 每次打两次 DB | handlers.go |
短缓存 + 超时 |
| L2 | SSE marshal 错误被吞 | task_run_handlers.go |
失败写 error 帧 |
| L3 | ReplayPlan digest 不含 DryRun | replay.go |
纳入 digest |
| H1-del | 删除 legacy user-id=1 兜底 | auth_middleware.go |
已加日志;删除前盘点调用方 |
| FE | App.tsx 巨石、localStorage 无版本、lucide 版本确认 | web/ |
拆 hook;缓存加 version;确认包来源 |
相关链接
- 审计:../../audit/2026-09-19-system-deep-audit.md
- 批 1–3 报告:
.doc/test-reports/2026-09-19-audit-b*.md