From b2a8d3a00591f8c894066d675bbf721a7edb79c8 Mon Sep 17 00:00:00 2001 From: Jesse_Chen Date: Mon, 7 Sep 2026 11:51:22 +0800 Subject: [PATCH] docs: record BUG-574 staging migrate and deploy evidence Co-authored-by: Cursor --- docs/BUG_HISTORY.md | 2 +- docs/tasks/PROGRESS-report-list-500-20260907.md | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/BUG_HISTORY.md b/docs/BUG_HISTORY.md index 53757810..0c179bc3 100644 --- a/docs/BUG_HISTORY.md +++ b/docs/BUG_HISTORY.md @@ -8848,7 +8848,7 @@ - 触发条件:部署含 `cfcd369d` 的应用后打开报告中心。自托管 PostgREST 解析 `card_summary:report_document->executiveSummary->>summary` 失败。 - 根因:列表 `select` 增加了 PostgREST JSON 路径别名。该语法未被 `test:db` 或真实 PostgREST 覆盖;supabase-js 返回的 PostgrestError 不是 `Error` 实例,列表日志只记 `UnknownError`。 - 修复:列表改为普通列 `card_summary`;迁移增加可空 `text` 列(≤500 字符);`complete_personal_report_job` 从封面文档 `executiveSummary.summary`(MD「摘要」截取)写入。旧行不回填。列表 catch 记录 `code`/`hint`,不记行数据。 -- 验证:`frontend/tests/database-personal-report-card-summary.test.ts`(可空、authenticated 只读、service_role 可写、超长拒绝、complete RPC 写入);列表/观测单测;部署后需按 `docs/operations/personal-report-staging.md` 用真实会话跑列表 GET + 详情 GET + 创建 POST。 +- 验证:`frontend/tests/database-personal-report-card-summary.test.ts`(可空、authenticated 只读、service_role 可写、超长拒绝、complete RPC 写入);列表/观测单测;staging `72dd5e9d` 已部署,health 账本为 `20260907010000_personal_report_card_summary.sql`;未登录列表 401。登录态列表 200 与新报告卡片摘要仍待真实会话。 - 防复发:新增 PostgREST JSON 路径、嵌套 embed 或别名必须有 `test:db` 真查询或部署后 smoke;禁止再用未经验证的 JSON 路径变体赌列表查询。 - 相关记录:无 - 复发自:无 diff --git a/docs/tasks/PROGRESS-report-list-500-20260907.md b/docs/tasks/PROGRESS-report-list-500-20260907.md index eff3aa2a..ab0123e6 100644 --- a/docs/tasks/PROGRESS-report-list-500-20260907.md +++ b/docs/tasks/PROGRESS-report-list-500-20260907.md @@ -18,7 +18,7 @@ | 1 止血:去掉 JSON 路径 select | 完成 | `REPORT_LIST_COLUMNS` 只含普通列 `card_summary` | | 2 `card_summary` 列 + worker 写入 | 完成 | 迁移 `20260907010000`;`complete_personal_report_job` 从 `executiveSummary.summary` 写入(与 MD「摘要」截取同源);旧行不回填 | | 3 观测 | 完成 | `sanitizedErrorReason` 读取非 Error 的 `code`/`hint`,不记 message/details | -| 4 部署后 smoke | blocked | 清单已写入 `docs/operations/personal-report-staging.md`;需迁移+部署+真实登录会话。本环境无 staging 登录态 | +| 4 部署后 smoke | 进行中 | 迁移+部署已对齐 `72dd5e9d`;未登录列表 401。登录态 GET 列表/详情/创建仍待真实会话 | ## 偏离 @@ -41,4 +41,13 @@ tsx --test --test-concurrency=1 tests/database-personal-report-card-summary.test ## 推送 - `b466a6fc` fix(report): stop listing reports via PostgREST JSON paths (BUG-574) +- `72dd5e9d` docs: record BUG-574 fix SHA b466a6fc +- `git push origin HEAD:staging`:`ad9283d1..72dd5e9d` +- Independent Staging Quality Gate [run 2458](https://git.copse.top/root/Jyotisha/actions/runs/2458) success +- 自动 Deploy staging [run 2459](https://git.copse.top/root/Jyotisha/actions/runs/2459) 按设计停在待迁移(`20260907010000_personal_report_card_summary.sql`) +- Migrate Staging Database [run 2460](https://git.copse.top/root/Jyotisha/actions/runs/2460) success:`applied 20260907010000_personal_report_card_summary.sql` +- Deploy staging [run 2461](https://git.copse.top/root/Jyotisha/actions/runs/2461) success +- `https://staging.jyotisha.chat/api/health`:`deployment.gitCommit=72dd5e9d7a0c5f3cdce68c46d4a219597350b013`,`database.latestMigration=20260907010000_personal_report_card_summary.sql`,`requiredMigrationsPresent=true` +- 未登录 `GET /api/reports` → 401 `请先登录`(不再是列表 500) +- 登录态列表 200 / 新报告卡片摘要仍待真实会话走查 - 未提升 `main`