46b0e7b67956
pin koh3 3.1.0 and expect a stripped file to stay banned in the joint test (v3.0.77)
- time
- 2026-09-28 05:59 UTC · 2 weeks ago
- machine
- Junes-MacBook-Pro.local
- agent
- claude-opus-5-5
- session
- strip removes a path for good
- parent
- 654b34548308
↓ kepr-46b0e7b6.tar.gzatlas at this save
files changed3 files
package.json+1 −1tests/koh-version.txt+1 −1tests/kohsteal.test.ts+11 −6package.json+1 −1
@@ -1,6 +1,6 @@11 {22 "name": "kepr",3- "version": "3.0.76",3+ "version": "3.0.77",44 "private": true,55 "type": "module",66 "scripts": {tests/kohsteal.test.ts+11 −6
@@ -177,12 +177,19 @@177177 178178 // A strip on the source side reaches the mirror, and is honoured: history no longer179179 // holds the path, so a fresh clone never sees the file at all. On the machine that180- // already had it, the file stays as work it never saved — a strip is not a delete.180+ // already had it the file stays on disk — a strip is not a delete — but it is banned:181+ // not unsaved work, and never saved again.181182 await stripPath(repoDir, ownerHome, "src.v");183+ // The strip wrote `/src.v` into `.kohignore`; the next save carries the rule everywhere.184+ expect(await readFile(join(repoDir, ".kohignore"), "utf8")).toContain("/src.v\n");185+ expect((await koh3(repoDir, ownerHome, ["save", "ignore the stripped src.v"])).code).toBe(186+ 0,187+ );182188 await sync();183189 expect((await koh3(clone, thiefHome, ["steal"])).code).toBe(0);184190 expect((await koh3(clone, thiefHome, ["doctor"])).code).toBe(0);185- expect((await koh3(clone, thiefHome, ["status"])).out).toContain("src.v");191+ expect(await Bun.file(join(clone, "src.v")).exists()).toBe(true);192+ expect((await koh3(clone, thiefHome, ["status"])).out).not.toContain("src.v");186193 const fresh = join(root, "thief-again");187194 await mkdir(fresh, { recursive: true });188195 expect((await koh3(fresh, thiefHome, ["steal", `${host}/${REPO}`])).code).toBe(0);@@ -217,10 +224,8 @@217224 expect(local.out + local.err).not.toContain("offered");218225 expect((await koh3(clone, thiefHome, ["remote"])).out).toContain(`${host}/${REPO}`);219226 220- // The next offer drops the source: the repo is this machine's own work now. The file221- // the strip left behind is unsaved work, cleared here as `revert` would; offer is the222- // path the addendum names for the owner case.223- expect((await koh3(clone, thiefHome, ["revert", "--yes"])).code).toBe(0);227+ // The next offer drops the source: the repo is this machine's own work now; offer is228+ // the path the addendum names for the owner case.224229 const upgraded = await koh3(clone, thiefHome, ["offer"]);225230 expect(upgraded.code, upgraded.err + upgraded.out).toBe(0);226231 expect(upgraded.out + upgraded.err).toContain("now syncs with your bucket");