--- /dev/null
+Return-Path: <aclements@csail.mit.edu>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id B39476DE0188\r
+ for <notmuch@notmuchmail.org>; Tue, 19 Apr 2016 21:03:56 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -1.259\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-1.259 tagged_above=-999 required=5 tests=[AWL=1.052,\r
+ RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01]\r
+ autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id 8O28GugfpjdO for <notmuch@notmuchmail.org>;\r
+ Tue, 19 Apr 2016 21:03:48 -0700 (PDT)\r
+X-Greylist: delayed 1614 seconds by postgrey-1.35 at arlo;\r
+ Tue, 19 Apr 2016 21:03:48 PDT\r
+Received: from outgoing.csail.mit.edu (outgoing.csail.mit.edu [128.30.2.149])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 043DD6DE00D3\r
+ for <notmuch@notmuchmail.org>; Tue, 19 Apr 2016 21:03:47 -0700 (PDT)\r
+Received: from awakening.a20.io ([104.131.20.129] helo=awakening)\r
+ by outgoing.csail.mit.edu with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16)\r
+ (Exim 4.72) (envelope-from <aclements@csail.mit.edu>)\r
+ id 1asiwb-0004cv-IA; Tue, 19 Apr 2016 23:36:49 -0400\r
+Received: from amthrax by awakening with local (Exim 4.86)\r
+ (envelope-from <aclements@csail.mit.edu>)\r
+ id 1asiwa-0004PY-Hk; Tue, 19 Apr 2016 23:36:48 -0400\r
+From: Austin Clements <aclements@csail.mit.edu>\r
+To: Daniel Kahn Gillmor <dkg@fifthhorseman.net>,\r
+ David Bremner <david@tethera.net>, Notmuch Mail <notmuch@notmuchmail.org>\r
+Subject: Re: [PATCH v4 7/7] complete\r
+ ghost-on-removal-when-shared-thread-exists\r
+In-Reply-To: <87zit0t0mj.fsf@alice.fifthhorseman.net>\r
+References: <1459445693-3900-1-git-send-email-dkg@fifthhorseman.net>\r
+ <1460166892-29721-1-git-send-email-dkg@fifthhorseman.net>\r
+ <1460166892-29721-7-git-send-email-dkg@fifthhorseman.net>\r
+ <87r3ed6l35.fsf@zancas.localnet> <87zit0t0mj.fsf@alice.fifthhorseman.net>\r
+User-Agent: Notmuch/0.21+62~g7edba1d (http://notmuchmail.org) Emacs/24.5.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Tue, 19 Apr 2016 23:36:48 -0400\r
+Message-ID: <87zispne7j.fsf@csail.mit.edu>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 20 Apr 2016 04:03:56 -0000\r
+\r
+On Mon, 11 Apr 2016, Daniel Kahn Gillmor <dkg@fifthhorseman.net> wrote:\r
+> On Sun 2016-04-10 20:33:02 -0400, David Bremner <david@tethera.net> wrote:\r
+>> Daniel Kahn Gillmor <dkg@fifthhorseman.net> writes:\r
+>>\r
+>>> To fully complete the ghost-on-removal-when-shared-thread-exists\r
+>>> proposal, we need to clear all ghost messages when the last active\r
+>>> message is removed from a thread.\r
+>>\r
+>> For me this patch breaks T530 as follows\r
+>>\r
+>> T530-upgrade: Testing database upgrade\r
+>> FAIL ghost message retains thread ID\r
+>> --- T530-upgrade.13.expected 2016-04-11 00:25:19.482196274 +0000\r
+>> +++ T530-upgrade.13.output 2016-04-11 00:25:19.482196274 +0000\r
+>> @@ -1 +1 @@\r
+>> -thread:000000000000001d\r
+>> +thread:0000000000000011\r
+>> No new mail.\r
+>> No new mail. Removed 1 message.\r
+>>\r
+>> I pushed my rebased version of the patches to\r
+>>\r
+>> https://git.notmuchmail.org/git?p=notmuch;a=shortlog;h=refs/heads/thread-fix\r
+>>\r
+>> in case the problem is some mistake on my part.\r
+>\r
+> After having done "make download-test-databases", I can confirm that\r
+> this is happening for me as well: it's not an issue with bremner's\r
+> config.\r
+>\r
+> however, i think this particular test is wrong, and should probably be\r
+> removed.\r
+>\r
+> For review, here's the final test:\r
+>\r
+> ----------\r
+> # Ghost messages are difficult to test since they're nearly invisible.\r
+> # However, if the upgrade works correctly, the ghost message should\r
+> # retain the right thread ID even if all of the original messages in\r
+> # the thread are deleted. That's what we test. This won't detect if\r
+> # the upgrade just plain didn't happen, but it should detect if\r
+> # something went wrong.\r
+> test_begin_subtest "ghost message retains thread ID"\r
+> # Upgrade database\r
+> notmuch new\r
+> # Get thread ID of real message\r
+> thread=$(notmuch search --output=threads id:4EFC743A.3060609@april.org)\r
+> # Delete all real messages in that thread\r
+> rm $(notmuch search --output=files $thread)\r
+> notmuch new\r
+> # "Deliver" ghost message\r
+> add_message '[subject]=Ghost' '[id]=4EFC3931.6030007@april.org'\r
+> # If the ghost upgrade worked, the new message should be attached to\r
+> # the existing thread ID.\r
+> nthread=$(notmuch search --output=threads id:4EFC3931.6030007@april.org)\r
+> test_expect_equal "$thread" "$nthread"\r
+> -------------\r
+>\r
+> I don't think this reasoning is sensible. If the entire thread is\r
+> deleted, and a new message comes in, it should *not* get the same mesage\r
+> ID. ghosts should only exist in the database when other messages point\r
+> to them.\r
+>\r
+> So i'd be fine with killing this entire last test, unless someone can\r
+> propose a good reason to keep it.\r
+\r
+I agree that it's fine to remove this test. From what I recall, it\r
+wasn't intended to test that ghost messages retained their thread IDs;\r
+this was just the implementation property it exploited to test that\r
+ghosts were working.\r
+\r
+I haven't looked through this series, but it would be nice if there was\r
+still some tests that ghosts were working across upgrade.\r