Repository navigation
fix(server): drop undeclared settings on folder changes - #2379
Merged
Merged
Conversation
aicayzer
commented
Oct 24, 2026
aicayzer
left a comment
Contributor
Author
There was a problem hiding this comment.
Reviewed with Codex against origin/main: no regressions; focused folder, item-write, version and property-merge tests pass, and the new CLI conformance test passed in CI. Found on a real instance upgraded from v0.0.28: without this, a folder made before the search-to-query rename cannot be brought forward. Merging on green checks.
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
Folders created before the
searchtoqueryrename in #2371 retainsearch, which the current CLI refuses to read. Folder changes previously merged settings without removing it, so even a complete corrected document could not restore sync. Every accepted folder change now removes stored properties the current folder type does not declare.Changes
searchalias or translation is introduced.--fileand--body, reads back the exact settings, and opens and syncs the folder.Testing
searchand another undeclared property survived.Notes for reviewers
Review performed: traced the folder handler through the shared writer, both current and stale storage-update paths, conflict resolution, validation, persistence, and CLI callers. The internal pruning control is enabled only by the folder-change route; ordinary item writes retain their existing behavior. This data-write change needs review of version handling and the upgrade fixture.
Pruning every accepted change avoids guessing whether a JSON document is complete and preserves existing partial-update semantics. It does not interpret removed settings. Callers repairing an older folder must supply the intended
query.Docs follow-up, checked with
marfa docs search 'folders change': Sync a folder, under “Change a folder's settings,” should explain that named settings replace whole, omitted declared settings stay, and every accepted change removes undeclared stored properties. Include repair viafolders change --version N --file settings.jsonor--bodywith the intendedquery. The docs repository was intentionally not edited. Its generated API reference also needs the updated OpenAPI description on its next import.Leave this pull request open for review; do not merge.
Checklist