feat(engine): harden mailbox CLIs for v0.2.0
- Atomic delivery: create the temp file inside the destination dir (dot-prefixed, invisible to the inbox glob) so the final rename never crosses filesystems and readers never see a half-written message. - Reject . and .. explicitly in the --reply-to and coord-done name guards instead of relying on downstream failure. - Add -h/--help to coord-inbox.sh (uniform across the three CLIs). - Close selftest gaps: default mailbox path via HOME fallback, malformed frontmatter on the read path, read-only destination dir. 48 -> 64 checks, all green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018fduZz8otpU3W3rhfoPD6t
This commit is contained in:
parent
0e6014fe98
commit
0a79e786fc
9 changed files with 80 additions and 26 deletions
|
|
@ -23,6 +23,7 @@ while [ $# -gt 0 ]; do
|
|||
# bash 3.2: `shift 2` past the end of $# is a no-op -> would loop forever.
|
||||
--repo) [ $# -ge 2 ] || { echo "coord-inbox: --repo requires a value" >&2; exit 2; }
|
||||
REPO="$2"; shift 2 ;;
|
||||
-h|--help) grep '^#' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;;
|
||||
*) shift ;;
|
||||
esac
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue