disable token-mismatch gate by default in raw stream simulator

This commit is contained in:
CJACK.
2026-04-07 20:38:29 +08:00
parent d9e65c9710
commit f4ed10d38d
2 changed files with 4 additions and 1 deletions

View File

@@ -237,6 +237,7 @@ go run ./cmd/ds2api-tests --no-preflight
说明:
- 该工具默认重放 `tests/raw_stream_samples/manifest.json` 声明的 canonical 样本,按上游 SSE 顺序做 1:1 仿真解析。
- 默认校验不出现 `FINISHED` 文本泄露,并要求存在结束信号。
- 默认**不**把 `raw accumulated_token_usage` 与本地解析 token 做强一致校验(当前实现以内容估算为准);如需强校验可显式加 `--fail-on-token-mismatch`
- 每次运行都会把本地派生结果写入 `artifacts/raw-stream-sim/<run-id>/<sample-id>/replay.output.txt`,并输出结构化报告。
- 如果你有历史基线目录,可以通过 `--baseline-root` 让工具直接做文本对比。
- 更完整的协议级行为结构说明见 [DeepSeekSSE行为结构说明-2026-04-05.md](./DeepSeekSSE行为结构说明-2026-04-05.md)。

View File

@@ -20,7 +20,7 @@ function parseArgs(argv) {
failOnReferenceLeak: true,
failOnMissingFinish: true,
failOnBaselineMismatch: true,
failOnTokenMismatch: true,
failOnTokenMismatch: false,
showOutput: false,
writeReplayText: false,
};
@@ -44,6 +44,8 @@ function parseArgs(argv) {
out.failOnMissingFinish = false;
} else if (a === '--no-fail-on-baseline-mismatch' || a === '--no-fail-on-processed-mismatch') {
out.failOnBaselineMismatch = false;
} else if (a === '--fail-on-token-mismatch') {
out.failOnTokenMismatch = true;
} else if (a === '--no-fail-on-token-mismatch') {
out.failOnTokenMismatch = false;
} else if (a === '--show-output') {