aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/superpowers/plans/2026-08-02-qtmaildir-v1.md18
-rw-r--r--docs/superpowers/specs/2026-08-02-qtmaildir-design.md10
2 files changed, 22 insertions, 6 deletions
diff --git a/docs/superpowers/plans/2026-08-02-qtmaildir-v1.md b/docs/superpowers/plans/2026-08-02-qtmaildir-v1.md
index b2c3307..1e14105 100644
--- a/docs/superpowers/plans/2026-08-02-qtmaildir-v1.md
+++ b/docs/superpowers/plans/2026-08-02-qtmaildir-v1.md
@@ -2350,9 +2350,21 @@ git commit -S -m "feat: add cross-thread value types and notmuch RAII wrappers"
- Create: `src/notmuchworker.h`, `src/notmuchworker.cpp`
- Modify: `src/CMakeLists.txt`
-Per the spec, `NotmuchWorker` has no unit test: testing it requires a real
-notmuch database. It is verified manually in Task 13. Keep it thin so there is
-little untested logic.
+**Changed 2026-08-02, superseding the spec's "no unit test" position.**
+`NotmuchWorker` IS unit-tested, against a throwaway notmuch database built in
+a temporary directory. The spec deferred this to manual verification on the
+grounds that testing needs a real database; the answer is to build a fake one
+rather than to skip the tests. This matters more than for any other class,
+because `applyTags` is the only code in the project that WRITES to a notmuch
+index, and a bug there corrupts real mail state.
+
+The fixture creates a Maildir tree with a handful of messages, runs
+`notmuch new` against a generated config pointing at it, and sets
+`NOTMUCH_CONFIG` for the test process. Nothing touches the developer's own
+`~/Mail` or `~/.notmuch-config`.
+
+Task 13's manual checklist remains, but as confirmation against real data
+rather than as the only coverage.
- [ ] **Step 1: Write src/notmuchworker.h**
diff --git a/docs/superpowers/specs/2026-08-02-qtmaildir-design.md b/docs/superpowers/specs/2026-08-02-qtmaildir-design.md
index e153203..3089341 100644
--- a/docs/superpowers/specs/2026-08-02-qtmaildir-design.md
+++ b/docs/superpowers/specs/2026-08-02-qtmaildir-design.md
@@ -429,9 +429,13 @@ Qt Test, three targets, all runnable without a real mailbox.
## 14. Known gaps
-- `NotmuchWorker` is not unit-tested. Testing it requires a real notmuch
- database; v1 tests pure logic and leaves the database layer to manual
- verification.
+- ~~`NotmuchWorker` is not unit-tested.~~ **Resolved 2026-08-02.** It is
+ tested against a throwaway notmuch database built in a temporary directory
+ by the test fixture (`notmuch new` over a generated Maildir, with
+ `NOTMUCH_CONFIG` pointed at it). The original reasoning — that testing
+ requires a real database — was answered by building a fake one instead of
+ skipping the tests. This is the only code that writes to a notmuch index,
+ so it warranted the effort.
- Large-message MIME parsing happens on the UI thread and could stutter on
pathological messages. Opening a thread parses every message in it, so this
is more likely to show on a long thread than on a single message. Deferred