fix: sync fableLoom RESTORABLE_FIELDS with the actual restorable field set - #6100
Merged
atomantic merged 1 commit intoSep 3, 2026
Merged
Conversation
…d set (atomantic#6010) server/lib/conflictJournal.js's RESTORABLE_FIELDS.fableLoom (documented as the single source of truth for conflict restore/merge) was missing productionStatus, protagonistCharacterId, protagonistWardrobeId, and protagonistWardrobeLocked, even though records.js already treats them as restorable. Concretely: restoring a conflict via "Restore All" silently stripped those 4 fields, and "merge fields" rejected them outright with ERR_VALIDATION — a real data-loss path for protagonist continuity and production sign-off after a sync conflict. Added the 4 fields to close the gap. Added restore-all and merge-fields coverage in conflictJournalResolver.test.js, split so the protagonist-fields case and the productionStatus case don't collide with mutateLoom's own (unrelated, intentional) rule that clears productionStatus whenever editorial content actually changes. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.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.
Summary
server/lib/conflictJournal.js'sRESTORABLE_FIELDS.fableLoom— documented as the single source of truth for conflict restore/merge — was missingproductionStatus,protagonistCharacterId,protagonistWardrobeId, andprotagonistWardrobeLocked, even thoughserver/services/fableLoom/records.jsalready treats them as restorable.ERR_VALIDATION— data loss for protagonist continuity and production sign-off after a sync conflict (see the issue's trigger scenario for the full repro).RESTORABLE_FIELDS.fableLoomto close the gap.Test plan
restore-all/merge-fieldscoverage inconflictJournalResolver.test.jsfor all 4 fields, split into separate cases so the protagonist-fields restore and theproductionStatusrestore don't collide withmutateLoom's own (unrelated, intentional) rule that clearsproductionStatuswhenever editorial content actually changes.cd server && npx vitest run services/conflictJournalResolver.test.js lib/conflictJournal.test.js→ 60/60 passed.🤖 Generated with Claude Code