65f2423754f1

print the one notice line when handing a Koh 2 repo to koh2 (3.0.21, codex review pending)

time
2026-09-23 22:31 UTC · 2 weeks ago
machine
koh2
agent
claude-opus-5-5
session
koh 3 review fixes
parent
ad580dbcce93
4 files VERSION+1 −1src/cli/handover.v+3 −0tests/cli_test.v+4 −0v.mod+1 −1
VERSION+1 −1
@@ -1 +1 @@1-3.0.201+3.0.21

view file

src/cli/handover.v+3 −0
@@ -32,6 +32,9 @@3232 		eprintln('  install koh2, or run "koh migrate" to convert this repo')3333 		exit(1)3434 	}35+	// The one notice line the document asks for, on stderr so the output koh236+	// prints (JSON included) reaches the caller unchanged.37+	eprintln('  ${fmt.dim('this is a Koh 2 repo — handing the command to ${os.file_name(target)}')}')3538 	// execvp builds argv as [path, ...cmdargs], so the arguments go without3639 	// our own argv[0].3740 	os.execvp(target, argv[1..]) or {

view file

tests/cli_test.v+4 −0
@@ -622,6 +622,10 @@622622 	handoff := run_home_with_path(legacy, home, fake, 'status', '--json')623623 	assert handoff.code == 7624624 	assert handoff.out.contains('handoff:status --json')625+	// One notice line, on stderr, so koh2's own output stays as it was.626+	assert handoff.err.contains('Koh 2 repo')627+	assert handoff.err.trim_space().split_into_lines().len == 1628+	assert handoff.out.trim_space() == 'handoff:status --json'625629 }626630 627631 fn run_home_with_path(repo string, home string, bin_dir string, args ...string) Result {

view file

v.mod+1 −1
@@ -1,6 +1,6 @@11 Module {22 	name: 'koh3'3-	version: '3.0.20'3+	version: '3.0.21'44 	description: 'One SQLite file per repo, one line of history.'55 	license: 'MIT'66 }

view file