docs(report): record staging personal_full after BUG-526 and BUG-534

Engine and five chapters now complete on accepted profiles; final assemble still fails as BUG-535.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jesse_Chen
2026-09-04 20:43:17 +08:00
parent ea28521aa0
commit e674cd3871
3 changed files with 56 additions and 16 deletions
+22 -6
View File
@@ -8125,11 +8125,11 @@
- 触发条件:资料 `birth_time_status``accepted`(不是 `confirmed`),worker 与 create route 因此去查 `agentic_rectification_cases``candidate_accepted` 行。
- 根因:`20260814010000_immutable_skill_registry.sql` 已从该表收回 `service_role` 的表级权限,只许走 security definer RPC。报告链路仍 `from("agentic_rectification_cases").select(...)`。Postgres 三次 `permission denied for table agentic_rectification_cases`(与 job 三次 attempt、默认 5s/10s 重试对齐)。查询失败被映射成可重试 `calculation_unavailable`,报告从未调用引擎。第二读者:create route 同样 `if (error) throw error`,会把创建请求打成 `calculation_unavailable`
- 修复:新增只读 RPC `read_report_candidate_range`(不 re-grant 表权限)。worker 与 create route 经共享 helper 调用;任何读失败降级为无窗口并继续生成。`calculation_unavailable` 只保留给引擎调用失败。legacy 表终态以库约束为准:`confirmed``completed``20260720` 已纳入枚举;前端不再 `.in("status", ["confirmed", "completed"])` 直查)。
- 验证:`tests/report-candidate-range.test.ts` 三态降级;`tests/personal-report-api.test.ts` null 窗口仍 201`tests/database-report-candidate-range.test.ts` 权限矩阵与列白名单。staging @ `be6cf145`accepted 档案 `personal_full` 五次 `POST /api/consultation_workflow` 200career 章已落库;随后被 BUG-534 打断,完整 ready 待 534 部署后补
- 验证:`tests/report-candidate-range.test.ts` 三态降级;`tests/personal-report-api.test.ts` null 窗口仍 201`tests/database-report-candidate-range.test.ts` 权限矩阵与列白名单。staging @ `e27d5dc5`accepted 档案两次 standard personal_full 均 5× `POST /api/consultation_workflow` 200五章有正文;不再出现 16 秒 `calculation_unavailable`。终稿被 BUG-535 `final_parse_rejected` 拦住,见该条
- 防复发:报告 worker 与 create route 不得再直接 SELECT 已收回 `service_role` 权限的校正表;候选窗读失败不得再变成 `calculation_unavailable`
- 相关记录:BUG-524、BUG-534
- 相关记录:BUG-524、BUG-534、BUG-535
- 复发自:无
- 修复版本:待发布
- 修复版本:`7baf2300`
- 编号说明:rebase 到 `origin/staging` 时 BUG-525 已被采集拒答占用,本条落在 BUG-526。
## BUG-527 | 可评分事件不足 3 条时盘外核对抢跑到已拒答领域
@@ -8255,8 +8255,24 @@
- 触发条件:worker `onProgress``progress_phase` 写成 `section:<section_id>`SQL 与 `isValidPersonalReportJobProgressPhase` 允许冒号)。随后心跳或 GET 把该行再读进 `recordFromRow`
- 根因:`recordFromRow``operationalCodePattern``^[a-z][a-z0-9_]{0,63}$`)校验 `progress_phase`,不接受冒号。`updateProgress` 写入成功后解析 RETURNING 行抛 `storage_invalid``onProgress` 吞掉非租约错误,生成继续。下一次心跳解析同一行再抛,worker 中止。GET 同一路径变成 HTTP 500。
- 修复:`progress_phase` 改走已有的 `isValidPersonalReportJobProgressPhase`(与 SQL check、写入校验同一套,允许 `section:`)。
- 验证:`personal-report-job-service`:写入 `section:theme-health_pressure` 后心跳与 `getOwnedByRequestId` 仍成功。
- 验证:`personal-report-job-service`:写入 `section:theme-health_pressure` 后心跳与 `getOwnedByRequestId` 仍成功。staging @ `e27d5dc5` 干净一次跑完五章到 assemble 85%,心跳未再中断。
- 防复发:job 行 round-trip 不得比写入校验更严。分章进度相位必须能读回。
- 相关记录:BUG-526
- 相关记录:BUG-526、BUG-535
- 复发自:无
- 修复版本:待发布
- 修复版本:`e27d5dc5`
## BUG-535 | 五章写完后终稿 final_parse_rejectedaccepted 报告仍无 ready 文档
- 状态:investigating
- 首次发现:2026-09-04
- 最近更新:2026-09-04
- 影响面:`assembleReportDocumentV2` 之后的 `safeParseServerReportDocument`standard `personal_full` 终装
- 用户现象:报告中心显示生成失败。错误码 `report_schema_invalid`,日志 `innerReason=final_parse_rejected`。五章其实都已写完。
- 触发条件:accepted 生时、默认五主题、staging @ `e27d5dc5`。干净 attempt 1 与此前被租约打断后恢复的 attempt 都复现。
- 根因:未知。已排除:引擎未调用(BUG-526)、心跳死在 `section:`BUG-534)、`applyReportGuard` 拒绝(会是 `report_guard_rejected`)、evidenceHash 不匹配(会是 `final_parse_evidence_hash`)。日志没有逐条 parse error。
- 修复:未修。终稿失败码应带上 parse path,才能定案。
- 验证:request `20c94bf4`5× workflow 200;五章 ready、narrative 非空、refs 37 条;摘要 writer `stop`;随后 `generation_failed`
- 防复发:待定案后补。
- 相关记录:BUG-526、BUG-534
- 复发自:无
- 修复版本:待修复