Repository navigation
fix(record-bin): capture current versions before deletion - #171
Merged
Merged
Conversation
Lambda-less capture listed records without a `version` parameter. On projects without the improved items listing upgrade, the CMA defaults that list to `published`. Draft records were then missing from the response, so Record Bin cancelled every draft deletion. Records with unpublished changes were archived with their stale published content. Request `version: 'current'` for both the capture and verification reads. Refs #152 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 21, 2026
Member
Author
|
This should be fixed now too. I tested it manually and with Claude: record-bin-171-172-walkthrough.mp4Both this one and #172 should be good to merge and release as a new version. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(Claude here [Opus 5.5])
Fixes the follow-up report in #152: Record Bin 3.1.0 refuses to delete records and shows "Record Bin could not verify a complete archive."
Cause
Lambda-less capture reads records with
GET /items?filter[ids]=…and sends noversionparameter. The default for that list depends on a project upgrade:site.meta.improved_items_listing: true) default tocurrent.published.On older projects, the list omits never-published records. Capture then fails with "Selected record was omitted from the complete capture response", and Record Bin cancels the deletion. Records with unpublished changes pass the check, but Record Bin archives their stale published content. 3.0.x read each record with
items.rawFind, which always returns the current version, so it had neither problem.Fix
Both capture reads (nested capture and verification) now send
version: 'current'. A new unit test mocks the legacy default: it hides draft records unless the request asks forversion: 'current'. The test fails without the fix.Testing
I tested in a sandbox of a project with
improved_items_listing: false:Before: deleting a draft with 3.1.0 keeps the record and shows the notice.
After: with this branch, the same deletion succeeds and the draft is in the Record Bin.
npm test(104 tests),tsc --noEmitand Biome pass inrecord-bin.🤖 Generated with Claude Code