docs(tests): record recoverable deletions and cleanup verification

This commit is contained in:
Codex committed 2026-10-21 14:21:56 +09:00
1 parent a839d23e12
commit 323ea941a3
3 files changed
+1568

No files matched your search

File diff suppressed because it is too large. Load diff
@@ -0,0 +1,140 @@
Code SHA: a839d23e129e14c65c4d216c238414b47cd9ad63
Base: f512a0f3fd2b8a4f74f1ba530bde17e6c212205a
Linux x64 / Node24.19.0 / npm11.9.0
No UI, original app, external model, real package download or deployment.
Static review: 115 deletion paths match manifest; all 115 unique npm script targets exist; 1181 retained tracked code/config files scanned with no broken live references found. Historical provenance comments are not executable dependencies.
===== core.txt: exit 0 =====
npm warn Unknown env config "http-proxy". This will stop working in the next major version of npm.
> ycode@0.0.7 test
> npm run test:core
npm warn Unknown env config "http-proxy". This will stop working in the next major version of npm.
> ycode@0.0.7 test:core
> npm run typecheck && npm run test:chat && npm run test:sessions && npm run test:persistence && npm run test:conversation
npm warn Unknown env config "http-proxy". This will stop working in the next major version of npm.
> ycode@0.0.7 typecheck
> tsc --noEmit -p tsconfig.node.json && tsc --noEmit -p tsconfig.web.json
npm warn Unknown env config "http-proxy". This will stop working in the next major version of npm.
> ycode@0.0.7 test:chat
> esbuild scripts/message-order-regression.ts scripts/chat-store-regression.ts scripts/chat-stream-committer-regression.ts --bundle --platform=node --format=esm --out-extension:.js=.mjs --outdir=.tmp/chat-tests --log-level=warning && node .tmp/chat-tests/message-order-regression.mjs && node .tmp/chat-tests/chat-store-regression.mjs && node .tmp/chat-tests/chat-stream-committer-regression.mjs
message-order-regression: all checks passed
chat-store-regression: all checks passed
chat-stream-committer-regression: all checks passed
npm warn Unknown env config "http-proxy". This will stop working in the next major version of npm.
> ycode@0.0.7 test:sessions
> esbuild scripts/session-store-regression.ts --bundle --platform=node --format=esm --external:esbuild --outfile=.tmp/session-store-regression.mjs --log-level=warning && node .tmp/session-store-regression.mjs
session-store-regression: all checks passed
npm warn Unknown env config "http-proxy". This will stop working in the next major version of npm.
> ycode@0.0.7 test:persistence
> esbuild scripts/chat-persistence-regression.ts --bundle --platform=node --format=esm --external:esbuild --outfile=.tmp/chat-persistence-regression.mjs --log-level=warning && node .tmp/chat-persistence-regression.mjs
chat-persistence-regression: all checks passed
npm warn Unknown env config "http-proxy". This will stop working in the next major version of npm.
> ycode@0.0.7 test:conversation
> esbuild scripts/conversation-renderer-regression.tsx scripts/composer-regression.tsx scripts/completed-fold-regression.tsx scripts/streaming-footer-regression.tsx --bundle --platform=node --format=cjs --jsx=automatic --loader:.css=text --out-extension:.js=.cjs --outdir=.tmp/conversation-tests --log-level=error && node .tmp/conversation-tests/conversation-renderer-regression.cjs && node .tmp/conversation-tests/composer-regression.cjs && node .tmp/conversation-tests/streaming-footer-regression.cjs && node .tmp/conversation-tests/completed-fold-regression.cjs
Conversation specialized renderer SSR regression checks passed
Composer/message action regression cases passed
streaming-footer-regression: persistent stream status, delayed/paused rotation, brand/locale mapping, source CSS, and completed model footer passed
Completed-fold model and SSR regression checks passed
===== reporting.txt: exit 0 =====
npm warn Unknown env config "http-proxy". This will stop working in the next major version of npm.
> ycode@0.0.7 test:reporting
> node --test scripts/regression-reporting.test.mjs
✔ alignment reports absent optional DOM coverage explicitly (2673.775349ms)
✔ alignment requires DOM when requested by flag (65.79364ms)
✔ alignment requires DOM when requested by environment (53.706189ms)
✔ alignment rejects an unloadable configured DOM module instead of skipping (61.932964ms)
✔ backend never reports a skipped real package as PASS (1853.404005ms)
✔ alignment rejects a configured module without a JSDOM export (72.031573ms)
ℹ tests 6
ℹ suites 0
ℹ pass 6
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 4879.378475
===== alignment-dom.txt: exit 0 =====
npm warn Unknown env config "http-proxy". This will stop working in the next major version of npm.
> ycode@0.0.7 test:alignment:dom
> node scripts/run-alignment-regression.mjs --require-dom
PASS model alignment: fresh/legacy migration, new/edit/default/delete/reload, valid selection (offline host fixtures)
PASS model settings: deferred owner switch, rename mapping, addition selection, empty deletion, immutable history
PASS session factory: first-send preference, mode preservation, invalid permission rejection (isolated ports)
{"historyMessages":10000,"bytes":747781,"parseMs":4.507891999999998,"storeHydrationMs":0.2576079999999905,"note":"Node parsing/store benchmark only, not browser rendering or Windows IPC performance"}
session-composer-alignment: loading/cache/retry/races/model/permissions/modes/SSR passed
alignment-conversation: local groups, original expanded order, question projection and truthful status passed
A01 native MessageBubble identity aliases, immutable inputs and ordinary raw output passed
A01 imported native card, linked dedup and unknown-position compatibility passed
question-answer-shell: structural and recovered CSS contracts passed
question-answer-shell: DOM hierarchy, controls linkage, click, Enter, Space and inert contracts passed
Runtime progress, session-grant scope and approval lifecycle regressions passed
Permission intercept static rendering passed; interactive keyboard/focus remains UI acceptance
Claude host approval policy unit checks passed (no SDK process/application/matching verification)
Mock SDK replay lifecycle passed: fail closed, retry, session isolation, independent mode guard
task popconfirm DOM regression: 34 checks passed (jsdom, not pixel validation)
question-interaction: 24 DOM behavioral checks passed
question-identity: 30 A01 DOM checks passed (not Electron/pixel/SDK acceptance)
completed-fold-nested: real question/tool/thinking/local-summary remount, event, keyboard and identity contracts passed
completed-fold-native-identity: real reducer done correction, native IDs, insertion/reorder, repeated outer toggles, message isolation and legacy fallback passed
Permission intercept DOM: 14 checks passed (not pixel/SDK verification)
{"checks":37,"passed":true,"scope":"Isolated React DOM and CSS contracts; no native keyboard/layout/pixel acceptance"}
{"result":"PASS","phase":"alignment-offline","suites":10}
{"result":"PASS","phase":"alignment-dom","suites":7}
npm notice
npm notice New major version of npm available! 11.9.0 -> 12.2.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v12.2.0
npm notice To update run: npm install -g npm@12.2.0
npm notice
===== skills-backend.txt: exit 0 =====
npm warn Unknown env config "http-proxy". This will stop working in the next major version of npm.
> ycode@0.0.7 test:recommended-skills
> esbuild scripts/recommended-skills-backend-regression.ts --bundle --platform=node --format=esm --external:esbuild --outfile=.tmp/recommended-skills-backend-regression.mjs --log-level=warning && node .tmp/recommended-skills-backend-regression.mjs
{"result":"PASS","checks":50,"phase":"archive"}
{"result":"PASS","checks":60,"phase":"required-offline"}
{"result":"SKIP","phase":"real-package","checks":0,"reason":"published package is unavailable; optional package checks were not run","path":"/workspace/scratch/0aaa9774aecc/single-package-staging/ycode/.tmp/recommended-audit/archify.zip"}
===== skills-dom.txt: exit 0 =====
npm warn Unknown env config "http-proxy". This will stop working in the next major version of npm.
> ycode@0.0.7 test:recommended-skills:dom
> node scripts/test-recommended-skills-dom.mjs
{"result":"PASS","checks":45,"output":"/workspace/scratch/0aaa9774aecc/single-package-staging/ycode/.tmp/recommended-skills-dom-9W3a0L"}
===== build.txt: exit 0 =====
Full build (including typecheck) succeeded; tail follows:
out/renderer/assets/texmath-Bkeg3ZLn.js 594.25 kB
out/renderer/assets/wasm-CVjZL0jK-2Bi6p3c3.js 622.62 kB
out/renderer/assets/cpp-9jHBA231-CtHklR8a.js 626.73 kB
out/renderer/assets/app-BYh1ERuc.js 675.57 kB
out/renderer/assets/emacs-lisp-DjtOxg4j-CUUa7aOE.js 780.06 kB
out/renderer/assets/cytoscape.esm-bVGYt-iW.js 869.69 kB
out/renderer/assets/ArtifactPierreDiff-D5xhRc5y.js 1,119.58 kB
out/renderer/assets/chunk-FOHPRMQF-BCllzKJD.js 1,154.18 kB
out/renderer/assets/index-K0c2JUwW.js 3,761.37 kB
out/renderer/assets/editor.api2-dPwET-7w-BYIQ9bT3.js 4,889.23 kB
✓ built in 2.41s
@@ -0,0 +1,53 @@
# 测试脚本清理与入口整理
日期:2026-10-21(Asia/Shanghai)。用户明确授权整理并批量删除;本次是测试工程维护,不改变 B01/B02 产品验收结论。
- 基线:`f512a0f3fd2b8a4f74f1ba530bde17e6c212205a`,保留远端刚加入的 Dev 启动 SOP。
- **清理代码 SHA:`a839d23e129e14c65c4d216c238414b47cd9ad63`**。
- `src/` 无改动;不删除用户数据、不改依赖锁文件、不清除 Git 历史。
## 删除与保留
删除 **115 个追踪文件 / 111,158 字节**:105 个无活动依赖的一次性 REA 操作 JSON、10 个已停用的直接 WorkBuddy CDP 工具。删除前逐项验证内容与基线相同;[完整清单](evidence/test-cleanup-20261021/deletions.json) 包含原因、引用、原哈希及恢复方法。
保留:
- 26 个有现行文档复跑、媒体或字体恢复用途的候选 REA 配置。
- REA 恢复程序、工具自测、source manifest/生成源码/证据,以及有效产品回归、构建和发布工具。
- 6 个仍有诊断用途或尚不能证明失效的根级候选工具,包括有 npm 入口的 shot;不因“没挂 npm”就删除。
- 原始历史验收文档不重写;其中已删除脚本链接须按记录的历史 SHA 查看,不能把历史路径误当现行命令。
脚本目录追踪文件由 **472 → 359**(删除 115,增加入口说明与 reporting 回归两文件)。这不是删除 115 个产品测试,也不代表测试覆盖缩减了同等数量。未保留另一份 scripts/archive 副本;需要时从 Git 恢复,禁止复活已禁用的原版采集方式。
恢复单个文件:
```sh
git restore --source=f512a0f3fd2b8a4f74f1ba530bde17e6c212205a -- <清单中的路径>
```
## 测试入口与结果
- 新增 `npm test` → `test:core`:类型检查 + chat/sessions/persistence/conversation 离线基线。不是全产品或 UI 验收。
- 新增 `test:alignment:dom` 严格入口;DOM 依赖缺失/错误时失败,不静默降级。普通 `test:alignment` 无依赖时明确输出 DOM SKIP。
- 推荐技能后端将 required-offline PASS 与 real-package PASS/SKIP 分开。缺可选缓存只能 SKIP;显式指定的坏路径或其他 I/O 错误失败,不冒充通过。
- 新增 `test:reporting` 六项真实 subprocess 结果契约回归。
- 移除失效的 `wb:capture` npm 入口,更新 AGENTS 历史说明。
- [scripts/README.md](../../scripts/README.md) 明确核心、专项、Windows UI、REA/发布工具的用途及安全边界;根 README 增加入口。没有执行现场诊断或把所有脚本一键批跑。
## 验证
[命令证据](evidence/test-cleanup-20261021/verification.txt):
| 命令 | 结果 |
| --- | --- |
| `npm test` | 退出 0,核心类型/状态/存储/渲染回归通过 |
| `npm run test:reporting` | 退出 0,6/6;覆盖显式 SKIP、严格 DOM 缺依赖/坏模块、可选缓存与显式坏 ZIP |
| 设置 DOM 路径后 `npm run test:alignment:dom` | 退出 0,offline 10 套与 DOM 7 套通过;SDK 部分仍为 mock |
| `test:recommended-skills`、`test:recommended-skills:dom` | 退出 0;后者 45 项,前者真实发布包为 SKIP,未冒充执行 |
| `npm run build` | 退出 0,包含类型检查与产物构建 |
| `git diff --check` | 通过 |
独立静态审查核对 115 项删除与清单完全一致;115 个唯一 npm 脚本目标存在;扫描 1,181 个保留代码/配置文件,没有发现删除造成的 live import、runner、fixture、构建/发布或 REA 恢复依赖断裂。残余 wb-icons 出处注释和 wb-home CSS 前缀不是执行依赖。
未启动真实 Electron/原版/模型、未下载真实技能或发布。没有运行全部工具或 Windows 测试;静态引用检查和 Linux 构建不能冒充全部环境通过。已有 token 门禁问题不在本轮修复范围,未修改其 baseline。
后续若继续整理,应复用公共 React/Electron 测试夹具并逐模块迁移,而非一次改写所有仍有效测试;本次没有为统一目录而大面积移动有效脚本。