Apply reshelving
apply_reshelvingPreview proposed reshelving from staged library assignments, then apply an approved, unexpired preview to current labels with stale-change and churn safeguards.
Instructions
Create a reshelving preview or apply an approved preview to current labels. Use after submit_library_result stages assignments; use pin_shelf for a user's individual shelf decision or undo_library_apply to reverse the latest apply. Preview needs a run and current projection revision; apply needs its preview_id, delta_hash and operation_key. Apply is disabled by default and stops at 15 percent churn without trusted human approval; expired or stale previews must be rebuilt.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | preview creates a proposal and requires run_id; apply requires preview_id, delta_hash and operation_key and must pass the local apply gate. | |
| run_id | No | Librarian run identifier from list_library_work; omission selects the service's default run where allowed. | |
| delta_hash | No | Exact proposed-change hash returned with the preview; prevents applying a different delta. | |
| preview_id | No | Unexpired preview identifier returned by apply_reshelving in preview mode. | |
| operation_key | No | Client-generated key for an identical-operation retry; do not reuse it for different arguments. | |
| activate_version | No | Whether the preview should activate this run's taxonomy version when applied. | |
| expected_projection_revision | Yes | Current label-projection revision from the library response; stale writes are refused. |