Files
Jyotisha/frontend/tests/claim-boundary-badge.test.ts
T
jesse-uxandGrok (agent loop) 1f9947a0d7 删除三个无调用方接口和约 3000 行前端死代码
关掉未登录就会触发约 20 秒计算的入口,并记下 BUG-1342。普通导出的逐字节锁保留。自测 tsc 0 错,lint 0 error / 123 warning,改到的前端测试 fail=0,两份 Python 测试通过,test:db 失败 13 条与 Windows 已知清单一致。

Co-Authored-By: Grok (agent loop)
2026-10-14 08:39:32 +08:00

14 lines
771 B
TypeScript

import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
import test from "node:test";
const rowSource = readFileSync(new URL("../src/components/chat-message-row.tsx", import.meta.url), "utf8");
test("assistant messages do not expose the internal claim boundary badge", () => {
assert.doesNotMatch(rowSource, /ClaimBoundaryBadge/);
assert.doesNotMatch(rowSource, /status=\{message\.techniqueTruth\}/);
// 原值: 读 claim-boundary-badge 源码并断言文案,以及 globals.css 里 .claim-boundary-badge 存在
// 新值: 删掉这些正向断言。聊天行不得挂 ClaimBoundaryBadge、不得把 techniqueTruth 当 status 的否定断言保留
// 原因: 内部徽章组件与对应死样式已删除,否定合同不放宽
});