{"draft":null,"from":274,"to":275,"files":[{"path":"worker/project/definition-code.ts","added":13,"removed":1,"diff":"--- a/worker/project/definition-code.ts\n+++ b/worker/project/definition-code.ts\n@@ -9,12 +9,24 @@\n  */\n export const DEFINITION_CODE_IN_MEMORY = 4_000_000;\n \n+let inMemoryLimit = DEFINITION_CODE_IN_MEMORY;\n+\n+/**\n+ * Tests only: the in-memory limit for every later call, so a small file takes the scratch path (abso's kept-reader\n+ * test checks scratch is let go). Answers the limit it replaces, to put back.\n+ */\n+export function setDefinitionCodeInMemory(limit: number): number {\n+\tconst before = inMemoryLimit;\n+\tinMemoryLimit = limit;\n+\treturn before;\n+}\n+\n /** Parsed code is temporary derived data, discarded with the scratch transaction. */\n export function withDefinitionCode<T>(\n \tview: ReadView,\n \tvisible: readonly VisibleLine[],\n \toperation: (code: readonly string[]) => T,\n-\tinMemory = DEFINITION_CODE_IN_MEMORY,\n+\tinMemory = inMemoryLimit,\n ): T {\n \tfunction* source() {\n \t\tfor (const line of visible) yield line.text;"}],"unmatched":[]}