Pin the close before the reopen in the archive sweep (closes #103) #445

Merged
clawbot merged 1 commits from issue-103-pin-sweep-close into next 2026-10-02 18:16:32 +02:00
1 Commits
Author SHA1 Message Date
sneak 90fc7cfa04 Pin the close before the reopen in the archive sweep (closes #103)
check / check (push) Waiting to run
Add a test that keeps the archive's connection from before a sweep
and checks that the sweep closed it. Without the close before the
reopen, the reopen replaced the handle without closing it and one
connection leaked per archive per sweep, yet every test passed.

The sweeper's listing query now takes the sweep's context; a sweep
cancelled by the app stopping returns from that query without an
error line. A comment on the sweeper's cancel function says why it
needs no lock.

The handlers' type-filtered count of a webhook's remaining targets
no longer exists: since each database target has its own archive
file, deleting a target evicts that target's writer alone.

Model: opus-5-5
2026-10-02 15:11:53 +00:00