Skip to content

演示就绪:修复演示阻塞缺陷 + 全链路实测 + 演示视频与指南 - #24

Merged
qrx-joe merged 17 commits into
mainfrom
codex/demo-readiness
Sep 8, 2026
Merged

qrx-joe merged 17 commits into
mainfrom
codex/demo-readiness

Conversation

@qrx-joe

@qrx-joe qrx-joe commented Sep 7, 2026

Copy link
Copy Markdown
Owner

批次

B12 后续(演示就绪)。依赖:包含 PR #23(B12 UI)之后的 3 个尾提交(930b8a1 种子脚本 / 42df75b diff 错误呈现 / ce387ca D-022 决策登记),合并本 PR 即全量。

演示阻塞修复(评委视角 P0/P1,均有实测)

  • 完成态看不到评分:GET /audits/{id} 现返回 finalize 冻结的 scoring(契约 AuditRun.scoring 本就承诺);完成态审计页渲染冻结报告(修复前评分环 finalize 约 2 秒后消失,已完成的 run 无任何分数展示)
  • 整改任务面板空壳:GET /findings/{id} 补返回 task(懒创建合成 OPEN 视图,对齐契约必填);修复前「任务整改」环节在 UI 无任何入口
  • Before/After 从未显示真实数据:DiffEntry 补 json 标签(parent/child 原被序列化为大写键,前端读到 undefined)+ 行序固定 + 组织过滤
  • RESOLVED 守卫落地:READY_FOR_RETEST→RESOLVED 要求子复测 run 中同规则人审确认 PASS,否则 409(state-machines.md §4「人工点击不产生 RESOLVED」首次真正强制);迁移强制乐观锁版本;edit→NA 不得绕过理由必填;驳回必填 note;附 2 例失败路径集成测试
  • 前端:未评维度显示「未评」而非 0 分、审计列表行内快速确认、轮询容错、人审状态中文化
  • 脚本:dev-e2e.ps1 有真实 key 时不再误开 fake 模型(修复评委指南与交付声明矛盾);verify_loop.py 恒真断言改真实断言

验证

  • Go 全量测试(含新守卫测试)/ 契约校验 / web biome+tsc+vitest 全绿(本机实跑)
  • 浏览器十步闭环实测:登录→项目→冻结报告→证据查看器→人审→finalize→任务推进→无复测 RESOLVED 被拒(409)→真实模型复测→批量确认→Diff→复测 PASS 后 RESOLVED 放行
  • 演示视频(144s 配音+字幕)由此分支代码实跑录制:docs/demo/arrivalready_demo.mp4

新增交付物

  • docs/demo/:演示视频 + 字幕 + DEMO_SCRIPT.md(分镜/现场动线/兜底事项)
  • scripts/demo/video/:可复现视频流水线(Playwright + edge-tts + ffmpeg)
  • scripts/demo/functional_test.mjs / resume_retest.mjs:全链路实测脚本

回滚

revert 本 PR merge commit;无迁移。

乔瑞雪 added 17 commits September 7, 2026 22:38
Apply the Arrival Ready design contract (tokens + native CSS, spec
FirstGuest_Frontend_Design_Spec_v0.1) to the evidence viewer: AppShell
frame, status/severity chips, review action buttons, task panel with
workflow badges, bbox evidence figures. All B09/B11 logic, copy and
e2e-relied texts unchanged. Adds .link-btn/.detail-label/.table helpers.
Apply the design contract to the audit run view: run status badge,
finalize report with Score Ring + D1-D7 dimension bars + blocking
alert, retest/diff panel as styled table, findings as severity-dot
rows with review badges. All polling, finalize, retest and diff logic
byte-identical; e2e texts (待人审, a[href^='/findings/']) preserved.
「与上一轮对比」按钮的 onClick 缺 catch,api.getDiff 失败时成为
未处理的 Promise rejection,页面无任何反馈;与相邻复测按钮对齐,
补 catch + setError。

验证:biome check 18 files 0 问题;tsc --noEmit 通过;
next dev 热加载后 http://localhost:3000 服务该修复。
创建 3 个演示店铺(全聚德·前门店/restaurant、中国国家博物馆/museum、
前门中轴线文创/retail),经正式证据链路(upload-url 签名 PUT →
complete 校验 magic bytes/sha256)上传 8 张网络图片,全部 READY。
图片运行时下载不入库;按项目名去重,可安全重跑。

验证:python scripts/seed_demo.py 三店 8 份材料全部 READY;
重跑输出「跳过(已存在)」幂等成立;GET /projects 列出 3 家店铺。
…ring)

GET /audits/{id} now returns the scoring frozen at finalize plus top-level
total_score, per the OpenAPI AuditRun schema (契约本就承诺评分快照,实现缺列).
Finalize report gains algorithm_version=adr-0002-v1. Also stops swallowing
ListFindings/PendingReviewCount errors (500 instead of misleading empty view).

