1 From 3013e5186106a1eada5dfafce787d78bb9e63934 Mon Sep 17 00:00:00 20012 From: hu13-test <[email protected]>3 Date: Tue, 27 Oct 2026 19:51:40 +00004 Subject: [PATCH] fix CLI exit and agents storage docs (#113, #114)5 6 ---7 src/agents.rs | 2 +-8 src/main.rs | 2 +-9 tests/build_cli.rs | 11 +++++++++++10 3 files changed, 13 insertions(+), 2 deletions(-)11 12 diff --git a/src/agents.rs b/src/agents.rs13 index 11a1a72..aecb428 10064414 --- a/src/agents.rs15 +++ b/src/agents.rs16 @@ -61,7 +61,7 @@ fn agents_markdown(17 On success the server shows a `received` page with a one-time ack uuid (shown once, not in a URL, no lookup endpoint) and reflects nothing back (kills reflected XSS). No GET, no listing, no read-back. Inbox never appears in the site; accepted text shows up later as a real issue/PR.\n\n\18 ### License (required — check the box only if you agree)\n\n\19 > {license}\n\n\20 - Stored per submission: license version + checkbox state + body hash + timestamp. No submission without the box checked.\n\n\21 + Stored per submission: type, title, body, optional handle/contact, license version, `received_at`, and a salted source-IP hash. The checkbox is validated before storing; no submission is accepted without it.\n\n\22 ## Philosophy\n\n\23 - Issues = detailed actionable text from your user. Write what a maintainer can act on: context, steps, expected vs actual, links to `/raw/` paths.\n\24 - PRs = ONE prompt not code. Send a single plain-text prompt describing the change; never send files, diffs, branches, or bundles. Code words inside stay text — never applied, never executed.\n\25 diff --git a/src/main.rs b/src/main.rs26 index 9deb176..a9d0573 10064427 --- a/src/main.rs28 +++ b/src/main.rs29 @@ -493,7 +493,7 @@ fn real_main() -> i32 {30 other => {31 eprintln!("hu13: unknown subcommand '{other}'");32 print_top_help();33 - 034 + 235 }36 }37 }38 diff --git a/tests/build_cli.rs b/tests/build_cli.rs39 index 5fdc205..494d529 10064440 --- a/tests/build_cli.rs41 +++ b/tests/build_cli.rs42 @@ -17,6 +17,17 @@ fn git(repo: &Path, args: &[&str]) {43 assert!(st.success(), "git {args:?} failed");44 }45 46 +#[test]47 +fn unknown_subcommand_exits_two() {48 + let out = Command::new(env!("CARGO_BIN_EXE_hu13"))49 + .arg("nope")50 + .output()51 + .expect("spawn hu13");52 + assert_eq!(out.status.code(), Some(2), "unknown subcommand is an error");53 + let stderr = String::from_utf8_lossy(&out.stderr);54 + assert!(stderr.contains("unknown subcommand 'nope'"), "{stderr}");55 +}56 +57 #[test]58 fn build_no_forge_repo_exits_zero() {59 let dir = std::env::temp_dir().join(format!(60 -- 61 2.56.062