GeezerVison is showing github.com — cold-store-reaper: D1 manifest schema still lacks the v1.2 'evicted' CHECK — first evict --apply will break nightly sync-manifest (follow-up left by PRs #965/#971) · Issue #984 · developing-today/code
cold-store-reaper: D1 manifest schema still lacks the v1.2 'evicted' CHECK — first evict --apply will break nightly sync-manifest (follow-up left by PRs #965/#971) #984DescriptionFinding
The cold-store-reaper's local manifest schema and the hosted D1 copy of it have drifted, and the drift is documented in the repo but tracked nowhere:
- PR feat(cold-store-reaper): v4 — R2 S3 client, backup-supabase, eviction #971 (merged 2026-10-26,
feat(cold-store-reaper): v4 — R2 S3 client, backup-supabase, eviction) added the objects.state = 'evicted' value as schema v1.2. Local manifests are migrated in place (ColdStore._migrate_objects_evicted), but the D1 copy is not.
pkgs/cold-store-reaper/schema.sql lines 3–5 (current main d715adf9): "v1.2 (reaper v4): objects.state gains 'evicted' … The D1 copy of this schema needs the same one-line CHECK change before evicted rows can sync; sync-manifest fails on the objects statement…"
pkgs/cold-store-reaper/README.md lines 256–261 says the same: until the D1 CHECK change is applied, "sync-manifest fails on the objects statement with D1's own error text (the same caveat the v1.1 'trash' direction had)".
- The same pattern already happened once: PR cold-store-reaper v3: backup retention (prune-backups), get-backup, backup-d1, nightly + drill scripts #965 (v3, schema v1.1) added the
'trash' ledger direction with the identical caveat for prune rows.
Consequence: the first time anyone runs cold-store evict --apply (the eviction trial PR #971 prepares), the local manifest gains 'evicted' rows and every subsequent sync-manifest — including the nightly run in scripts/nightly-backup.sh, step 4, which runs under set -e — fails on the objects statement until someone applies the D1 change by hand. Nothing files or tracks that prerequisite; it exists only as a README/schema comment.
Why it matters
Eviction is presented as ready (evict --apply ships in v4, the nightly files the source backups it will evict), but its prerequisite D1 migration is an undocumented-in-GitHub manual step. The failure mode is also badly timed: it surfaces in the nightly after objects have already been deleted from R2, breaking manifest sync at exactly the moment the hosted manifest matters most.
Acceptance criteria
- The D1
cold-store-manifest database's objects table CHECK constraint accepts 'evicted' (and transfer_ledger.direction is confirmed to accept 'trash' from v1.1, if that was never actually applied either).
- Verified end-to-end: a manifest containing at least one
'evicted' object row (and one 'trash' ledger row) completes sync-manifest against D1 without the CHECK error.
- The caveat text in
schema.sql and README.md is updated to record that the D1 change is applied (with a date), or replaced by a repeatable migration step in the repo so the next schema extension (v1.3+) cannot drift the same way.
- No
evict --apply run is treated as complete before the sync verification above passes.
Found by the pr-diff-review job reviewing PRs #965 and #971 against current main. Activitydeveloping-today commented on Oct 26, 2026 dezren39 commented on Oct 26, 2026 🤖 Agent note · state: filed
- Agent: pr-diff-review job
- Session / ID: pr-diff-review cron run 2026-10-26 10:24 CDT
- Found via: filed this run
- Task: Filed from the review of PRs cold-store-reaper v3: backup retention (prune-backups), get-backup, backup-d1, nightly + drill scripts #965/feat(cold-store-reaper): v4 — R2 S3 client, backup-supabase, eviction #971 — the D1 manifest copy still lacks the v1.2 'evicted' CHECK change documented in schema.sql/README, so the first evict --apply will break nightly sync-manifest; a triage packet has been enqueued.
- Expectation: effort class s; done when D1 accepts 'evicted' rows, sync-manifest is verified against a manifest containing one, and the caveat text is updated.
- Links: source PRs feat(cold-store-reaper): v4 — R2 S3 client, backup-supabase, eviction #971 and cold-store-reaper v3: backup retention (prune-backups), get-backup, backup-d1, nightly + drill scripts #965
dezren39 commented on Oct 26, 2026 dezren39 commented on Oct 26, 2026
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|