fe8c5250fc91
upgrade a stolen repo through offer, and pin koh3 3.0.98 (v3.0.66)
- time
- 2026-09-27 16:12 UTC · 2 weeks ago
- machine
- Junes-MacBook-Pro.local
- agent
- deepseek/deepseek-flash
- session
- kepr connect and public steal
- parent
- 1b4865e81200
↓ kepr-fe8c5250.tar.gzatlas at this save
files changed3 files
package.json+1 −1tests/koh-version.txt+1 −1tests/kohsteal.test.ts+13 −5package.json+1 −1
@@ -1,6 +1,6 @@11 {22 "name": "kepr",3- "version": "3.0.65",3+ "version": "3.0.66",44 "private": true,55 "type": "module",66 "scripts": {tests/kohsteal.test.ts+13 −5
@@ -210,12 +210,20 @@210210 const signedIn = await koh3(thiefDir, thiefHome, ["remote", host, "--code", code]);211211 expect(signedIn.code, signedIn.err + signedIn.out).toBe(0);212212 213- // The next steal drops the source: the repo is this machine's own work now. The file214- // the strip left behind is unsaved work, cleared here as `revert` would.213+ // A save made before the upgrade is local work and nothing else: it must not write to214+ // the bucket, and it must not quietly drop the source on its own.215+ await writeFile(join(clone, "local.txt"), "work in progress\n");216+ const local = await koh3(clone, thiefHome, ["save", "local only"]);217+ expect(local.code, local.err + local.out).toBe(0);218+ expect(local.out + local.err).not.toContain("offered");219+ expect((await koh3(clone, thiefHome, ["remote"])).out).toContain(`${host}/${REPO}`);220+221+ // The next offer drops the source: the repo is this machine's own work now. The file222+ // the strip left behind is unsaved work, cleared here as `revert` would; offer is the223+ // path the addendum names for the owner case.215224 expect((await koh3(clone, thiefHome, ["revert", "--yes"])).code).toBe(0);216- const upgraded = await koh3(clone, thiefHome, ["steal"]);217- expect(upgraded.err, upgraded.err + upgraded.out).toBe("");218- expect(upgraded.code).toBe(0);225+ const upgraded = await koh3(clone, thiefHome, ["offer"]);226+ expect(upgraded.code, upgraded.err + upgraded.out).toBe(0);219227 expect(upgraded.out + upgraded.err).toContain("now syncs with your bucket");220228 await writeFile(join(clone, "README.md"), "# shipped\n\nThe thief's edit.\n");221229 expect((await koh3(clone, thiefHome, ["save", "from the thief"])).code).toBe(0);