interplane.Get Omega
Read in your language

mailhand

mailhand: agents look after a person's email in seeded Omega. Maildir + MIME parsing, JSONL CLI and MCP, rule triage, policy-gated sending, hash-chained audit. Free (Apache-2.0).

Brought by drakestapleton

branch main Branches Tags History

mailhand / tests / mutants.txt

52 lines · 3833 bytes Raw Blame History
1# ID|FILE|OLD LINE|NEW LINE; exact whole-line replacement, at least one match required.
2# Optional fifth field K/T: replace only occurrence K; refused unless OLD occurs exactly T times in FILE.
3m-protected|src/ops.om|if or s_eqci s off n ksent s_eqci s off n kdrafts|if false
4m-auditverify|src/audit.om|k = au_check1 p e seq|k = ulong 0
5m-uniquepath|src/maildir.om|if not s_safe s add add off sl 1 sub sub n sl 1|if false
6m-dotfolder|src/core.om|if eq s_get s o 46|if false
7m-nowarning|src/core.om|o_k kwarnk|note mutant: warning key removed
8m-b64-onesextet|src/mime.om|if eq q 1|if eq q 9
9m-mime-noclose|src/mime.om|if ne get gv MI_TOP 0|if false
10m-latin1-asutf8|src/mime.om|if eq cs 3|if eq cs 99
11m-ew-keepspace|src/mime.om|if prev|if false
12m-send-policy|src/send.om|if sd_approved|if true
13m-send-draftchanged|src/send.om|if not s_eqss S_SEND 0 64 S_SEND get gv SD_SHA 64|if false
14m-mcp-iserr|src/mcp.om|o_kb mc_k_iserr ne x 0|o_kb mc_k_iserr eq x 0
15# deliver recheck: only the 3rd of 5 "rc = sd_gate" lines (sd_deliver_one) is forced to pass
16m-deliver-recheck|src/send.om|rc = sd_gate|rc = int 0|3/5
17# rob proof: the 2nd of 2 bad_header refusal sites in mi_header (a header line with no colon or an empty
18# name) becomes a division-by-zero trap (exit 102). No hand-picked case reaches it; 50-robust must.
19m-rob-trap|src/mime.om|put gv MI_ERR 1|put gv MI_ERR div 4 sub get gv MI_ERR get gv MI_ERR|2/2
20m-threadfilter|src/maildir.om|if not lst_threadok|if false
21# ---- remote accounts (TlsMail): credentials, STARTTLS, IMAP sync ----
22# a credentials file readable by group or others must be refused (55-creds mode_0644)
23m-cred-mode|src/cr.om|if ne and mode 63 0|if false
24# a credentials file owned by someone else must be refused (55-creds owner)
25m-cred-owner|src/cr.om|if ne long uid eu|if false
26# submission without the STARTTLS capability must abort (70-smtp-tls no_starttls)
27m-starttls-cap|src/ss.om|if eq and get ss_v 0 1 0|if false
28# bytes already received when STARTTLS is answered must be refused (70-smtp-tls starttls_injection)
29m-starttls-inject|src/tx.om|if ne get tx_v 2 get tx_v 3|if false
30# a changed UIDVALIDITY must be refused without --resync (60-imap uidvalidity_changed)
31m-uidvalidity|src/imsync.om|if ne get im_v 36 1|if false
32# a pending record must adopt a fetched message with the same bytes (60-imap resync, pending_adopt)
33m-adopt|src/imsync.om|if s_eqt S_IPD p 64 h|if false
34# a local flag change must be pushed (60-imap push_back)
35m-flagpush|src/imsync.om|if eq lm rm|if true
36# a BODY[] literal must be streamed into tmp/ and delivered (60-imap first_sync)
37m-bodystream|src/im.om|ret s_eqci S_IRS sub b 7 7 im_kbody|ret false
38# a secret a quoted string cannot carry must go as a literal (60-imap pending_adopt LOGIN)
39m-loginliteral|src/imsync.om|if or lt c 32 gt c 126|if false
40# ---- real TLS (omtls): mailhand's side of the certificate check ----
41# mailhand has no certificate code of its own: the chain, name and date checks are omtls's, run inside
42# ot_tl_connect / ot_tl_start. What mailhand must do is load the trust store and stop when the
43# handshake fails; these mutants remove that.
44# a trust store that cannot be loaded must stop the sync / the submission (60-imap and 70-smtp-tls roots_missing)
45m-roots-imap|src/imsync.om|if lt cr_roots sec 0|if false
46m-roots-smtp|src/ss.om|if lt cr_roots sec 0|if false
47# a failed implicit-TLS handshake must stop the session (60-imap/70-smtp-tls refused handshakes)
48m-tls-connect|src/tx.om|if ne r 0|if false|1/1
49# No mutant for ignoring a failed STARTTLS handshake (tx_starttls "if ne k 0"): it survives because it is
50# equivalent: after a failed ot_tl_start omtls refuses every ot_tl_write, so the next EHLO fails with the
51# same TLS reason and nothing is sent (checked 2026-11-11: MUTANT SURVIVED m-tls-start, 70-smtp-tls still
52# saw no AUTH and no MAIL).