-- What the artifact store no longer keeps (novox/hq ADR 0189, issue 108). -- -- The mesh removes from its store only what it put there and can account for: every digest it -- could remove is already in a build record, so the sweep reads its own records rather than -- enumerating the store. What it does not get from those records is whether it has already -- removed something -- `build.made` says what that build published, for ever, which is history -- and not an index of what is on disk. -- -- Without this the sweep would reissue a delete for every artifact it has ever collected, every -- time it runs, and each one would answer 404 -- a number of requests that grows with the mesh's -- whole history and never shrinks. -- -- Keyed by the reference as the mesh records it (`artifact-store:///@sha256:…`), -- because that is the identity the record uses everywhere else. Not a foreign key to build: two -- builds can publish the same digest (the same source built twice produces the same bytes), and -- what is collected is the artifact, not the attempt that made it. create table artifact_collected ( reference text primary key, -- When the store answered. Kept so a reader of an old build record can tell "this artifact is -- gone" from "this artifact was never there", which are different kinds of surprise. at timestamptz not null default now() );