{"version":217,"agent":"capacity","message":"tree lists a version's files from the kept shapes, as pathsAt does since 216 (disk-first 2; abso Capacity). The tree at a version laid out every file only to list them. Not for an agent's tree, whose view has its draft on top. On abso's export the tree at head went from over 60 s to 225 ms (replay takes 41 s), and the tree at 612 takes 156 ms, both matching Project.load. version-files.test.ts now also checks the tree at every version against the in-memory project. Named tests: version-files, files-reads, project, draft-reads-stored, named-drafts (38 of 38); tsc clean.","time":1792041310535,"timeIso":"2026-10-15T05:15:10.535Z","changes":3,"change":3566,"files":["worker/project/history.ts","worker/project/project.ts","worker/project/test/version-files.test.ts"],"draft":null,"diff":[{"path":"worker/project/history.ts","added":4,"removed":1,"diff":"--- a/worker/project/history.ts\n+++ b/worker/project/history.ts\n@@ -16,6 +16,8 @@\n \tspaceNamed(name: string | null): Space;\n \tcheckVersion(space: Space, version: number): void;\n \tviewAt(space: Space, version: number): ReadView;\n+\t/** A version's file list from kept version shapes, when every version up to it has one (pathindex.ts). */\n+\tkeptPaths?(space: Space, version: number): string[] | undefined;\n \tagentView(agent: { readonly name: string; readonly space: string; readonly base: number }): ReadView;\n \tspellingIn(view: ReadView, asked: string): string;\n \tpathsOf(space: Space): Map<string, PathLifeRecord>;\n@@ -118,7 +120,8 @@\n \t\t\t);\n \t\treturn e;\n \t};\n-\tfor (const path of view.paths()) {\n+\tconst paths = (agent ? undefined : h.keptPaths?.(space, version)) ?? view.paths();\n+\tfor (const path of paths) {\n \t\tconst e = entryOf(path);\n \t\tif (!e) continue;\n \t\te.files++;"},{"path":"worker/project/project.ts","added":7,"removed":3,"diff":"--- a/worker/project/project.ts\n+++ b/worker/project/project.ts\n@@ -1767,6 +1767,7 @@\n \t\t\tspaceNamed: (name) => this.#spaceNamed(name),\n \t\t\tcheckVersion: (space, version) => this.#checkVersion(space, version),\n \t\t\tviewAt: (space, version) => this.#viewAt(space, version),\n+\t\t\tkeptPaths: (space, version) => this.#keptPaths(space, version),\n \t\t\tagentView: (agent) => this.#agentView(agent as AgentState),\n \t\t\tspellingIn: (view, asked) => this.spellingIn(view, asked),\n \t\t\tpathsOf: (space) => this.#paths.pathsOf(space),\n@@ -1777,6 +1778,11 @@\n \t\treturn this.#host;\n \t}\n \n+\t/** Shared's file list from kept shapes on a stored writer, where a version's layout reads its files from disk. */\n+\t#keptPaths(space: Space, version: number): string[] | undefined {\n+\t\treturn this.#writerStorage && space.name === SHARED ? this.#paths.keptPaths(space, version) : undefined;\n+\t}\n+\n \t/** One folder at a version (history.ts). */\n \ttree(...args: Tail<Parameters<typeof historyTree>>): ReturnType<typeof historyTree> {\n \t\treturn historyTree(this.#history, ...args);\n@@ -2643,9 +2649,7 @@\n \t\t\tspaceNamed: (name) => this.#spaceNamed(name),\n \t\t\tcheckVersion: (space, version) => this.#checkVersion(space, version),\n \t\t\tviewAt: (space, version) => this.#viewAt(space, version),\n-\t\t\t// Shared's lists from kept shapes on a stored writer, where a version's layout reads its files from disk.\n-\t\t\tkeptPaths: (space, version) =>\n-\t\t\t\tthis.#writerStorage && space.name === SHARED ? this.#paths.keptPaths(space, version) : undefined,\n+\t\t\tkeptPaths: (space, version) => this.#keptPaths(space, version),\n \t\t\tagentView: (agent) => this.#agentView(agent),\n \t\t\tversion: () => this.version,\n \t\t\tprojectFile: () => (this.initialized ? projectFileIn(this.#sharedView()) : undefined),"},{"path":"worker/project/test/version-files.test.ts","added":2,"removed":0,"diff":"--- a/worker/project/test/version-files.test.ts\n+++ b/worker/project/test/version-files.test.ts\n@@ -55,6 +55,8 @@\n \t// The file list at each version, folded from the kept shapes' files made and taken out: newest first, then from 0.\n \tassert.deepEqual(project.pathsAt(oracle.version), oracle.pathsAt(oracle.version));\n \tfor (let v = 0; v <= oracle.version; v++) assert.deepEqual(project.pathsAt(v), oracle.pathsAt(v), `paths at ${v}`);\n+\tfor (let v = 0; v <= oracle.version; v++)\n+\t\tassert.deepEqual(project.tree(\"\", { version: v }), oracle.tree(\"\", { version: v }), `tree at ${v}`);\n \t// A compare reads the kept lists for the versions between (version-log.ts): both ways, and across the drop.\n \tfor (const [from, to] of [\n \t\t[0, oracle.version],"}],"ci":null}