fix CLI exit and agents storage docs (#113, #114)

3013e51gl0w

all commits

Message

fix CLI exit and agents storage docs (#113, #114)

Diff

src/agents.rs+1 −1
diff --git a/src/agents.rs b/src/agents.rsindex 11a1a72..aecb428 100644--- a/src/agents.rs+++ b/src/agents.rs@@ -61,7 +61,7 @@ fn agents_markdown(6161          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\6262          ### License (required — check the box only if you agree)\n\n\6363          > {license}\n\n\64-         Stored per submission: license version + checkbox state + body hash + timestamp. No submission without the box checked.\n\n\64+         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\6565          ## Philosophy\n\n\6666          - Issues = detailed actionable text from your user. Write what a maintainer can act on: context, steps, expected vs actual, links to `/raw/` paths.\n\6767          - 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\
src/main.rs+1 −1
diff --git a/src/main.rs b/src/main.rsindex 9deb176..a9d0573 100644--- a/src/main.rs+++ b/src/main.rs@@ -493,7 +493,7 @@ fn real_main() -> i32 {493493         other => {494494             eprintln!("hu13: unknown subcommand '{other}'");495495             print_top_help();496-            0496+            2497497         }498498     }499499 }
tests/build_cli.rs+11 −0
diff --git a/tests/build_cli.rs b/tests/build_cli.rsindex 5fdc205..494d529 100644--- a/tests/build_cli.rs+++ b/tests/build_cli.rs@@ -17,6 +17,17 @@ fn git(repo: &Path, args: &[&str]) {1717     assert!(st.success(), "git {args:?} failed");1818 }1919 20+#[test]21+fn unknown_subcommand_exits_two() {22+    let out = Command::new(env!("CARGO_BIN_EXE_hu13"))23+        .arg("nope")24+        .output()25+        .expect("spawn hu13");26+    assert_eq!(out.status.code(), Some(2), "unknown subcommand is an error");27+    let stderr = String::from_utf8_lossy(&out.stderr);28+    assert!(stderr.contains("unknown subcommand 'nope'"), "{stderr}");29+}30+2031 #[test]2132 fn build_no_forge_repo_exits_zero() {2233     let dir = std::env::temp_dir().join(format!(