From d928de2f75de02053ffb939ab0b1e978bef5cdfb Mon Sep 17 00:00:00 2001 From: OpenClaw OSS Factory Date: Fri, 12 Jun 2026 13:18:55 +1000 Subject: [PATCH 1/2] docs: add bug handoff demo --- demo/run-bug-handoff.sh | 33 +++++++++++++++++++++++++++++++ examples/bug-handoff/repro.txt | 14 +++++++++++++ examples/bug-handoff/terminal.txt | 8 ++++++++ 3 files changed, 55 insertions(+) create mode 100755 demo/run-bug-handoff.sh create mode 100644 examples/bug-handoff/repro.txt create mode 100644 examples/bug-handoff/terminal.txt diff --git a/demo/run-bug-handoff.sh b/demo/run-bug-handoff.sh new file mode 100755 index 0000000..c219c1a --- /dev/null +++ b/demo/run-bug-handoff.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash +set -euo pipefail + +repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +tmp="$(mktemp -d)" +trap 'rm -rf "$tmp"' EXIT + +cd "$tmp" + +node "$repo_root/dist/src/cli.js" init --storage .clipcase +node "$repo_root/dist/src/cli.js" new login-redirect --title "Login redirect loop" +node "$repo_root/dist/src/cli.js" add login-redirect \ + --source repro \ + --tag auth,repro \ + < "$repo_root/examples/bug-handoff/repro.txt" +node "$repo_root/dist/src/cli.js" add login-redirect \ + --source "npm test" \ + --tag failure \ + < "$repo_root/examples/bug-handoff/terminal.txt" + +node "$repo_root/dist/src/cli.js" search redirect | grep -q login-redirect +node "$repo_root/dist/src/cli.js" export login-redirect --out handoff.md +grep -q "Login redirect loop" handoff.md +grep -q "clears expired login cookie" handoff.md + +if printf 'token=abcdefghijklmnopqrstuvwxyz123456\n' | node "$repo_root/dist/src/cli.js" add login-redirect 2>"$tmp/secret.err"; then + echo "secret-like input was not blocked" >&2 + exit 1 +fi +grep -q "Refusing to save" "$tmp/secret.err" + +echo "Demo casefile: $tmp/handoff.md" + diff --git a/examples/bug-handoff/repro.txt b/examples/bug-handoff/repro.txt new file mode 100644 index 0000000..4773245 --- /dev/null +++ b/examples/bug-handoff/repro.txt @@ -0,0 +1,14 @@ +Steps to reproduce + +1. Open the checkout on a feature branch. +2. Run npm test. +3. Observe the failing assertion in the login redirect test. + +Observed: + +The redirect keeps the expired session cookie and loops back to /login. + +Expected: + +The redirect clears the expired cookie and lands on /dashboard. + diff --git a/examples/bug-handoff/terminal.txt b/examples/bug-handoff/terminal.txt new file mode 100644 index 0000000..ebd0066 --- /dev/null +++ b/examples/bug-handoff/terminal.txt @@ -0,0 +1,8 @@ +$ npm test + +not ok 3 - clears expired login cookie before redirect + --- + expected: "/dashboard" + actual: "/login" + ... + From c207740bdb30e2d6b9ace91ad273ee1d563c2ae3 Mon Sep 17 00:00:00 2001 From: OpenClaw OSS Factory Date: Fri, 12 Jun 2026 13:18:55 +1000 Subject: [PATCH 2/2] docs: add clipcase promo hooks --- README.md | 14 ++++++++++++++ docs/promo/social-hooks.md | 28 ++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 docs/promo/social-hooks.md diff --git a/README.md b/README.md index a4f8322..257b25b 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,20 @@ npm test 2>&1 | clipcase add failing-test --source "npm test" --tag failure clipcase export failing-test --out handoff.md ``` +For a reproducible fixture-backed handoff, run: + +```sh +npm run build +bash demo/run-bug-handoff.sh +``` + +The demo captures repro notes and terminal output from +`examples/bug-handoff`, exports a Markdown handoff, and verifies that +secret-like input is blocked by default. + +Promotion drafts for this workflow live in +[docs/promo/social-hooks.md](docs/promo/social-hooks.md). + ## Verify ```sh diff --git a/docs/promo/social-hooks.md b/docs/promo/social-hooks.md new file mode 100644 index 0000000..6e09143 --- /dev/null +++ b/docs/promo/social-hooks.md @@ -0,0 +1,28 @@ +# ClipCase Social Hooks + +Draft posts grounded in ClipCase's current local CLI behavior: transparent +`.clipcase` storage, deterministic Markdown export, offline search, and +conservative secret blocking. + +## Short posts + +1. ClipCase turns scattered repro notes, terminal output, and copied context into + a git-friendly Markdown casefile without syncing anything. +2. Pipe a failed command into `clipcase add`, tag it, then export a single + handoff Markdown file for the next reviewer or agent. +3. The default safety model is local-first: no watcher, no hosted service, and + likely secrets are blocked unless you explicitly allow them. + +## Demo angle + +Run the bug-handoff demo: + +```sh +npm run build +bash demo/run-bug-handoff.sh +``` + +The script creates a temporary case, captures repro and terminal fixtures, +exports `handoff.md`, verifies key text, and confirms secret-like input is +blocked. +