Repository navigation
feat: field operations and translation freshness (RFC-0041 step 3) - #96
Merged
Merged
Conversation
- rename_field, change_field_type (closed conversion table, onInvalid "clear" to drop values), set_field_localized and remove_field: a dry run, a "before" snapshot, phase A (definition with a migration marker), phase B (entries in CAS-guarded batches of 200, resumable), phase C (marker dropped, "after" snapshot). Draft graph only; revertible. resolveFields and entry writes read through the marker mid-run. - Changing only non-localized values on an original no longer marks its translations stale (store/source-forward.ts); node hashes are unchanged. - API: /collections/:key/fields/operations (run, continue, status, revert; site:settings) and the admin equivalents for --remote. - CLI: cloudhal fields rename|retype|localize|remove|continue|revert [--dry-run] [--remote]. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Madraka <8898640+Madraka@users.noreply.github.com>
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.
Step 3 of RFC-0041's rollout (ADR-0043), built on #94 and #95.
Operations (
@cloudhal/core-ts,src/fields-operations/)rename_field;change_field_type: a closed conversion table in@cloudhal/core-ts/fields;onInvalid: "clear"is required to drop values that do not convert;set_field_localized;remove_field.NOT EXISTSguard, then takes an "after" snapshot.resolveFieldsand a person's entry writes read through the marker, so their edit and the operation converge.Translation freshness (follow-up from #95)
store/source-forward.ts).API
POST /api/sites/:id/collections/:key/fields/operations(site:settingspluscontent:write),?continue=<id>.GET …/:operationId(content:read).POST …/:operationId/revert.--remote.operation_in_progress(409),field_values_unconvertible(422, with the report),field_operation_incomplete(409).CLI:
cloudhal fields rename|retype|localize|remove|continue|revert … [--dry-run] [--remote].--dry-runalso lists theme files that readfields.<key>.Choices where the RFC was open
Tests
fields-api,adminandroute-scopespass.EADDRNOTAVAIL(socket exhaustion); CI is the judge.Changeset: minor (
core-ts,api,cli).🤖 Generated with Claude Code