Skip to content

Commit 0c0a750

Browse files
committed
refactor: Reclassify commands as triggers vs annotations
1 parent d20d545 commit 0c0a750

8 files changed

Lines changed: 600 additions & 443 deletions

File tree

docs/bark-manual.org

Lines changed: 89 additions & 63 deletions
Large diffs are not rendered by default.

resources/emails.edn

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,7 @@
10781078
:email/body-text "Acked-by: reviewer@test.org\n"}
10791079

10801080
;; =========================================================================
1081-
;; 83 -- Maintainer uses Owned-by and Urgent-by directives on bug 81
1081+
;; 83 -- Maintainer uses Owned-by line on bug 81
10821082
;; =========================================================================
10831083
{
10841084
:email/id "83"
@@ -1090,7 +1090,7 @@
10901090
:email/ingested-at #inst "2026-01-26T12:00:00"
10911091
:email/in-reply-to "<81@test.org>"
10921092
:email/references "<81@test.org>"
1093-
:email/body-text "Owned-by: fixer@test.org\nUrgent-by: fixer@test.org\n"}
1093+
:email/body-text "Owned-by: fixer@test.org\n"}
10941094

10951095
;; =========================================================================
10961096
;; 84 -- Regular user tries Closed-by directive (should be denied)
@@ -1151,7 +1151,7 @@
11511151
:email/body-text "Acked-by: someone@test.org\nNot acked\n"}
11521152

11531153
;; =========================================================================
1154-
;; 88 -- [BUG] base report for Closed-by + Important-by test
1154+
;; 88 -- [BUG] base report for Closed-by test
11551155
;; =========================================================================
11561156
{
11571157
:email/id "88"
@@ -1164,7 +1164,7 @@
11641164
:email/body-text "Yet another bug.\n"}
11651165

11661166
;; =========================================================================
1167-
;; 89 -- Admin uses Closed-by and Important-by on bug 88
1167+
;; 89 -- Admin uses Closed-by on bug 88
11681168
;; =========================================================================
11691169
{
11701170
:email/id "89"
@@ -1176,7 +1176,7 @@
11761176
:email/ingested-at #inst "2026-01-28T11:00:00"
11771177
:email/in-reply-to "<88@test.org>"
11781178
:email/references "<88@test.org>"
1179-
:email/body-text "Closed-by: closer@test.org\nImportant-by: closer@test.org\n"}
1179+
:email/body-text "Closed-by: closer@test.org\n"}
11801180

11811181
;; =================================================================
11821182
;; 90-95: Mixed triggers + directives in single emails
@@ -1229,7 +1229,7 @@
12291229
:email/source "direct"
12301230
:email/body-text "Another bug here.\n"}
12311231

1232-
;; 94 -- Maintainer reply with Deadline + Urgent-by + trigger (Confirmed.)
1232+
;; 94 -- Maintainer reply with Deadline + bareword (Confirmed.)
12331233
{:email/id "94"
12341234
:email/message-id "<94@test.org>"
12351235
:email/subject "Re: [BUG] Deadline with directives test"
@@ -1239,7 +1239,7 @@
12391239
:email/ingested-at #inst "2026-01-30T11:00:00"
12401240
:email/in-reply-to "<93@test.org>"
12411241
:email/references "<93@test.org>"
1242-
:email/body-text "Confirmed.\nDeadline: 2026-06-01\nUrgent-by: user@test.org\n"}
1242+
:email/body-text "Confirmed.\nDeadline: 2026-06-01\n"}
12431243

12441244
;; 95 -- Maintainer reply with trigger (Confirmed.) + Topic directive
12451245
{:email/id "95"
@@ -1436,7 +1436,7 @@
14361436
:email/ingested-at #inst "2026-02-21T12:00:00"
14371437
:email/in-reply-to "<108@test.org>"
14381438
:email/references "<108@test.org>"
1439-
:email/body-text "Actually this is a different issue.\nNot superseded\n"}
1439+
:email/body-text "Actually this is a different issue.\nNot superseded-by: <106@test.org>\n"}
14401440

14411441
;; =========================================================================
14421442
;; 111 -- Neutral user reply on 108 (no command). Kept to preserve
@@ -1742,7 +1742,7 @@
17421742
:email/body-text "After investigation the real issue is broader.\nSupersedes: <130@test.org>\n"}
17431743

17441744
;; =========================================================================
1745-
;; 132-134 -- Supersedes then Not superseding undoes.
1745+
;; 132-134 -- Supersedes then Not supersedes undoes.
17461746
;; 133 supersedes 132 (closes it). 134 in reply to 133 retracts.
17471747
;; =========================================================================
17481748
{:email/id "132"
@@ -1772,7 +1772,7 @@
17721772
:email/ingested-at #inst "2026-03-07T11:00:00"
17731773
:email/in-reply-to "<133@test.org>"
17741774
:email/references "<133@test.org>"
1775-
:email/body-text "On reflection these are distinct.\nNot superseding\n"}
1775+
:email/body-text "On reflection these are distinct.\nNot supersedes: <132@test.org>\n"}
17761776

17771777
;; =========================================================================
17781778
;; 135-137 -- Cycle flip (last-write-wins).

scripts/validate-config.clj

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,17 @@
177177
;; Command IDs (for extended :commands format)
178178
(def valid-command-ids
179179
#{:acked :owned :closed :urgent :important
180-
:acked-by :owned-by :closed-by :urgent-by :important-by
180+
:acked-by :owned-by :closed-by
181181
:unacked :unowned :unclosed :unurgent :unimportant
182182
:deadline :undeadline :expiry :unexpiry
183-
:topic :untopic :superseded-by :unsuperseded})
183+
:topic :untopic
184+
:superseded-by :unsuperseded-by
185+
:supersedes :unsupersedes
186+
:duplicate-of :unduplicate-of
187+
:related-to :unrelated-to})
184188

185189
;; The :setter-or-maintainer scope is only valid on the unset-style
186-
;; directives whose target attribute is tracked by a ref to the
190+
;; commands whose target attribute is tracked by a ref to the
187191
;; pose-email. The authoritative set is derived from the shared
188192
;; `bark.commands.registry`.
189193
(def valid-plain-scopes #{:user :maintainer})

0 commit comments

Comments
 (0)