Verified: go build/vet/test green; live GET on completed run returns
scoring.dimensions (D2=100, D3=100, coverage 29.41, partial=true).
… payload

- READY_FOR_RETEST→RESOLVED now requires a human-confirmed PASS for the same
  rule key in a child retest run (state-machines.md §4 人工点击不产生 RESOLVED);
  refusal maps to 409 with a diagnosable message.
- Task transitions take the caller's version (optimistic lock; stale → 409).
- edit review validates the new status enum; edit→NA keeps the reason
  requirement; reject requires a note (state-machines.md §3).
- DiffEntry gains json tags (parent/child were serialized capitalized, so the
  UI Before/After table showed placeholders — demo-blocking); diff rows sorted
  by rule key; org filter added to both sides of the comparison.
- Failure-path integration tests for version mismatch and RESOLVED guard;
  worker suite reset clears review/fix-task rows (FK order in shared DB).

Verified: go test -p 1 ./... green incl. new TestTaskVersionMismatchConflicts
and TestResolveRequiresRetestPass; live retest diff returns real per-rule
statuses.
…honest copy

- Completed audits render the frozen score report (previously the score ring
  vanished ~2s after finalize — the money shot was invisible exactly when the
  run was done); ScoreCard is shared by both states.
- Dimensions with no evaluated weight show 未评 instead of 0 (诚实未知不惩罚).
- Audit findings list: per-row quick 确认 for UNREVIEWED candidates (10 page
  round-trips → one screen), review-status labels in Chinese, subtitle no
  longer claims 待人审 after disposition.
- Polling survives transient request failures (soft banner + retry; only the
  initial load failure is fatal); action errors render inline instead of
  replacing the page.
- Finding page: 驳回 collects the required note; review labels localized;
  READY_FOR_RETEST hint states the enforced retest-PASS rule.

Verified: biome clean, tsc clean, vitest green; full loop exercised in browser
(login → audit → review → finalize → retest → diff → RESOLVED).
…real

- dev-e2e.ps1 only sets ARRIVAL_FAKE_MODEL=1 when services/ai/.env has no
  MODEL_API_KEY — the judge guide previously relaunched the stack in fake mode
  while DELIVERY.md claims real-model results (自相矛盾).
- verify_loop.py replaces the two always-true assertions with real checks:
  duplicate review must 409, illegal task transition must 409/422.
- scripts/demo/: full-loop browser test + retest continuation used for the
  demo-readiness run (screenshots gitignored).
- docs/demo/arrivalready_demo.mp4 (144s, 1080p, zh narration + burned
  subtitles) and .srt — the fallback for live-demo failure; tells the full
  loop with the honest-UNKNOWN story front and center.
- docs/demo/DEMO_SCRIPT.md: scene table, 8-minute live demo path, fallback
  notes (fake/real boundary, real-model latency, immutable runs, protected
  volumes), regeneration commands.
- scripts/demo/video/: reproducible pipeline (Playwright segments with token
  injection + HTML cards, edge-tts narration, ffmpeg alignment/concat/subtitle
  burn/loudnorm), scenes.json holds storyboard + narration copy.
- README/DELIVERY: current capability statement, judge quickstart with seed
  script, video links; TODO T-009 closed with verification note; COMMUNICATING
  S-9 session record.
首版解说词偏专业(哈希指纹/落库/IRRS/run/跨租户),按 docs/PRD_大白话解读
的「给店铺做体检」比喻重写全部旁白与第 9 幕工程卡片文案(分数机器算 /
结果可复现 / 中断接着跑 / 数据各归各家),界面术语保留并口播解释。
重新 TTS + 合成(147.6s)并抽帧复检:字幕同步、卡片换文、音量正常。

Verified: 抽帧核对 s05/s07/s08/s09/s10 字幕与画面对齐;volumedetect
mean -21.5dB / max -1.2dB。
面向非技术读者的通俗解读,全程贯穿「给店铺做体检」的比方。
非官方口径:与正式 PRD 不一致处以 01_ArrivalReady_PRD_v0.1.md 为准。
面向路演/评委场景:本机起完整三端(真模型 AI),经 cloudflared
快速隧道把 Web/API/MinIO 暴露为三个临时公网 URL,无需 Cloudflare
账号。URL 写入 %TEMP%/arrival-demo/demo-urls.txt,日志同目录。
基于《PRD 大白话解读》的评委向展示稿:瑞士极简版式,配图取自
演示视频真实界面帧(已裁除烧录字幕)。PPTX 每页内嵌讲稿备注,
与 PDF 同源同版本;README「2 分钟看懂」补入口。
展示稿的中间产物(SVG 源、逐页 PNG、导出备份、预览日志)留在
本地 projects/;最终交付物 arrivalready_showcase.pdf/.pptx 已入
docs/demo/。
@qrx-joe
qrx-joe merged commit ea00b32 into main Sep 8, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant