fix: 集成返工复审、10月15日客户反馈与切片恢复及性能修复 #49
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "codex/oct15-feedback-pr-20261015"
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?
Summary
整合返工/复审、切片编辑,以及 10 月 15 日客户反馈和线上性能修复。完整包含当前 #44、#45 的提交,并保留双方后续修复;目标为
dev,旧 PR 不自动关闭或合并。最近改动包括:
retryOf失败证据;保留版本、归属、阶段、字典、源数据及重启恢复校验,不自动重试客户任务。这是完整集成 PR,相对尚未合并上述工作的
dev包含历史依赖,不能仅按最后一次计数补丁理解其范围。#44 的 P1 自动保存、P2 清理公平性修复分别保留独立提交c09bcde0、23087c63,便于回溯。合并整合为1660f73c;CI 所需既有格式整理单独在3472c021,未改失败基线或依赖锁文件。Evidence
After: 已部署
2071b0a2的真实 HTTP:本人任务 210ms;计数首轮 7.460 秒,重复三次 4.568 / 5.202 / 7.515 秒均返回 200;列表 3.484 秒,状态 62ms。计数仍慢,不能宣称性能优化全部完成;四次样本不是并发 P95。After: 本地隔离 Mongo7/8 回归中候选与元数据读取各检查 1 条;Mongo8 的 12,000 条精确计数约 168ms,60 组实际 Count+List 角色/阶段用例通过。上述本地耗时不代表线上接口耗时。
After: 本地合成失败任务通过新入口重新物化 8 个切片,31 个动作 ID/内容保留,原失败记录保留;实际本地审核跳转核对了所属切片、时间和字幕。历史数据、重启/重领、重复请求、过期作业与晚到草稿有定向回归。
npm run lint、npm run format:check、Web/Go 构建通过。完整前端门禁只有 13 个已知失败(基线 14 项),完整 Go 门禁只有 70 个已知失败;未新增失败,未修改tests/known-failures.json。当前 Fanyu API/处理器为
2071b0a2,镜像sha256:aa98bafd954bc69284cf516ce8befc5f21f500345d952e6aefd98713add3846f;API 2/2、处理器 1/1。Worker 保持54f4f490。本 PR 末尾的 #48 分页整合及格式提交尚未部署。本地核验说明见.scratch/pr-integration-20261015/spec.md;业务与兼容性契约见docs/annotation-operation-latency.md。Merge Danger
Door: one-way
终态任务两代以前的历史物化目录清理不可通过回退代码恢复,最近两代和源视频受保护。其余代码可回退,但启用保留工作区重试后,回退旧处理器前必须先停用新重试入口,并完成或核对在途作业;不能恢复整库或覆盖客户新增数据。没有新增数据迁移、批量失败任务回填或自动重试。三个非唯一索引已按单独批准计划建立,旧索引保留;本次 PR 整合没有新增索引操作。
Blast Radius: annotation
涉及标注、返工、质检/终审任务池、异步切片恢复、Worker 历史物化清理及发布顺序。合并不构成再次部署或客户写入测试授权;上线状态仍为
deployed_pending_acceptance,计数剩余延迟继续跟踪。- ReworkBaselineRecord: frozen at formal quality rejection via a new decision effect (idempotent apply); embeds original opinions, reject comment, and the reviewed revision's slice/action summaries - self-contained by design so revision pruning can never orphan it and no customer data is deleted - ReworkFeedbackRecord + GET/PUT /api/human-items/{id}/rework-feedback: writer restricted to the directed owner (incl. admin-reassigned owner) or manager; entries must reference baseline opinions; CAS version conflicts; readable by the reviewer; missing-baseline rounds return a graceful conflict - GET /rework-baseline returns null baseline for legacy rounds (degraded read, never blocks the flow) - ReviewDraft.Confirmations (D7): canonical validation against the current round's baseline (unknown/duplicate opinions rejected; unresolved requires note or a current-round opinion; no-baseline rounds must stay empty); frozen into AnnotationReviewRecord at the formal decision, matching the irreversible-verdict principle - tests: baseline freeze+embedded evidence, feedback contract (403/400/CAS/ reviewer-read), confirmation validation+freeze, graceful-missing - all green; internal/api failures identical to baseline (65), zero new- GET /api/human-items/{id}/source-opinions: per-source projection of rework baselines (round, frozen problems incl. timestamps, comment) and formal quality reviews (round, decision, reviewer, frozen D7 confirmations); aggregate items only - multi-source coordination detail: requireAcceptanceSourceReady and the decision gate now name the pending sources (itemKey + stage + status) instead of a generic message - AcceptanceSourceOpinions panel in the final-acceptance workspace: collapsible per-source history labelled who/which-round - rework_review badge extends to prepackage_acceptance rounds - tests: pending-gate names source then approves after ready; projection carries baselines/reviews/confirmations and rejects non-aggregate items; api failures identical to baseline (65), frontend zero new, tsc clean- delete ReworkFeedback concept (editor, domain, API, store) per user decision - add /rework-handling API: one-click skip ('no change') with CAS + trace for re-review - add rework-emphasis pure lib: baseline-vs-workspace diff auto-clears red, merge reattach, multi-round (latest red, older dimmed), J/K jump order - workbench: red slice blocks + count badges, red/gray action blocks, red timestamp markers, per-slice opinion cards, summary strip above track, soft submit gate, help entries, one-line notice pointer - QC ripple: skipped chips replace feedback read in ReviewProblemPanel - docs: CONTEXT.md glossary (意见处理状态), ADR 0006, manual rewrite@zhanghongming 审查固定 head=3472c021,目标 dev=03db2a28。结论:暂缓合入 dev,仍有 1 项 P2 权限阻断。
Standards
此前 P1 自动保存跨任务污染已增加 task/user/enabled 会话隔离,P2 物化清理已增加组织/状态轮转与分页游标,代码层确认两项修复保留。
尚未解决:internal/api/rework_handling.go:50-53、69-74 的 PUT 仅检查当前归属人/管理员,未限制角色、返工阶段及当前轮次。
Spec
ADR 0007 §9 明确 QC 无“不改了”操作。已通过实际 HTTP handler 和隔离内存数据复现:第2轮、quality_review阶段、当前领取人为质检员时,PUT 当前轮与 ?round=1 均返回200并写入 skippedOpinionIds/version=1。外层 loadHumanItemForRequest 未阻止。#49/#50 对应文件相同。
请限制 PUT 为当前可编辑返工阶段、合法标注处理人及当前轮次,历史 GET 保持只读,补质检写入和历史轮写入拒绝回归。
验证:包含本 PR 的 #50 候选 TypeScript、API/store/worker 定向 Go 测试、47项相关前端测试通过。完整前端895项:881通过、13个既有失败、1个devboot在60秒上限取消,因此不能宣称全量通过。未部署,未修改客户数据。
@zhanghongming 本 PR 的全部提交已通过 #52 整合进入 dev=1aad4029,Git merge-base --is-ancestor
10b0ddddorigin/dev 已确认。原返工权限阻断已由 #53 的630a95c8修复,并随 #53/#54/#55 一并进入主线;本轮15场景权限回归通过。此处按“已由整合PR覆盖”关闭重复入口,不再单独合并旧状态;源分支保留。后续 #56/#57 独立保留,部署/客户数据未改。Pull request closed