total-tokens-reminder.test.ts 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499
  1. import { mkdtemp, rm } from "node:fs/promises";
  2. import { tmpdir } from "node:os";
  3. import { join } from "node:path";
  4. import { describe, expect, it, onTestFinished } from "vitest";
  5. import {
  6. createProjectId,
  7. createRootTraceContext,
  8. createSessionId,
  9. ModelErrorCode,
  10. type ModelInputMessage,
  11. type ModelRequest,
  12. type RuntimeInputPresentation,
  13. } from "@zcode/contracts";
  14. import { createSqliteSessionStore } from "../../adapters/src/storage/session-store/sqlite-session-store.js";
  15. import {
  16. TOTAL_TOKENS_SYSTEM_LINE,
  17. formatTotalTokensReminder,
  18. } from "../src/context/total-tokens.js";
  19. import { createSubagentContextBuilder } from "../src/subagent/context-builder.js";
  20. import type { AgentRuntimeInternal } from "../src/runtime/internal.js";
  21. import {
  22. consumeTotalTokensBudget,
  23. createTotalTokensBudgetState,
  24. decideTotalTokensReminder,
  25. reanchorTotalTokensBudget,
  26. rollOverTotalTokensBudget,
  27. } from "../src/runtime/helpers/total-tokens-budget.js";
  28. import { createToolRegistry } from "../src/tool/registry.js";
  29. import { createTestAgentRuntime } from "./test-agent-runtime.js";
  30. import { createTestModelFactory } from "./test-runtime-model.js";
  31. import { createTestSessionEventStore } from "./test-event-store.js";
  32. const SUMMARY_MARKER = "create a detailed summary";
  33. const REMINDER_PATTERN = /<total_tokens>(\d+) tokens left<\/total_tokens>/g;
  34. /** 一次主循环响应:工具调用或文本结束,usage 决定下一次提醒的数值。 */
  35. interface ScriptStep {
  36. input: number;
  37. output: number;
  38. tool?: boolean;
  39. /** 本次请求先报上下文超限,触发 reactive compaction 后重试同一步。 */
  40. exceed?: boolean;
  41. /** 缓存读写量。input 已经包含这两项(与 adapter 的 inputTokens 口径相同)。 */
  42. cacheRead?: number;
  43. cacheWrite?: number;
  44. /** 本次响应返回前送进的 guide;不带 presentation 的和信箱一样直接调 steerTurn。 */
  45. guides?: { input: string; inputPresentation?: RuntimeInputPresentation }[];
  46. }
  47. function contentText(content: ModelInputMessage["content"]): string {
  48. return typeof content === "string" ? content : JSON.stringify(content);
  49. }
  50. /** 请求里非前导 system 部分出现的全部提醒数值,按出现顺序。 */
  51. function reminderValues(request: ModelRequest): number[] {
  52. const firstNonSystem = request.messages.findIndex((message) => message.role !== "system");
  53. const body = request.messages
  54. .slice(firstNonSystem)
  55. .map((message) => contentText(message.content))
  56. .join("\n");
  57. return [...body.matchAll(REMINDER_PATTERN)].map((match) => Number(match[1]));
  58. }
  59. function leadingSystemText(request: ModelRequest): string {
  60. const firstNonSystem = request.messages.findIndex((message) => message.role !== "system");
  61. return request.messages
  62. .slice(0, firstNonSystem)
  63. .map((message) => contentText(message.content))
  64. .join("");
  65. }
  66. /**
  67. * 后台通知开启的新一轮:首个请求不收集,工具批次后收集但不重新起算。
  68. * 真实用户消息会把 rolled 和旧 anchor 一起抵消;只有这类轮次能观察到计数器本身的状态。
  69. */
  70. function runNotificationTurn(runtime: ReturnType<typeof createTestAgentRuntime>) {
  71. return runtime.executeTurn("<task-notification>background done</task-notification>", undefined, {
  72. inputSource: "background_task",
  73. inputVisibility: "model-only",
  74. inputPresentation: "task_notification",
  75. });
  76. }
  77. async function fixture(
  78. options: {
  79. mcs?: boolean;
  80. taskType?: "subagent_child" | "workflow_child";
  81. /** 小上下文窗口:上下文接近 50000 时触发 auto compaction。 */
  82. smallWindow?: boolean;
  83. } = {},
  84. ) {
  85. const root = await mkdtemp(join(tmpdir(), "total-tokens-reminder-"));
  86. const dbPath = join(root, "session.sqlite");
  87. let store = await createSqliteSessionStore({ dbPath });
  88. const sessionId = createSessionId("total-tokens-reminder");
  89. const mainRequests: ModelRequest[] = [];
  90. const summaryRequests: ModelRequest[] = [];
  91. const script: ScriptStep[] = [];
  92. const runtimes: ReturnType<typeof createTestAgentRuntime>[] = [];
  93. onTestFinished(async () => {
  94. for (const runtime of runtimes) await runtime.closeBrowserSession();
  95. store.close();
  96. await rm(root, { recursive: true, force: true });
  97. });
  98. await store.createSession({
  99. id: sessionId,
  100. projectID: createProjectId("test"),
  101. slug: "test",
  102. title: "test",
  103. directory: root,
  104. version: "test",
  105. });
  106. let toolCallIndex = 0;
  107. const modelFactory = createTestModelFactory({
  108. properties: { supportsMidConversationSystem: options.mcs === true },
  109. async generateText(request) {
  110. if (JSON.stringify(request.messages).includes(SUMMARY_MARKER)) {
  111. summaryRequests.push(request);
  112. return { text: "<summary>Continue the task.</summary>", finishReason: "stop", usage: {} };
  113. }
  114. mainRequests.push(request);
  115. const step = script[0];
  116. if (!step) throw new Error("script exhausted");
  117. if (step.exceed) {
  118. step.exceed = false;
  119. throw Object.assign(new Error("provider context window exceeded"), {
  120. code: ModelErrorCode.ModelContextExceeded,
  121. });
  122. }
  123. script.shift();
  124. const runtime = runtimes.at(-1)!;
  125. for (const guide of step.guides ?? []) {
  126. const queued = await runtime.steerTurn({
  127. delivery: "guide",
  128. expectedTurnId: runtime.getActiveTurnInfo()?.turnId,
  129. ...guide,
  130. });
  131. expect(queued.kind).toBe("queued");
  132. }
  133. const usage = {
  134. inputTokens: step.input,
  135. outputTokens: step.output,
  136. totalTokens: step.input + step.output,
  137. ...(step.cacheRead !== undefined ? { cacheReadTokens: step.cacheRead } : {}),
  138. ...(step.cacheWrite !== undefined ? { cacheWriteTokens: step.cacheWrite } : {}),
  139. };
  140. if (!step.tool) return { text: "done", finishReason: "stop", usage };
  141. toolCallIndex += 1;
  142. return {
  143. text: "",
  144. finishReason: "tool-calls",
  145. toolCalls: [{ id: `inspect-${toolCallIndex}`, name: "Inspect", input: {} }],
  146. usage,
  147. };
  148. },
  149. });
  150. const makeRuntime = () => {
  151. const registry = createToolRegistry();
  152. registry.register({
  153. inputSchema: {},
  154. metadata: {
  155. name: "Inspect",
  156. concurrentSafe: true,
  157. destructive: false,
  158. needsApproval: false,
  159. readOnly: true,
  160. riskLevel: "low",
  161. sideEffectScope: "none",
  162. },
  163. handler: async () => "ok",
  164. });
  165. const runtime = createTestAgentRuntime(
  166. sessionId,
  167. {
  168. mode: "yolo",
  169. maxTurns: 30,
  170. modelStreaming: "off",
  171. taskType: options.taskType,
  172. titleGeneration: { enabled: false },
  173. workspacePath: root,
  174. ...(options.smallWindow
  175. ? {
  176. compact: { bufferTokens: 10, contextWindow: 50_000, summaryReserveTokens: 0 },
  177. maxOutputTokens: 1,
  178. }
  179. : {}),
  180. },
  181. {
  182. eventStore: createTestSessionEventStore(),
  183. modelFactory,
  184. sessionStore: store,
  185. toolRegistry: registry,
  186. },
  187. );
  188. runtimes.push(runtime);
  189. return { runtime, internal: runtime as unknown as AgentRuntimeInternal };
  190. };
  191. return {
  192. ...makeRuntime(),
  193. mainRequests,
  194. summaryRequests,
  195. script(...steps: ScriptStep[]) {
  196. script.push(...steps);
  197. },
  198. async reopen() {
  199. store.close();
  200. store = await createSqliteSessionStore({ dbPath });
  201. const next = makeRuntime();
  202. await next.runtime.resumeFromStore();
  203. return next;
  204. },
  205. };
  206. }
  207. describe("total-tokens budget math", () => {
  208. it("formats the fixed budget line", () => {
  209. expect(TOTAL_TOKENS_SYSTEM_LINE).toBe("<total_tokens>15000000 tokens left</total_tokens>");
  210. expect(formatTotalTokensReminder(14998995)).toBe(
  211. "<total_tokens>14998995 tokens left</total_tokens>",
  212. );
  213. });
  214. it("counts growth since the anchor, adds rollovers, never goes up and stops at zero", () => {
  215. let state = reanchorTotalTokensBudget(createTotalTokensBudgetState(), 40_000);
  216. let step = consumeTotalTokensBudget(state, 40_000);
  217. expect(step.remaining).toBe(15_000_000);
  218. step = consumeTotalTokensBudget(step.state, 52_000);
  219. expect(step.remaining).toBe(14_988_000);
  220. // 上下文变小(例如 microcompact)时数值不回升。
  221. step = consumeTotalTokensBudget(step.state, 30_000);
  222. expect(step.remaining).toBe(14_988_000);
  223. state = rollOverTotalTokensBudget(step.state, 180_000);
  224. step = consumeTotalTokensBudget(state, 30_000);
  225. expect(step.remaining).toBe(15_000_000 - (180_000 + 30_000 - 40_000));
  226. step = consumeTotalTokensBudget(reanchorTotalTokensBudget(step.state, 30_000), 30_000);
  227. expect(step.remaining).toBe(15_000_000);
  228. expect(consumeTotalTokensBudget(createTotalTokensBudgetState(), 16_000_000).remaining).toBe(0);
  229. });
  230. it.each([
  231. ["turn_input", true, true, { emit: true, reanchor: true }],
  232. ["turn_input", true, false, { emit: false, reanchor: false }],
  233. ["turn_input", false, true, { emit: false, reanchor: false }],
  234. ["tool_batch", true, false, { emit: true, reanchor: false }],
  235. ["tool_batch", false, false, { emit: true, reanchor: false }],
  236. ["text_guide", true, true, { emit: true, reanchor: true }],
  237. ["text_guide", true, false, { emit: true, reanchor: false }],
  238. ["text_guide", false, true, { emit: true, reanchor: false }],
  239. ] as const)(
  240. "decides reason=%s main=%s fromUser=%s",
  241. (reason, mainSession, fromUser, expected) => {
  242. expect(decideTotalTokensReminder({ reason, mainSession, fromUser })).toEqual(expected);
  243. },
  244. );
  245. });
  246. describe("total-tokens reminder in the turn loop", () => {
  247. it.each([{ mcs: false }, { mcs: true }])(
  248. "counts down within a turn, re-anchors on the next prompt and replays after resume %j",
  249. async ({ mcs }) => {
  250. const f = await fixture({ mcs });
  251. f.script(
  252. { input: 1000, output: 5, tool: true },
  253. { input: 2400, output: 7, tool: true },
  254. { input: 2600, output: 9 },
  255. );
  256. await f.runtime.executeTurn("first prompt");
  257. expect(f.mainRequests.map(reminderValues)).toEqual([
  258. [15_000_000],
  259. [15_000_000, 14_998_995],
  260. [15_000_000, 14_998_995, 14_997_593],
  261. ]);
  262. expect(
  263. leadingSystemText(f.mainRequests[0]!).endsWith(`\n\n${TOTAL_TOKENS_SYSTEM_LINE}`),
  264. ).toBe(true);
  265. if (mcs) {
  266. // MCS 下首个请求的提醒并入对话中的同一条 system,排在日期之前。
  267. const request = f.mainRequests[0]!;
  268. const firstNonSystem = request.messages.findIndex((message) => message.role !== "system");
  269. const merged = request.messages
  270. .slice(firstNonSystem)
  271. .find(
  272. (message) =>
  273. message.role === "system" &&
  274. contentText(message.content).includes(TOTAL_TOKENS_SYSTEM_LINE),
  275. );
  276. expect(contentText(merged!.content)).toContain(
  277. `${TOTAL_TOKENS_SYSTEM_LINE}\n\nToday's date is`,
  278. );
  279. }
  280. // 下一条真实用户消息以上一轮最后一次响应(2609)为起点。
  281. f.script({ input: 3000, output: 10, tool: true }, { input: 3100, output: 3 });
  282. await f.runtime.executeTurn("second prompt");
  283. expect(f.mainRequests.slice(3).map(reminderValues)).toEqual([
  284. [15_000_000, 14_998_995, 14_997_593, 15_000_000],
  285. [15_000_000, 14_998_995, 14_997_593, 15_000_000, 14_999_599],
  286. ]);
  287. // 冷恢复:已发提醒原样回放;计数器从零开始,下一条真实消息用持久化的 usage(3103)起算。
  288. const cold = await f.reopen();
  289. f.script({ input: 3200, output: 4, tool: true }, { input: 3300, output: 1 });
  290. await cold.runtime.executeTurn("after resume");
  291. const resumed = f.mainRequests.slice(5).map(reminderValues);
  292. expect(resumed).toEqual([
  293. [15_000_000, 14_998_995, 14_997_593, 15_000_000, 14_999_599, 15_000_000],
  294. [15_000_000, 14_998_995, 14_997_593, 15_000_000, 14_999_599, 15_000_000, 14_999_899],
  295. ]);
  296. },
  297. );
  298. it("adds the pre-compaction context on reactive compaction and adds no reminder to the retry", async () => {
  299. const f = await fixture();
  300. // 第一轮留下可摘要的历史;第二轮工具批次之后的请求超限。
  301. f.script({ input: 1000, output: 5, tool: true }, { input: 1100, output: 5 });
  302. await f.runtime.executeTurn("build history");
  303. f.script(
  304. { input: 1300, output: 5, tool: true },
  305. { input: 500, output: 5, tool: true, exceed: true },
  306. { input: 600, output: 2 },
  307. );
  308. await f.runtime.executeTurn("compact during the turn");
  309. expect(f.summaryRequests).toHaveLength(1);
  310. const values = f.mainRequests.slice(2).map(reminderValues);
  311. // 轮首以 1105 起算;工具批次后 1305 - 1105 = 200。
  312. expect(values[0]!.at(-1)).toBe(15_000_000);
  313. expect(values[1]!.at(-1)).toBe(14_999_800);
  314. // 摘要请求不产生新提醒:它只含被摘要的历史,超限前刚收集的那条在保留的尾部里。
  315. expect(reminderValues(f.summaryRequests[0]!)).toEqual(values[1]!.slice(0, -1));
  316. // compaction 后的重试不收集:最后一条仍是 compaction 前收集的那条,且只有一条。
  317. expect(values[2]!.at(-1)).toBe(14_999_800);
  318. expect(values[2]!.filter((value) => value === 14_999_800)).toHaveLength(1);
  319. // 下一个工具批次:rolled 1305 + 当前 505 - anchor 1105 = 705。
  320. expect(values[3]!.at(-1)).toBe(15_000_000 - 705);
  321. });
  322. it("adds the pre-compaction context on auto compaction after a tool batch", async () => {
  323. const f = await fixture({ smallWindow: true });
  324. f.script({ input: 1000, output: 5 });
  325. await f.runtime.executeTurn("build history");
  326. f.script(
  327. { input: 1200, output: 5, tool: true },
  328. // 这次响应后上下文到 49995,下一次请求前触发 auto compaction。
  329. { input: 49_990, output: 5, tool: true },
  330. { input: 600, output: 5, tool: true },
  331. { input: 700, output: 1 },
  332. );
  333. await f.runtime.executeTurn("compact during the turn");
  334. expect(f.summaryRequests).toHaveLength(1);
  335. const values = f.mainRequests.slice(1).map(reminderValues);
  336. // 轮首以 1005 起算;第一个工具批次后 1205 - 1005 = 200。
  337. expect(values[0]!.at(-1)).toBe(15_000_000);
  338. expect(values[1]!.at(-1)).toBe(15_000_000 - 200);
  339. // compaction 前收集的这条落在保留的尾部:摘要请求只含被摘要的历史,不含它,也不新增;
  340. // compaction 后的首个请求也不新增。
  341. expect(reminderValues(f.summaryRequests[0]!)).toEqual(values[1]);
  342. expect(values[2]!.at(-1)).toBe(15_000_000 - 48_990);
  343. expect(values[2]!.filter((value) => value === 15_000_000 - 48_990)).toHaveLength(1);
  344. // 下一个工具批次:rolled 49995 + 当前 605 - anchor 1005 = 49595;不累加时仍停在 48990。
  345. expect(values[3]!.at(-1)).toBe(15_000_000 - 49_595);
  346. });
  347. it("does not add the context of a manual compaction", async () => {
  348. const f = await fixture();
  349. f.script({ input: 1000, output: 5, tool: true }, { input: 1200, output: 5 });
  350. await f.runtime.executeTurn("before manual compaction");
  351. const result = await f.internal.compactActiveConversation(
  352. undefined,
  353. createRootTraceContext(),
  354. [],
  355. {},
  356. );
  357. expect(result.outcome).toBe("compacted");
  358. // 通知轮不重新起算,计数器沿用第一轮的 anchor 0 与已用 1005。
  359. f.script({ input: 3000, output: 5, tool: true }, { input: 3100, output: 1 });
  360. await runNotificationTurn(f.runtime);
  361. const notification = f.mainRequests.slice(2, 4).map(reminderValues);
  362. expect(notification[0]).toEqual([]);
  363. // 未累加:used = max(1005, 0 + 3005 - 0) = 3005;若手动 compaction 累加了 1205,会是 4210。
  364. expect(notification[1]).toEqual([15_000_000 - 3005]);
  365. // 下一条真实消息重新起算,以通知轮最后一次响应(3101)为起点。
  366. f.script({ input: 3300, output: 4, tool: true }, { input: 3400, output: 1 });
  367. await f.runtime.executeTurn("after manual compaction");
  368. const values = f.mainRequests.slice(4).map(reminderValues);
  369. expect(values[0]!.at(-1)).toBe(15_000_000);
  370. expect(values[1]!.at(-1)).toBe(15_000_000 - 203);
  371. });
  372. it("resets the counter when the same runtime resumes again", async () => {
  373. const f = await fixture();
  374. f.script({ input: 1000, output: 5 });
  375. await f.runtime.executeTurn("first prompt");
  376. // 第二条真实消息把 anchor 移到 1005。
  377. f.script({ input: 2000, output: 5 });
  378. await f.runtime.executeTurn("second prompt");
  379. // bootstrap 复用同一个 runtime 再次恢复;恢复等同新会话启动。
  380. await f.runtime.resumeFromStore();
  381. f.script({ input: 3000, output: 5, tool: true }, { input: 3100, output: 1 });
  382. await runNotificationTurn(f.runtime);
  383. const notification = f.mainRequests.slice(2).map(reminderValues);
  384. expect(notification[0]!.at(-1)).toBe(15_000_000);
  385. // 清零后从 0 计数:used = 3005;若沿用恢复前的 anchor 1005,会是 2000。
  386. expect(notification[1]!.at(-1)).toBe(15_000_000 - 3005);
  387. });
  388. it("gives a goal continuation no reminder on its first request and keeps the anchor", async () => {
  389. const f = await fixture();
  390. f.script({ input: 1000, output: 5 });
  391. await f.runtime.executeTurn("set the goal");
  392. f.script({ input: 2000, output: 5, tool: true }, { input: 2100, output: 1 });
  393. await f.runtime.executeTurn("continue the goal", undefined, {
  394. inputSource: "goal-continuation",
  395. inputVisibility: "model-only",
  396. });
  397. const values = f.mainRequests.slice(1).map(reminderValues);
  398. // 首个请求只带上一轮的那条提醒。
  399. expect(values[0]).toEqual([15_000_000]);
  400. // 不重新起算:anchor 仍是 0,used = 2005;重新起算会是 2005 - 1005 = 1000。
  401. expect(values[1]).toEqual([15_000_000, 15_000_000 - 2005]);
  402. });
  403. it.each([
  404. { name: "a session mailbox guide", guides: [{ input: "mailbox note" }], reanchor: false },
  405. {
  406. name: "a user guide",
  407. guides: [{ input: "user note", inputPresentation: "user_steer" as const }],
  408. reanchor: true,
  409. },
  410. {
  411. name: "a mailbox guide drained with a user guide",
  412. guides: [
  413. { input: "mailbox note" },
  414. { input: "user note", inputPresentation: "user_steer" as const },
  415. ],
  416. reanchor: true,
  417. },
  418. ])("re-anchors after a text-only reply only for a user guide: $name", async (testCase) => {
  419. const f = await fixture();
  420. f.script({ input: 1000, output: 5, guides: testCase.guides }, { input: 1100, output: 2 });
  421. await f.runtime.executeTurn("first prompt");
  422. // 轮首以 0 起算;纯文本回复后上下文 1005,不重新起算时 used = 1005。
  423. expect(f.mainRequests.map(reminderValues)).toEqual([
  424. [15_000_000],
  425. [15_000_000, testCase.reanchor ? 15_000_000 : 15_000_000 - 1005],
  426. ]);
  427. });
  428. it("counts cache tokens once because the input already includes them", async () => {
  429. const f = await fixture();
  430. f.script(
  431. { input: 1000, output: 5, tool: true, cacheRead: 800, cacheWrite: 100 },
  432. { input: 1100, output: 2 },
  433. );
  434. await f.runtime.executeTurn("cached prompt");
  435. // 上下文是 input + output = 1005;再加一次缓存读写会是 1905。
  436. expect(f.mainRequests.map(reminderValues)).toEqual([
  437. [15_000_000],
  438. [15_000_000, 15_000_000 - 1005],
  439. ]);
  440. });
  441. it("gives a subagent no reminder on its first request and counts its whole context", async () => {
  442. const f = await fixture({ taskType: "subagent_child" });
  443. f.script({ input: 1000, output: 5, tool: true }, { input: 1100, output: 2 });
  444. await f.runtime.executeTurn("child task");
  445. expect(f.mainRequests.map(reminderValues)).toEqual([[], [14_998_995]]);
  446. });
  447. it("keeps the budget line for a workflow child and never re-anchors it", async () => {
  448. const f = await fixture({ taskType: "workflow_child" });
  449. f.script({ input: 1000, output: 5, tool: true }, { input: 1100, output: 2 });
  450. await f.runtime.executeTurn("workflow step");
  451. expect(leadingSystemText(f.mainRequests[0]!).endsWith(`\n\n${TOTAL_TOKENS_SYSTEM_LINE}`)).toBe(
  452. true,
  453. );
  454. expect(f.mainRequests.map(reminderValues)).toEqual([[], [14_998_995]]);
  455. });
  456. });
  457. describe("total-tokens system line", () => {
  458. it("ends the subagent system prompt after the notes", () => {
  459. const built = createSubagentContextBuilder({
  460. agentPrompt: "You are a file search specialist.",
  461. envInfo: {
  462. cwd: "/Users/dev/project",
  463. platform: "darwin",
  464. shell: "zsh",
  465. osVersion: "Darwin 24.3.0",
  466. nodeVersion: "24.14.0",
  467. isGitRepository: false,
  468. },
  469. }).build();
  470. const tail = String(built.systemMessages.at(-1)?.content);
  471. expect(tail.endsWith(`this note is about report files.)\n\n${TOTAL_TOKENS_SYSTEM_LINE}`)).toBe(
  472. true,
  473. );
  474. });
  475. });