d09bbcf21969

pin the tests to koh 3.8.5, passing --yes where koh now asks to confirm (v3.1.8)

time
2026-10-07 01:22 UTC · 6 days ago
machine
Junes-MacBook-Pro.local
agent
claude-opus-5-5
session
one bucket key
parent
7540ef9cfbc2
3 files package.json+1 −1tests/koh-version.txt+1 −1tests/kohsteal.test.ts+10 −11
package.json+1 −1
@@ -1,6 +1,6 @@11 {22 	"name": "kepr",3-	"version": "3.1.7",3+	"version": "3.1.8",44 	"private": true,55 	"type": "module",66 	"scripts": {

view file

tests/koh-version.txt+1 −1
@@ -1 +1 @@1-3.4.61+3.8.5

view file

tests/kohsteal.test.ts+10 −11
@@ -105,10 +105,8 @@105105 				await writeFile(join(repoDir, "README.md"), "# shipped\n\nA repo to steal, edited.\n");106106 				expect((await koh(repoDir, ownerHome, ["save", "second save"])).code).toBe(0);107107 				// A second repo, never made public on Kepr: only a signed-in machine may have it.108+				// koh keeps one remote per machine, so this repo offers to the same bucket as the first.108109 				expect((await koh(keptDir, ownerHome, ["init"], keys)).code).toBe(0);109-				expect(110-					(await koh(keptDir, ownerHome, ["remote", "s3", endpoint, BUCKET, "fr-par"], keys)).code,111-				).toBe(0);112110 				await writeFile(join(keptDir, "secret.txt"), "kept in the bucket\n");113111 				expect((await koh(keptDir, ownerHome, ["save", "a private repo"])).code).toBe(0);114112 @@ -171,7 +169,7 @@171169 				await writeFile(join(repoDir, "README.md"), "# shipped\n\nA third save.\n");172170 				expect((await koh(repoDir, ownerHome, ["save", "third save"])).code).toBe(0);173171 				await sync();174-				expect((await koh(copy, thiefHome, ["steal"])).code).toBe(0);172+				expect((await koh(copy, thiefHome, ["steal", "--yes"])).code).toBe(0);175173 				expect(await readFile(join(copy, "README.md"), "utf8")).toContain("A third save");176174 177175 				// A strip on the source side reaches the mirror, and is honoured: history no longer@@ -183,7 +181,7 @@183181 				expect(await readFile(join(repoDir, ".kohignore"), "utf8")).toContain("/src.v\n");184182 				expect((await koh(repoDir, ownerHome, ["save", "ignore the stripped src.v"])).code).toBe(0);185183 				await sync();186-				expect((await koh(copy, thiefHome, ["steal"])).code).toBe(0);184+				expect((await koh(copy, thiefHome, ["steal", "--yes"])).code).toBe(0);187185 				expect((await koh(copy, thiefHome, ["doctor"])).code).toBe(0);188186 				expect(await Bun.file(join(copy, "src.v")).exists()).toBe(true);189187 				// Not listed as a change; the status line may still quote a save message naming it.@@ -240,14 +238,14 @@240238 				// The owner can read what that offer published, before anything else is saved: the241239 				// local save the copy was carrying went up with it.242240 				expect((await koh(repoDir, ownerHome, ["revert", "--yes"])).code).toBe(0);243-				expect((await koh(repoDir, ownerHome, ["steal"])).code).toBe(0);241+				expect((await koh(repoDir, ownerHome, ["steal", "--yes"])).code).toBe(0);244242 				expect(await readFile(join(repoDir, "local.txt"), "utf8")).toContain("work in progress");245243 				expect(JSON.parse((await koh(repoDir, ownerHome, ["view", "--json"])).out).saves).toEqual(246244 					JSON.parse((await koh(copy, thiefHome, ["view", "--json"])).out).saves,247245 				);248246 				await writeFile(join(copy, "README.md"), "# shipped\n\nThe thief's edit.\n");249247 				expect((await koh(copy, thiefHome, ["save", "from the thief"])).code).toBe(0);250-				expect((await koh(repoDir, ownerHome, ["steal"])).code).toBe(0);248+				expect((await koh(repoDir, ownerHome, ["steal", "--yes"])).code).toBe(0);251249 				expect(await readFile(join(repoDir, "README.md"), "utf8")).toContain("The thief's edit");252250 253251 				// The other copy still rides its source. When both sides changed the same file,@@ -258,7 +256,7 @@258256 				expect((await koh(repoDir, ownerHome, ["save", "owner edits the readme"])).code).toBe(0);259257 				await writeFile(join(other, "README.md"), "# shipped\n\nThe other copy's edit.\n");260258 				expect((await koh(other, thiefHome, ["save", "other copy edits"])).code).toBe(0);261-				const clashed = await koh(other, thiefHome, ["offer"]);259+				const clashed = await koh(other, thiefHome, ["offer", "--yes"]);262260 				expect(clashed.code).toBe(1);263261 				expect(clashed.err).toContain(264262 					'README.md changed on both machines — run "koh steal" to choose, then offer',@@ -266,7 +264,7 @@266264 				expect(await readFile(join(other, "README.md"), "utf8")).toContain("other copy's edit");267265 				expect((await koh(other, thiefHome, ["remote"])).out).toContain(`${host}/${REPO}`);268266 				// Choosing there upgrades the copy, and says where the version it gave up lives.269-				const chosen = await koh(other, thiefHome, ["steal", "--theirs"]);267+				const chosen = await koh(other, thiefHome, ["steal", "--theirs", "--yes"]);270268 				expect(chosen.code, chosen.err + chosen.out).toBe(0);271269 				expect(chosen.out + chosen.err).toContain("now syncs with your bucket");272270 				expect(chosen.out + chosen.err).toContain("your README.md is in");@@ -282,7 +280,7 @@282280 				expect((await koh(second, thiefHome, ["remote"])).out).toContain(`s3 ${endpoint}`);283281 284282 				// Saves that come in flagged during offer's upgrade are named in its JSON, as steal's are.285-				expect((await koh(repoDir, ownerHome, ["steal"])).code).toBe(0);283+				expect((await koh(repoDir, ownerHome, ["steal", "--yes"])).code).toBe(0);286284 				await writeFile(join(repoDir, "risky.txt"), "risky\n");287285 				// The same save brings a build file, so the fourth copy can publish a release.288286 				await writeFile(join(repoDir, "VERSION"), "1.0.0\n");@@ -301,13 +299,14 @@301299 				const flag = await koh(repoDir, ownerHome, ["flag", risky, "--reason", "broke the build"]);302300 				expect(flag.code, flag.err + flag.out).toBe(0);303301 				expect((await koh(repoDir, ownerHome, ["offer"])).code).toBe(0);304-				const flaggedOffer = await koh(join(third, REPO), thiefHome, ["offer", "--json"]);302+				const flaggedOffer = await koh(join(third, REPO), thiefHome, ["offer", "--json", "--yes"]);305303 				expect(flaggedOffer.code, flaggedOffer.err + flaggedOffer.out).toBe(0);306304 				expect(JSON.parse(flaggedOffer.out).flagged).toEqual([risky]);307305 				const flaggedBuilds = await koh(join(fourth, REPO), thiefHome, [308306 					"offer",309307 					"--builds",310308 					"--json",309+					"--yes",311310 				]);312311 				expect(flaggedBuilds.code, flaggedBuilds.err + flaggedBuilds.out).toBe(0);313312 				expect(JSON.parse(flaggedBuilds.out).flagged).toEqual([risky]);

view file