diff --git a/.github/fork-seams.json b/.github/fork-seams.json index 7e0408e34f478..231c84f8c3b1b 100644 --- a/.github/fork-seams.json +++ b/.github/fork-seams.json @@ -166,6 +166,32 @@ "packages/provider-core/src/server/failure.ts": { "why": "MCP profiles part 2: the refusal of a Claude turn by its MCP profile says why and how to fix it, so its message is shown.", "added": ["case \"ClaudeMcpProfileError\":"] + }, + "apps/web/src/components/settings/settingsSearch.ts": { + "why": "The fork's Settings page \"Fork\" (/settings/fork) is one more SettingsPath, so it needs its label, its place in the nav (the Agents group) and its search scope here; its rows are the fork's own search items (forkSettingsSearchItems.ts), spread in at one place. The import and the spread predate the list (they were \"pending\").", + "added": [ + "import { FORK_SETTINGS_SEARCH_ITEMS } from \"./forkSettingsSearchItems\"; // Fork", + "...FORK_SETTINGS_SEARCH_ITEMS, // Fork: waits and agent slots." + ], + "announced": { + "since": "2026-11-19", + "added": [ + "import { FORK_SETTINGS_LABEL, FORK_SETTINGS_SEARCH_ITEMS } from \"./forkSettingsSearchItems\"; // Fork", + "| \"/settings/fork\" // Fork", + "\"/settings/fork\": FORK_SETTINGS_LABEL, // Fork", + "\"/settings/fork\", // Fork", + "\"/settings/fork\": null, // Fork", + "...FORK_SETTINGS_SEARCH_ITEMS, // Fork: the rows of the Fork page." + ] + } + }, + "apps/web/src/components/settings/SettingsSidebarNav.tsx": { + "why": "The fork's Settings page \"Fork\" (/settings/fork) needs its icon in the nav's icon table, which every SettingsPath must have.", + "added": [], + "announced": { + "since": "2026-11-19", + "added": ["GitForkIcon,", "\"/settings/fork\": GitForkIcon, // Fork"] + } } }, "//pending": "Upstream files whose fork lines predate counting every upstream file, each with its ceiling: the most fork lines it may hold against upstream (counted from upstream, as fork-follow runs the check). To move into fork files or pin as seams; lower a ceiling when lines move out and take a file off when none are left. A pull request may change them but not grow them.", @@ -215,7 +241,6 @@ "apps/web/src/components/settings/SettingsPanels.tsx": 4, "apps/web/src/components/settings/scopedSettings.test.ts": 153, "apps/web/src/components/settings/scopedSettings.ts": 9, - "apps/web/src/components/settings/settingsSearch.ts": 2, "apps/web/src/components/settings/useScopedSettings.ts": 27, "apps/web/src/index.css": 2, "apps/web/src/markdown-links.test.ts": 1, @@ -281,6 +306,9 @@ "packages/shared/src/waitFor*", "scripts/lib/release-repository.ts", "scripts/release-repository.test.ts", + "apps/web/src/routes/_chat.settings.fork.tsx", + "apps/web/src/components/settings/ReviewRulesSettings*", + "apps/web/src/components/settings/reviewRulesSettings*", "!scripts/scenarios/fork-title-regenerates-from-inherited-history.e2e.ts" ], "//lost": "Seam and pending files that lost upstream lines, counted from upstream (as fork-follow runs the check): \"lines\", the upstream lines not kept in order and indentation; \"gone\", those whose text is gone. Held exactly, like a ceiling; an unlisted file counts 0. Lower a count when a line comes back, and keep each one small: a count is not a set of lines, so a line counted here may move unseen, and in a pending file a pull request can put back one gone upstream line and delete another with both counts unchanged.", diff --git a/.github/scripts/fork-seam-check.cjs b/.github/scripts/fork-seam-check.cjs index cb0560030fccd..5419641efc8fb 100644 --- a/.github/scripts/fork-seam-check.cjs +++ b/.github/scripts/fork-seam-check.cjs @@ -13,6 +13,15 @@ const CONFIG = ".github/fork-seams.json"; const REMOVED = ".github/fork-removed-workflows.txt"; const REMOVED_PATH = /^\.github\/workflows\/[^/,\s]+\.ya?ml$/; const FORK_WORKFLOW = /^\.github\/workflows\/fork-[^/]*\.ya?ml$/; +// Generated upstream files: the folder each is generated from, and the fork test that proves the +// file is the generator's output (a hand edit fails it). A fork route repeats upstream's lines +// (`} as any)`), so the file is not judged line by line when its folder changes too. +const GENERATED = new Map([ + [ + "apps/web/src/routeTree.gen.ts", + { source: "apps/web/src/routes/", proof: "apps/web/src/forkRouteTree.test.ts" }, + ], +]); function git(args) { return execFileSync("git", ["-c", "core.quotePath=false", ...args], { @@ -271,6 +280,7 @@ function findUnlistedChanges( changed, atBase, atHead, + atMain = atBase, upstream, isForkFile, removed = new Set(), @@ -297,17 +307,32 @@ function findUnlistedChanges( if (!removed.has(file) && !FORK_WORKFLOW.test(file)) reasons.push(deleted(file)); continue; } + const generated = GENERATED.get(file); + let unproven = ""; + if (generated !== undefined && changed.some((other) => other.startsWith(generated.source))) { + const proof = atHead(generated.proof); + if (proof === undefined) { + reasons.push( + `${file}: generated from ${generated.source}, but this change has no ${generated.proof}, the test that proves it is the generator's output.`, + ); + continue; + } + // On a pull request the proof must be main's: a change to it (it.skip, an always-green test) + // could pass its own hand edit. From upstream the head's own script and tests judge. + if (upstream || proof === atMain(generated.proof)) continue; + unproven = ` Judged line by line: this change's ${generated.proof} is not main's, so it proves nothing (change that test in its own pull request, or update the branch from main).`; + } const added = total(addedLines(base, head)); const entry = upstream ? "." : ' (if it is a fork file upstream does not have, add it to "forkFiles").'; if (added > 0) { reasons.push( - `${file}: upstream file with ${added} fork line${added === 1 ? "" : "s"} but no entry in ${CONFIG}${entry}`, + `${file}: upstream file with ${added} fork line${added === 1 ? "" : "s"} but no entry in ${CONFIG}${entry}${unproven}`, ); } else if (!sameLines(base, head)) { reasons.push( - `${file}: upstream file whose lines this change deletes, moves or re-indents, but no entry in ${CONFIG}${entry}`, + `${file}: upstream file whose lines this change deletes, moves or re-indents, but no entry in ${CONFIG}${entry}${unproven}`, ); } } @@ -1018,6 +1043,8 @@ function main(argv) { changed, atBase, atHead, + // The list's commit: main on a pull request (fork-checks), the head from upstream. + atMain: (file) => textAt(configRef, file), upstream, isForkFile, removed, @@ -1147,6 +1174,7 @@ function main(argv) { module.exports = { CONFIG, + GENERATED, compileForkPattern, findAnnouncementWarnings, findDuplicateKey, diff --git a/.github/scripts/fork-seam-check.test.cjs b/.github/scripts/fork-seam-check.test.cjs index 6bab82629f5a5..3817c70267e9a 100644 --- a/.github/scripts/fork-seam-check.test.cjs +++ b/.github/scripts/fork-seam-check.test.cjs @@ -16,6 +16,7 @@ const { findStaleSeamLines, findUnlistedChanges, forkFileTest, + GENERATED, lineCounts, lostLines, lowerList, @@ -211,6 +212,67 @@ test("from upstream, a fork pattern that matches an upstream file fails until ex ); }); +test("the route tree is judged as generated output: with a route change and its proof test, or line by line", () => { + const TREE = "apps/web/src/routeTree.gen.ts"; + const PROOF = "apps/web/src/forkRouteTree.test.ts"; + const ROUTE = "apps/web/src/routes/_chat.settings.fork.tsx"; + const tree = "const A = AImport.update({\n getParentRoute: () => Root,\n} as any)\n"; + // A fork route's block repeats upstream's lines, which no seam entry can list. + const forkTree = `${tree}const Fork = ForkImport.update({\n getParentRoute: () => Root,\n} as any)\n`; + const base = { [TREE]: tree, [PROOF]: "test\n" }; + const withRoute = { [TREE]: forkTree, [PROOF]: "test\n", [ROUTE]: "route\n" }; + for (const upstream of [true, false]) { + assert.deepEqual(unlisted({}, base, withRoute, upstream).reasons, [], String(upstream)); + // Without a route change, a change to the tree is a hand edit, judged like any upstream file. + const alone = unlisted({}, base, { ...base, [TREE]: forkTree }, upstream).reasons; + assert.equal(alone.length, 1); + assert.match(alone[0], /^apps\/web\/src\/routeTree\.gen\.ts: upstream file with 3 fork lines/); + const { [PROOF]: _proof, ...noProof } = withRoute; + assert.deepEqual(unlisted({}, { [TREE]: tree }, noProof, upstream).reasons, [ + `${TREE}: generated from apps/web/src/routes/, but this change has no ${PROOF}, the test that proves it is the generator's output.`, + ]); + // Deleting it is still refused. + const { [TREE]: _tree, ...gone } = withRoute; + assert.match( + unlisted({}, base, gone, upstream).reasons[0], + /^apps\/web\/src\/routeTree\.gen\.ts: upstream file this change deletes/, + ); + // A folder that only starts like the routes folder is no route change. + const sibling = { ...base, [TREE]: forkTree, "apps/web/src/routes-x/a.ts": "a\n" }; + const nearRoute = unlisted({}, base, sibling, upstream).reasons; + assert.equal(nearRoute.length, 1); + assert.match( + nearRoute[0], + /^apps\/web\/src\/routeTree\.gen\.ts: upstream file with 3 fork lines/, + ); + } + // On a pull request the proof must be main's: one that changes it (it.skip, an always-green test) + // could pass its own hand edit, so the tree is then judged line by line. From upstream the head's + // own script and tests judge it, and upstream has no proof to compare with. + const weakened = { ...withRoute, [PROOF]: 'it.skip("…", () => {});\n' }; + assert.deepEqual(unlisted({}, { [TREE]: tree }, weakened, true).reasons, []); + const refused = unlisted({}, base, weakened, false).reasons; + assert.equal(refused.length, 1); + assert.match(refused[0], /^apps\/web\/src\/routeTree\.gen\.ts: upstream file with 3 fork lines/); + assert.match(refused[0], /forkRouteTree\.test\.ts is not main's/); + // Main's, not the merge-base's: a branch from before main changed the proof is judged line by line + // until it is updated from main. + const judge = (main) => + findUnlistedChanges( + { files: {}, pending: {}, forkFiles: [] }, + { + changed: [TREE, ROUTE], + atBase: (file) => base[file], + atHead: (file) => withRoute[file], + atMain: (file) => main[file], + upstream: false, + isForkFile: forkFileTest([]), + }, + ).reasons; + assert.deepEqual(judge(base), []); + assert.match(judge({ ...base, [PROOF]: "stricter test\n" })[0], /is not main's/); +}); + test("a pending file: held to its ceiling from upstream; on a pull request it may change but not grow", () => { const config = { pending: { "p.ts": 2 } }; const main = { "p.ts": `${UP}forkA();\nforkB();\n` }; @@ -448,6 +510,75 @@ const readReal = (file) => // Read in each test, not at load: a parse error then fails the tests that pin it, not the file. const realConfig = () => parseConfig(readReal(CONFIG)); +// The options apps/web/vite.config.ts passes to tanstackRouter(...), which dev and builds generate +// the route tree with. Throws when the call is gone, repeated or not a plain literal. +function viteRouterOptions(source) { + const calls = [...source.matchAll(/\btanstackRouter\(/g)]; + const unreadable = (why) => + new Error( + `apps/web/vite.config.ts: ${why}; teach this test to read the router plugin's options again.`, + ); + if (calls.length !== 1) throw unreadable(`${calls.length} tanstackRouter( calls, not 1`); + const start = calls[0].index + calls[0][0].length; + let depth = 1; + let end = start; + while (depth > 0 && end < source.length) { + const char = source[end++]; + if (char === "(") depth += 1; + if (char === ")") depth -= 1; + } + const text = source.slice(start, end - 1).trim(); + if (text === "") return {}; + try { + return new Function(`"use strict"; return (${text});`)(); + } catch (error) { + throw unreadable(`its tanstackRouter(${text}) options are not a plain literal (${error})`); + } +} + +// GENERATED must name the tree and folder the router plugin really uses, or the seam check skips the +// wrong files. Checked here, not in the proof test: app code must not read this fork-owned script +// (fork-owned-reads.test.py), since a fork-only change to it would skip the app jobs. The proof test +// pins what the plugin resolves these options to (its defaults: src/routes/, src/routeTree.gen.ts). +test("the generated-file table names the route tree and routes folder vite.config.ts generates with", () => { + const read = (file) => { + try { + return readReal(file); + } catch { + return undefined; + } + }; + const fileConfig = read("apps/web/tsr.config.json"); + const options = { + ...(fileConfig === undefined ? {} : JSON.parse(fileConfig)), + ...viteRouterOptions(readReal("apps/web/vite.config.ts")), + }; + const inWeb = (file) => path.posix.join("apps/web", file); + const source = `${inWeb(options.routesDirectory ?? "./src/routes")}/`; + const tree = inWeb(options.generatedRouteTree ?? "./src/routeTree.gen.ts"); + assert.deepEqual(GENERATED.get(tree), { source, proof: "apps/web/src/forkRouteTree.test.ts" }); + for (const [file, { source: folder, proof }] of GENERATED) { + assert.notEqual(read(file), undefined, `${file} is not in the tree`); + assert.notEqual(read(proof), undefined, `${proof} is not in the tree`); + assert.ok( + folder.endsWith("/"), + `${folder}: a folder ends with /, or a sibling's name matches it`, + ); + const inFolder = execFileSync( + "git", + ["-C", REPO_ROOT, "ls-tree", "--name-only", "--full-tree", "HEAD", folder], + { encoding: "utf8" }, + ); + assert.notEqual(inFolder.trim(), "", `${folder} has no files`); + } + // The reader itself: a moved or computed option fails it rather than passing on the defaults. + assert.deepEqual(viteRouterOptions("x(tanstackRouter({ autoCodeSplitting: true }))"), { + autoCodeSplitting: true, + }); + assert.throws(() => viteRouterOptions("plugins: []"), /0 tanstackRouter\( calls/); + assert.throws(() => viteRouterOptions("tanstackRouter(options)"), /not a plain literal/); +}); + test("every listed seam line is in its file and no announced one is yet, so the list is not stale", () => { const read = (file) => { try { @@ -591,6 +722,37 @@ function withRepo(body) { } const seams = (config) => ({ [CONFIG]: JSON.stringify(config) }); +// Pins main()'s wiring: the proof is compared with the list's commit (main), not the merge-base. +test("the command line takes the route tree as generated only while the proof is main's", () => { + withRepo(({ git, commit, run }) => { + const TREE = "apps/web/src/routeTree.gen.ts"; + const PROOF = "apps/web/src/forkRouteTree.test.ts"; + const ROUTE = "apps/web/src/routes/_chat.settings.fork.tsx"; + const tree = "const A = AImport.update({\n getParentRoute: () => Root,\n} as any)\n"; + const forkTree = `${tree}const Fork = ForkImport.update({\n getParentRoute: () => Root,\n} as any)\n`; + const main = commit( + { ...seams({ files: SEAM }), ...BASE, [TREE]: tree, [PROOF]: "test\n" }, + "main", + ); + const route = { [TREE]: forkTree, [ROUTE]: "route\n" }; + git("checkout", "-q", "-b", "pr", main); + const pr = commit(route, "a route"); + assert.equal(run("--config-ref", main, main, pr).status, 0); + git("checkout", "-q", "-B", "weak", main); + const weak = commit({ ...route, [PROOF]: "it.skip();\n" }, "a route and a weaker proof"); + const refused = run("--config-ref", main, main, weak); + assert.equal(refused.status, 1); + assert.match( + refused.stderr, + /routeTree\.gen\.ts: upstream file with 3 fork lines.*is not main's/, + ); + // Main tightened the proof after the branch: judged line by line until updated from main. + git("checkout", "-q", "-B", "main2", main); + const main2 = commit({ [PROOF]: "stricter test\n" }, "main: a stricter proof"); + assert.match(run("--config-ref", main2, main, pr).stderr, /is not main's/); + }); +}); + test("the command line judges the lines a branch adds since the merge-base", () => { withRepo(({ git, commit, run }) => { const base = commit({ ...seams({ files: SEAM }), ...BASE }, "upstream"); diff --git a/apps/web/src/forkRouteTree.test.ts b/apps/web/src/forkRouteTree.test.ts new file mode 100644 index 0000000000000..89f1f14779137 --- /dev/null +++ b/apps/web/src/forkRouteTree.test.ts @@ -0,0 +1,105 @@ +// @effect-diagnostics nodeBuiltinImport:off - runs TanStack's route generator on the committed routes. +import * as NodeChildProcess from "node:child_process"; +import * as NodeFS from "node:fs"; +import * as NodeModule from "node:module"; +import * as NodeOS from "node:os"; +import * as NodePath from "node:path"; +import { expect, it } from "vite-plus/test"; + +interface RouteGenerator { + readonly Generator: new (options: { config: unknown; root: string }) => { + run(): Promise; + }; +} +interface RouterPlugin { + readonly getConfig: ( + input: Readonly>, + root: string, + ) => { readonly routesDirectory: string; readonly generatedRouteTree: string }; +} + +const web = NodePath.join(import.meta.dirname, ".."); +const repo = NodePath.join(web, "../.."); +const git = (...args: string[]) => + NodeChildProcess.execFileSync("git", ["-C", repo, ...args], { + encoding: "utf8", + maxBuffer: 64 * 1024 * 1024, + }); +const committed = (file: string) => + git("ls-tree", "--name-only", "--full-tree", "HEAD", file).trim() === file + ? git("show", `HEAD:${file}`) + : undefined; + +// The options vite.config.ts passes to tanstackRouter(...): dev and builds generate the tree with +// them, so the test must too. Fails when the call is gone, repeated or not a plain literal. +function viteRouterOptions(): Record { + const source = committed("apps/web/vite.config.ts") ?? ""; + const calls = [...source.matchAll(/\btanstackRouter\(/g)]; + const unreadable = (why: string) => + new Error( + `apps/web/vite.config.ts: ${why}; teach forkRouteTree.test.ts to read the router plugin's options again.`, + ); + if (calls.length !== 1) throw unreadable(`${calls.length} tanstackRouter( calls, not 1`); + const start = calls[0]!.index + calls[0]![0].length; + let depth = 1; + let end = start; + while (depth > 0 && end < source.length) { + const char = source[end++]; + if (char === "(") depth += 1; + if (char === ")") depth -= 1; + } + const text = source.slice(start, end - 1).trim(); + if (text === "") return {}; + try { + return new Function(`"use strict"; return (${text});`)() as Record; + } catch (error) { + throw unreadable(`its tanstackRouter(${text}) options are not a plain literal (${error})`); + } +} + +// Fork-only. The seam check does not judge routeTree.gen.ts line by line when a route file changes +// (.github/scripts/fork-seam-check.cjs, GENERATED), so this test is what refuses a hand edit there. +// It reads both from the commit: every vite run (this test's too) rewrites the working tree's copy. +it("the committed routeTree.gen.ts is what TanStack's generator writes for the committed routes", async () => { + // The plugin's own config reader and generator: the versions dev and builds run. + const fromWeb = NodeModule.createRequire(NodePath.join(web, "package.json")); + const { getConfig } = fromWeb("@tanstack/router-plugin") as RouterPlugin; + const fromPlugin = NodeModule.createRequire( + fromWeb.resolve("@tanstack/router-plugin/package.json"), + ); + const { Generator } = fromPlugin("@tanstack/router-generator") as RouteGenerator; + const root = NodeFS.mkdtempSync(NodePath.join(NodeOS.tmpdir(), "fork-route-tree-")); + try { + // The generator also reads apps/web/tsr.config.json, as it does under vite. + const tsrConfig = committed("apps/web/tsr.config.json"); + if (tsrConfig !== undefined) + NodeFS.writeFileSync(NodePath.join(root, "tsr.config.json"), tsrConfig); + const config = getConfig({ ...viteRouterOptions(), tmpDir: NodePath.join(root, "tmp") }, root); + const inRepo = (file: string) => + NodePath.posix.join("apps/web", NodePath.relative(root, file).split(NodePath.sep).join("/")); + const source = `${inRepo(config.routesDirectory)}/`; + const tree = inRepo(config.generatedRouteTree); + // The seam check's table names these two paths, and its own tests check that it names what + // vite.config.ts's options give; this pins what the plugin resolves those options to. (App code + // does not read the fork-owned script: a fork-only change to it would skip this job.) + expect({ source, tree }).toEqual({ + source: "apps/web/src/routes/", + tree: "apps/web/src/routeTree.gen.ts", + }); + const routes = git("ls-tree", "-r", "-z", "--name-only", "--full-tree", "HEAD", source) + .split("\0") + .filter(Boolean); + expect(routes.length).toBeGreaterThan(0); + for (const file of routes) { + const target = NodePath.join(root, NodePath.relative("apps/web", file)); + NodeFS.mkdirSync(NodePath.dirname(target), { recursive: true }); + NodeFS.writeFileSync(target, git("show", `HEAD:${file}`)); + } + await new Generator({ config, root }).run(); + expect(NodeFS.readFileSync(config.generatedRouteTree, "utf8")).toBe( + git("show", `HEAD:${tree}`), + ); + } finally { + NodeFS.rmSync(root, { recursive: true, force: true }); + } +}); diff --git a/docs/fork/updates.md b/docs/fork/updates.md index 7f9f9e97a4a5c..5c3bc6a1511b1 100644 --- a/docs/fork/updates.md +++ b/docs/fork/updates.md @@ -108,7 +108,19 @@ watches; it changes nothing on the machine, and `0` turns it off. in no list may gain no line, lose no line and keep its lines in order and indentation (trailing blanks and blank lines aside), and no upstream file may be deleted or renamed, except the workflows [`fork-removed-workflows.txt`](../../.github/fork-removed-workflows.txt) lists and upstream - `fork-*.yml`. A submodule pointer counts as a line. A pull request's run has no upstream commit, + `fork-*.yml`. A submodule pointer counts as a line. `apps/web/src/routeTree.gen.ts` is TanStack's + output from `apps/web/src/routes/`: in a change that also changes a route file it is not judged + line by line (a fork route's lines repeat upstream's), and + [`forkRouteTree.test.ts`](../../apps/web/src/forkRouteTree.test.ts) refuses a committed tree that + is not the generator's output for the committed routes, with the options `vite.config.ts` passes to + `tanstackRouter(...)`. On a pull request the skip holds only while that test is main's: a pull + request that changes it has its tree judged line by line, so change the test in its own pull + request (and update a branch from before such a change). On a rebase conflict in the tree, take + either side and regenerate it (`vp run dev` or a build writes it), then commit it. A router + version bump or a new `tanstackRouter` option can rebase cleanly and still change what the + generator writes: fork-follow's release tests then stop on `forkRouteTree.test.ts`. Rebase by hand + (the runbook below), regenerate the tree and commit it into the rebased series before pushing; a + pull request that changes only the tree is judged line by line and refused. A pull request's run has no upstream commit, so it takes files named as the fork's (`fork`, `fork-*`, `forkName*`, `FORK_*`) and `forkFiles` for the fork's own; from upstream, a pattern that matches an upstream file fails. Then remove the entry (or exclude a fork-named path with `!path`): from then on a pull request's run judges the @@ -300,7 +312,7 @@ change, or a fork line beyond the seams, it stops and opens one issue. Then: change (the refusal says "after the rebase") is raised in the rebased series' list (or, once pushed, with a list-only pull request to main). 3. Run the pin tests before pushing: - `vp test run packages/contracts/src/forkDefaults.test.ts packages/contracts/src/forkSettings.test.ts packages/shared/src/forkSettingsPatch.test.ts apps/server/src/serverSettings.forkDefaults.test.ts apps/server/src/serverSettings.forkSettings.test.ts apps/server/src/serverSettings.forkIntervals.test.ts apps/server/src/cloud/autoUpdateSettings.test.ts apps/server/src/cloud/autoUpdate.test.ts`. + `vp test run packages/contracts/src/forkDefaults.test.ts packages/contracts/src/forkSettings.test.ts packages/shared/src/forkSettingsPatch.test.ts apps/server/src/serverSettings.forkDefaults.test.ts apps/server/src/serverSettings.forkSettings.test.ts apps/server/src/serverSettings.forkIntervals.test.ts apps/server/src/cloud/autoUpdateSettings.test.ts apps/server/src/cloud/autoUpdate.test.ts apps/web/src/forkRouteTree.test.ts`. 4. Push with `--force-with-lease` and start fork-follow once, as its report says. ### The sync that brings upstream's updater