Title: 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 · GitHub
Open Graph Title: 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
X Title: 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
Description: Finding 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 #971 (merged 2026-10-26, feat(cold-store-reaper): v4 — R2 S3 client, backup-...
Open Graph Description: Finding 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 #971 (merged 2026-10-26, feat(cold-s...
X Description: Finding 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 #971 (merged 2026-10-26, feat(co...
Opengraph URL: https://github.com/developing-today/code/issues/984
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"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)","articleBody":"## Finding\n\nThe 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:\n\n- PR #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.\n- `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…\"\n- `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)\".\n- The same pattern already happened once: PR #965 (v3, schema v1.1) added the `'trash'` ledger direction with the identical caveat for prune rows.\n\nConsequence: 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.\n\n## Why it matters\n\nEviction 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.\n\n## Acceptance criteria\n\n- [ ] 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).\n- [ ] 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.\n- [ ] 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.\n- [ ] No `evict --apply` run is treated as complete before the sync verification above passes.\n\nFound by the pr-diff-review job reviewing PRs #965 and #971 against current main.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-26T15:32:47Z","url":"https://github.com/developing-today/code/issues/984"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3a6a942c-57e2-a91f-6284-f187983ca450 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C15C:B0F20:81FCD3:AE2DB3:6B063421 |
| html-safe-nonce | 76895ba69f587dc72a059d0d9a986cccf8d068b34de6a9143f1ad3b8960bc5e1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMTVDOkIwRjIwOjgxRkNEMzpBRTJEQjM6NkIwNjM0MjEiLCJ2aXNpdG9yX2lkIjoiNzgzMzAxMTI5MDA4MzA0NjQzMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 70423584eb9414419275ecf932b2b1255d1c6adc3e61b81de5370f2706048ed0 |
| hovercard-subject-tag | issue:6042864750 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/984/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7720a3bb834e73ff508df4c3dc89a66509bbf5ffb751fa45262c4f5bf7067db4/developing-today/code/issues/984 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7720a3bb834e73ff508df4c3dc89a66509bbf5ffb751fa45262c4f5bf7067db4/developing-today/code/issues/984 |
| og:image:alt | Finding 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 #971 (merged 2026-10-26, feat(cold-s... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dezren39 |
| hostname | github.com |
| expected-hostname | github.com |
| None | c3584c853cd39700ecff6e2cf8364295ffdb5313e571046c41cd2479270f7df0 |
| turbo-cache-control | no-preview |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9eb3bb1597d09170a5f282cd38ae376dee1a5ec1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width