summaryrefslogtreecommitdiffstats
path: root/docs/superpowers/specs
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-08-02 17:53:29 +0200
committerDanilo M. <danix@danix.xyz>2026-08-04 12:52:35 +0200
commit7a0e093e467ea39fe4e662f9cd6d135b0f036876 (patch)
treeab9bee9256d53b89ff0ad7c57d66e4d2b82417fa /docs/superpowers/specs
parent9002b3bf4310f6a657d27a1f16f002c2d256e79d (diff)
downloadqtmaildir-7a0e093e467ea39fe4e662f9cd6d135b0f036876.tar.gz
qtmaildir-7a0e093e467ea39fe4e662f9cd6d135b0f036876.zip
docs: unit-test NotmuchWorker against a throwaway database
The spec deferred NotmuchWorker to manual verification on the grounds that testing it needs a real notmuch database. Building a fake one in a temporary directory answers that objection, so Task 8 now gets real coverage. This is the only code in the project that writes to a notmuch index, so a bug there corrupts real mail state. It was the wrong place to have the weakest verification. Task 13's manual checklist stays, as confirmation against real data rather than as the only coverage. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'docs/superpowers/specs')
-rw-r--r--docs/superpowers/specs/2026-08-02-qtmaildir-design.md10
1 files changed, 7 insertions, 3 deletions
diff --git a/docs/superpowers/specs/2026-08-02-qtmaildir-design.md b/docs/superpowers/specs/2026-08-02-qtmaildir-design.md
index 0f49b61..37a0078 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