2f32ce6c5db4
raise the source ceiling to 14,500 and record the review decisions
- time
- 2026-11-16 23:53 UTC · 1 week ago
- machine
- Junes-MacBook-Pro.local
- agent
- deepseek/deepseek-flash
- session
- review findings
- parent
- 54db83c066b0
↓ koh-2f32ce6c.tar.gzatlas at this save
files changed6 files
src/build/build_test.v+3 −2src/build/version.v+5 −5src/cli/cmd_init.v+7 −0src/cli/cmd_remote.v+5 −0src/cli/cmd_save.v+4 −0src/cli/cmd_status.v+2 −2src/build/build_test.v+3 −2
@@ -125,8 +125,9 @@125125 assert err.msg().contains('VERSION')126126 }127127 // `version.workspace = true` is Cargo delegating to the workspace, not a128- // version either.129- write(root, 'Cargo.toml', '[package]\nversion.workspace = true\n')128+ // version either, and a dependency's literal further down must not answer.129+ write(root, 'Cargo.toml',130+ '[package]\nversion.workspace = true\n\n[dependencies]\nserde = { version = "1.0.0" }\n')130131 if _ := project_version(root) {131132 assert false, 'a version delegated to the workspace must not be read'132133 } else {src/build/version.v+5 −5
@@ -69,8 +69,10 @@6969 }7070 7171 // line_version takes the value of the first line whose key starts it, in either72-// quote. A line that builds its value from a variable has no literal, so this73-// source yields nothing and the next one is tried.72+// quote, and gives up there. A line that builds its value from a variable has no73+// literal, so this source yields nothing and the next one is tried: in a74+// Cargo.toml with `version.workspace = true` under `[package]` the dependency75+// `version = "1.0"` further down is not this project's version.7476 fn line_version(path string, key string) ?string {7577 text := os.read_file(path) or { return none }7678 for line in text.split_into_lines() {@@ -81,9 +83,7 @@8183 if !trimmed.starts_with(key) {8284 continue8385 }84- if value := literal_after(trimmed, key.len) {85- return value86- }86+ return literal_after(trimmed, key.len)8787 }8888 return none8989 }src/cli/cmd_init.v+7 −0
@@ -12,6 +12,13 @@1212 flags: ['json']1313 }) or { return usage_error(err.msg()) }1414 root := os.getwd()15+ // A subfolder of a repo is already inside history: creating a second `.koh`16+ // there would nest one repo in another, and the outer repo would never see it.17+ if enclosing := storage.find_root(root) {18+ if enclosing != os.real_path(root) {19+ return refuse(args.json(), 'already inside the koh repo at ${enclosing} — run "koh init" outside it')20+ }21+ }1522 store := storage.create(root) or { return refuse(args.json(), err.msg()) }1623 store.close()1724 ignore_path := os.join_path(root, snapshot.ignore_file)src/cli/cmd_remote.v+5 −0
@@ -259,6 +259,11 @@259259 || reply.access_key_id == '' || reply.secret_access_key == '' {260260 return refuse(args.json(), 'Kepr returned incomplete settings — nothing was changed')261261 }262+ // The sign-in reply is not the user's choice: a plain-http endpoint would send every later263+ // request, and the credentials just handed out, over cleartext.264+ if !reply.endpoint.starts_with('https://') {265+ return refuse(args.json(), 'Kepr returned a non-https endpoint — nothing was changed')266+ }262267 settings := machine.RemoteSettings{263268 kind: machine.kind_s3264269 endpoint: reply.endpointsrc/cli/cmd_save.v+4 −0
@@ -15,6 +15,10 @@1515 values: ['agent', 'session']1616 flags: ['json']1717 }) or { return usage_error(err.msg()) }18+ if args.positional.len > 1 {19+ example := if is_checkpoint { 'before x' } else { 'fix the bug' }20+ return usage_error('${verb} takes one message — quote it: koh ${verb} "${example}"')21+ }1822 message := args.positional_at(0)1923 if message == '' {2024 example := if is_checkpoint {src/cli/cmd_status.v+2 −2
@@ -34,7 +34,7 @@3434 }3535 3636 if args.json() {37- line := history.line(store) or { return refuse(true, err.msg()) }37+ saves := history.save_count(store) or { return refuse(true, err.msg()) }3838 flags := events.latest_flags(store) or { return refuse(true, err.msg()) }3939 head_flag := flags[head.id] or { events.Flag{} }4040 emit_json(json2.encode(StatusJson{@@ -46,7 +46,7 @@4646 deleted: changes.removed4747 ignore_changed: changes.ignore_changed4848 restore_unfinished: unfinished49- saves: line.len49+ saves: int(saves)5050 size_bytes: os.file_size(os.join_path(store.root, storage.file_name))5151 head_flagged: head_flag.flagged5252 unsafe_paths: changes.unsafe_paths