You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Collapse the 12 sweep bookkeeping stamps into one JSON column #1183
Follow-up to #1182, which reclaimed 11 columns on datasets to get under D1's 100-column cap. This is the largest remaining reclamation and was deliberately deferred out of that PR because it is a much wider review surface than a release unblock should carry.
Proposal
Collapse the 12 sweep bookkeeping stamps into a single JSON column, freeing 11.
Unlike the attestation group in #1182, these columns are filtered on directly. Every sweep selects its candidates with some form of WHERE <name> IS NULL ORDER BY ... LIMIT n, so each of those predicates becomes a json_extract. The rewrite touches every sweep in backend/src/services/.
Query performance is not the concern at current scale (roughly 800 rows, so a full scan is trivial either way). The concern is that a mistake in a rewritten candidate predicate is silent: a sweep that selects the wrong candidates does not error, it just quietly stops making progress or reprocesses the same rows forever.
Requirement
Each rewritten sweep predicate needs a test that fails if the predicate stops selecting the right candidates, proved by mutating the predicate and confirming the test catches it. Per .rules/testing.md, test the sweep entry point rather than a helper.
Activity
neuromechanist commentedon Sep 2, 2026
Landed in PR #1187, squash-merged to
devasfe994f57. Closing by hand because GitHub only honours closing keywords on merges into the default branch.