Repository navigation
test: v8-2 self-made .ttsmod fixtures + baseline recovery (2024 to 2037) - #2
Merged
Merged
Conversation
窗口 v8-2:自制夹具 + 测试基线恢复(2024 → 2037)
产物:
- scripts/make-fixture.mjs(252 行):从 D:\工具\TTS\research\ 真实样本
裁剪 + 匿名化生成 3 个夹具 + 1 个 extracted/ 目录
- tests/fixtures/{s_dial,s_hex,sample_diceset}.ttsmod(总 20.8 KB,条目数 51/4/13)
- tests/fixtures/extracted/(13 文件,来自匿名化后 sample_diceset.ttsmod)
配置:
- .gitignore 修订:tests/fixtures/ 入白名单(仅排除 original/)
- .gitattributes 新增:夹具文件 -text(防 autocrlf 破坏字节比对)
- package.json scripts 加 make-fixture 入口
测试基线:
- 本地 npm test(不设 TTS_EXTRACTED_DIR):2036 passed / 70 skipped / 0 failed
- 本地 TTS_EXTRACTED_DIR=tests/fixtures/extracted npm test:2037 passed / 69 skipped / 0 failed
- CI(不设环境变量):2024 passed / 82 skipped / 0 failed(不破坏)
实测偏差(已采纳入库):
1. Nickname / SaveName 不能匿名化(pack-unpack.test.ts:298/315 依赖原值)
2. LuaScript 不能替换为 print("fixture")(pack-unpack.test.ts:329 依赖空串)
3. .cjc 是二进制不是 JSON(s_hex.ttsmod 的 333845772.cjc 原样保留)
4. extracted/ 必须来自匿名化后的 .ttsmod(archive-ttsmod.test.ts:243 字节比对)
测试文件顶部注释同步更新指向自制夹具。ci.yml 注释同步 v8-2 完工状态。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
窗口 v8-2:自制夹具 + 测试基线恢复
产物
scripts/make-fixture.mjs(252 行):从D:\工具\TTS\research\真实样本裁剪 + 匿名化生成 3 个夹具 + 1 个 extracted/ 目录(仅维护者本机用)tests/fixtures/{s_dial,s_hex,sample_diceset}.ttsmod(总 20.8 KB,ZIP 条目数 51/4/13)tests/fixtures/extracted/(13 文件,来自匿名化后 sample_diceset.ttsmod)配置变更
.gitignore:tests/fixtures/入白名单(仅排除original/子目录).gitattributes(新增):夹具文件-text(防 autocrlf 破坏 archive-ttsmod.test.ts:243 字节比对)package.jsonscripts 加make-fixture入口ci.yml头部注释同步 v8-2 完工状态测试基线
实测偏差(已采纳入库)
SaveName === 'Custom Dice Set'、:315 断言两个Nickname === 'D8'重名追加.2;匿名化只对Description与 URL 主机做print("fixture")——pack-unpack.test.ts:329 断言空字符串(保持空).cjc是二进制不是 JSON——s_hex.ttsmod 的Mods/Workshop/333845772.cjc不能JSON.parse,原样保留字节即可Buffer.compare === 0断言字节一致编排模式教训
原方案"单 run 单 GLM 代理"开工 21 分钟无产出(任务书过大),主窗口按 workflow-vitest-loop-pitfall §5 快速通道原则改"主窗口亲自写 + 子代理复核",45 分钟完工。教训将记入项目记忆
tts-phase8-v8-2-status.md。验收清单
make-fixture.mjs顶部 JSDoc 完整(含 13 个测试期望 + URL 特殊字符来源 + 实测偏差)TTS_FIXTURE_DIR/TTS_EXTRACTED_DIR环境变量)